Storing a value. - 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)
+--- Thread: Storing a value. (
/showthread.php?tid=618619)
Storing a value. -
StrikerZ - 08.10.2016
Hi. So i made wanted levels it works now can i somehow save a player's wanted level into something onplayerdisconnect? and set the same wanted level[the level on which he left] on him when he joins ?
Re: Storing a value. -
alexanderjb918 - 08.10.2016
Save it with his pdata?
Re: Storing a value. -
StrikerZ - 08.10.2016
I'm not using any enum for wanted level.Just SetPlayerWantedLevel and GetPlayerWantedLevel
Re: Storing a value. - iLearner - 08.10.2016
He means... do you have a enum for playerdata? in that enum create a var and store it in it and save it on your save fuction & load it on your load func
Re: Storing a value. -
StrikerZ - 08.10.2016
Ah.. Aight. So i did this. new disable[MAX_PLAYERS] added pWantedLevel in playerinfo enum.under OnPlayerDisconnect Disable = GetPlayerWantedLevel(playerid); and PlayerInfo[playerid][pWantedLevel] = PlayerInfo[playerid][pWantedLevel]+Disable; will it work?