Maffw Posted April 14, 2017 Report Share Posted April 14, 2017 Salutare are careva comanda /vowner Link to comment Share on other sites More sharing options...
0 BuNiCu-RP Posted April 14, 2017 Report Share Posted April 14, 2017 CMD:vowner(playerid, params[]) { new owner[MAX_PLAYER_NAME+1], query[250]; if(sscanf(params, "u", owner)) return SendClientMessage(playerid, -1, "/vowner <PartOfName/PlayerID>"); if(IsPlayerInVehicle(playerid, GetPlayerVehicleID(playerid))) { mysql_format(cHandle, query, sizeof(query), "UPDATE cars SET Owner = '%s' WHERE id = %d", owner, GetPlayerVehicleID(playerid)); mysql_tquery(cHandle, query, "", ""); } return 1; } Link to comment Share on other sites More sharing options...
0 Maffw Posted April 14, 2017 Author Report Share Posted April 14, 2017 6 minutes ago, BuNiCu-RP said: CMD:vowner(playerid, params[]) { new owner[MAX_PLAYER_NAME+1], query[250]; if(sscanf(params, "u", owner)) return SendClientMessage(playerid, -1, "/vowner <PartOfName/PlayerID>"); if(IsPlayerInVehicle(playerid, GetPlayerVehicleID(playerid))) { mysql_format(cHandle, query, sizeof(query), "UPDATE cars SET Owner = '%s' WHERE id = %d", owner, GetPlayerVehicleID(playerid)); mysql_tquery(cHandle, query, "", ""); } return 1; } Tre sa definsesc ceva sau nu? Link to comment Share on other sites More sharing options...
0 BuNiCu-RP Posted April 14, 2017 Report Share Posted April 14, 2017 E doar un model cum sa iti faci comanda Link to comment Share on other sites More sharing options...
0 Maffw Posted April 14, 2017 Author Report Share Posted April 14, 2017 Primesc eroriile astea C:\Users\David\Desktop\ro-rpg.pwn(6491) : error 017: undefined symbol "cHandle" C:\Users\David\Desktop\ro-rpg.pwn(6492) : error 017: undefined symbol "cHandle" Link to comment Share on other sites More sharing options...
0 Banditul Posted April 14, 2017 Report Share Posted April 14, 2017 (edited) Acum 12 minute, Maffw a spus: Primesc eroriile astea C:\Users\David\Desktop\ro-rpg.pwn(6491) : error 017: undefined symbol "cHandle" C:\Users\David\Desktop\ro-rpg.pwn(6492) : error 017: undefined symbol "cHandle" Cum a specificat bunicu , ce ti-a dat este un model , tu trebuie sa faci cmd adaptata la gm-ul tau eventual sa o dezvolti pentru nevoile tale , normal ca priemesti erori daca tu ai alt MySQL handler cHandle il inlocuiesti cu ce ai tu la mysql_connect (Exemplu: cHandle = mysql_connect(...); Edited April 14, 2017 by Banditul Link to comment Share on other sites More sharing options...
0 Maffw Posted April 14, 2017 Author Report Share Posted April 14, 2017 Ma poti ajuta te rog daca poti adauga-ma pe skype anonymusgg Link to comment Share on other sites More sharing options...
0 InceMan Posted April 14, 2017 Report Share Posted April 14, 2017 Salut, incearca asa CMD:vowner(playerid, params[]) { new owner[MAX_PLAYER_NAME+1], query[250]; if(sscanf(params, "u", owner)) return SendClientMessage(playerid, -1, "/vowner <PartOfName/PlayerID>"); if(IsPlayerInVehicle(playerid, GetPlayerVehicleID(playerid))) { mysql_format(SQL, query, sizeof(query), "UPDATE cars SET Owner = '%s' WHERE id = %d", owner, GetPlayerVehicleID(playerid)); mysql_tquery(SQL, query, "", ""); } return 1; } FiveGame Lands Pawno Developer, Mapping , Scripter Since 2016 Link to comment Share on other sites More sharing options...
0 Kingsley Posted April 14, 2017 Report Share Posted April 14, 2017 35 minutes ago, Geani said: Salut, incearca asa CMD:vowner(playerid, params[]) { new owner[MAX_PLAYER_NAME+1], query[250]; if(sscanf(params, "u", owner)) return SendClientMessage(playerid, -1, "/vowner <PartOfName/PlayerID>"); if(IsPlayerInVehicle(playerid, GetPlayerVehicleID(playerid))) { mysql_format(SQL, query, sizeof(query), "UPDATE cars SET Owner = '%s' WHERE id = %d", owner, GetPlayerVehicleID(playerid)); mysql_tquery(SQL, query, "", ""); } return 1; } 1 hour ago, BuNiCu-RP said: CMD:vowner(playerid, params[]) { new owner[MAX_PLAYER_NAME+1], query[250]; if(sscanf(params, "u", owner)) return SendClientMessage(playerid, -1, "/vowner <PartOfName/PlayerID>"); if(IsPlayerInVehicle(playerid, GetPlayerVehicleID(playerid))) { mysql_format(cHandle, query, sizeof(query), "UPDATE cars SET Owner = '%s' WHERE id = %d", owner, GetPlayerVehicleID(playerid)); mysql_tquery(cHandle, query, "", ""); } return 1; } Stiti ca masina in database poate sa aiba id 7, iar pe server 124, nu? Bine acum depinde si cand sunt incarcate. Cel mai okey e sa extrageti id-ul din database al masinii (atunci cand ele se incarca), iar query-ul ar arata cam asa: mysql_format(cHandle, query, sizeof(query), "UPDATE cars SET Owner = '%s' WHERE id = %d", owner, vehVar[GetPlayerVehicleID(playerid)][vehicleID]); Retras Link to comment Share on other sites More sharing options...
0 InceMan Posted April 14, 2017 Report Share Posted April 14, 2017 Acum 2 minute, Tud0r. a spus: Stiti ca masina in database poate sa aiba id 7, iar pe server 124, nu? Bine acum depinde si cand sunt incarcate. Cel mai okey e sa extrageti id-ul din database al masinii (atunci cand ele se incarca), iar query-ul ar arata cam asa: mysql_format(cHandle, query, sizeof(query), "UPDATE cars SET Owner = '%s' WHERE id = %d", owner, vehVar[GetPlayerVehicleID(playerid)][vehicleID]); Ai dreptate ! FiveGame Lands Pawno Developer, Mapping , Scripter Since 2016 Link to comment Share on other sites More sharing options...
0 BuNiCu-RP Posted April 14, 2017 Report Share Posted April 14, 2017 @Tud0r. Nu am de unde sa stiu ce sistem de masini foloste. I-am dat un exemplu cum sa isi faca comanda.... Link to comment Share on other sites More sharing options...
0 Kingsley Posted April 14, 2017 Report Share Posted April 14, 2017 5 minutes ago, BuNiCu-RP said: @Tud0r. Nu am de unde sa stiu ce sistem de masini foloste. I-am dat un exemplu cum sa isi faca comanda.... Probabil la tine se incarca primele, la altii nu. Am vrut doar sa lamuresc, poate unii ar intelege gresit. Retras Link to comment Share on other sites More sharing options...
Question
Maffw
Salutare are careva comanda /vowner
Link to comment
Share on other sites
11 answers to this question
Recommended Posts