Mysql spawning
#1

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:
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;
}
Anyone knows whats wrong? :S
Reply


Messages In This Thread
Mysql spawning - by thimo - 08.12.2011, 16:50
Re: Mysql spawning - by Laronic - 08.12.2011, 16:54
Re: Mysql spawning - by thimo - 08.12.2011, 16:57
Re: Mysql spawning - by Laronic - 08.12.2011, 16:58
Re: Mysql spawning - by thimo - 08.12.2011, 17:09
Re: Mysql spawning - by Laronic - 08.12.2011, 17:11
Re: Mysql spawning - by thimo - 08.12.2011, 17:18
Re: Mysql spawning - by Laronic - 08.12.2011, 17:24
Re: Mysql spawning - by thimo - 08.12.2011, 17:25
Re: Mysql spawning - by Laronic - 08.12.2011, 17:27

Forum Jump:


Users browsing this thread: 2 Guest(s)