Player position not saved on crash/timeout
#7

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
Unless you get the player's position in a timer and store it to global array, you can't retrieve them when the client crashes/timeouts.

Another option is what I did in the example script: using the last saved position: https://github.com/pBlueG/SA-MP-MySQ....pwn#L343-L349
Thanks for your input on that. I noticed that in your query you also have like
PHP код:
mysql_format(ServerMySQL,query1,sizeof(query1),"UPDATE `Users` SET  `Name` = '%s', `pIP` = '%s', `pCash` = '%d', `pAdmin` = '%d', `pXPos` = '%f', `pYPos` = '%f', `pZPos` = '%f', `pAPos` = '%f', `Interior` = '%d' WHERE `Name` = '%s'",GetName(playerid),playerip[playerid],cash,PlayerInfo[playerid][pAdmin], pos[0], pos[1], pos[2], pos[3],PlayerInfo[playerid][Interior],GetName(playerid)); 
And in mine I have
PHP код:
        mysql_format(ServerMySQL,query1,sizeof(query1),"UPDATE `Users` SET  Name ='%s', pIP='%s',pCash = %d, pAdmin=%d, pXPos = %f, pYPos = %f, pZPos = %f, pAPos = %f,Interior=%d WHERE Name = '%s'",GetName(playerid),playerip[playerid],cash,PlayerInfo[playerid][pAdmin], pos[0], pos[1], pos[2], pos[3],PlayerInfo[playerid][Interior],GetName(playerid)); 
However when I change my query to the above, none of my Admin levels get saved or anything.
Reply


Messages In This Thread
Player position not saved on crash/timeout - by Tass007 - 21.09.2016, 06:48
Re: Player position not saved on crash/timeout - by bboytimix - 21.09.2016, 07:33
Re: Player position not saved on crash/timeout - by bboytimix - 21.09.2016, 07:36
Re: Player position not saved on crash/timeout - by Tass007 - 21.09.2016, 11:10
Re: Player position not saved on crash/timeout - by jlalt - 21.09.2016, 11:16
Re: Player position not saved on crash/timeout - by Konstantinos - 21.09.2016, 11:46
Re: Player position not saved on crash/timeout - by Tass007 - 21.09.2016, 12:11
Re: Player position not saved on crash/timeout - by Konstantinos - 21.09.2016, 13:12

Forum Jump:


Users browsing this thread: 1 Guest(s)