SA-MP Forums Archive
MySQL GetOwnerName function - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: MySQL GetOwnerName function (/showthread.php?tid=424300)



MySQL GetOwnerName function - ProjectGANTON - 21.03.2013

Fixed it. Thanks!


Re: MySQL GetOwnerName function - Patrick - 21.03.2013

im not sure about this but instead of this
pawn Код:
new MySQLown = Veicolo[vehicleid][mOwner];
USE
pawn Код:
//parameters mysql_real_escape_string(const source[], destination[], connectionHandle);
new MySQLown[40];
mysql_real_escape_string(Veicolo[vehicleid][mOwner] ,MySQLown);
EDIT

let me try to fix it.


Re: MySQL GetOwnerName function - ProjectGANTON - 21.03.2013

I fixed it.


Re: MySQL GetOwnerName function - Patrick - 21.03.2013

i just found your problem. as im editing the code. i found that instead of using playerid you used vehicleid which you are getting the vehicle id not the player name. so can you give me how insert the playername in your database.

hmm im not sure about this. but try use %d instead of %s because you are getting vehicleid "a number" not a name

pawn Код:
format(string,sizeof(string),"Owner: %d",GetVehicleOwner(vehicleid));
SendClientMessage(playerid,WHITE,string);



Re: MySQL GetOwnerName function - ProjectGANTON - 21.03.2013

I fixed it, thanks for answering. Can you help me here too?
https://sampforum.blast.hk/showthread.php?tid=420431