Getting Coordinates from MySQL - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Getting Coordinates from MySQL (
/showthread.php?tid=233954)
Getting Coordinates from MySQL -
s1k - 02.03.2011
So all I want to do is get some x,y,z coordinates from a table from mysql and use it in a command such as SetPlayerPos(). Right now I'm doing this:
pawn Код:
mysql_get_field("x",string); coordx=floatstr(string);
mysql_get_field("y",string); coordy=floatstr(string);
mysql_get_field("z",string); coordz=floatstr(string);
SetPlayerPos(playerid, coordx, coordy, coordz);
Is there a simpler way of doing this?
Re: Getting Coordinates from MySQL -
Lorrden - 02.03.2011
Don't You call that simple?
Dude, What You want? "LoadPos." and it will fix it?
Re: Getting Coordinates from MySQL -
Sergei - 02.03.2011
You can fetch whole resultline and split it with sscanf.