08.12.2011, 16:50
Ok so i wanted to save position on disconnect and that finally works but now i got the problem it keeps spawning me at 0,0,0. This is my code:
Anyone knows whats wrong? :S
pawn Код:
public OnPlayerSpawn(playerid)
{
new string[128];
format(string, sizeof(string), "SELECT * FROM Users WHERE Name = '%s' AND X='%d',Y='%d',Z='%d'", UserStats[playerid][Name], UserStats[playerid][X], UserStats[playerid][Y], UserStats[playerid][Z]);
mysql_query(string);
mysql_store_result();
SetPlayerPos(playerid, UserStats[playerid][X], UserStats[playerid][Y], UserStats[playerid][Z]);
mysql_free_result();
return 1;
}