11.12.2010, 16:26
I have command that checks position in MYSQL DB.
And dialog response where it sets PVar:
Every thing works perfect except coordinates. Command /test returns 0.00000 0.00000 0.000000
Any suggestions how to get coordinates?
pawn Код:
COMMAND:test(playerid, params[]) //
{
new string[64];
format(string,sizeof(string),"X: %f , Y:%f, Z:%f",GetPVarFloat(playerid,"xpos"), GetPVarFloat(playerid,"ypos"), GetPVarFloat(playerid,"zpos"));
SendClientMessage(playerid,0xFFFFFFAA,string);
return 1;
}
pawn Код:
new data2[12],data[8][50];
new Float:x,Float:y,Float:z;
sscanf(line, "p|ssddddfdfffssddd", data[0], data[1], data2[0], data2[1], data2[2], data2[3], data2[8],data2[4],x,y,z,data[4],data[5],data2[9],data2[10],data2[11]);
SetPVarFloat(playerid,"xpos",x); // Save the float into a player variable
SetPVarFloat(playerid,"ypos",y); // Save the float into a player variable
SetPVarFloat(playerid,"zpos",z); // Save the float into a player variable
Any suggestions how to get coordinates?