[HELP] PVars problem - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [HELP] PVars problem (
/showthread.php?tid=211533)
[HELP] PVars problem -
Pooh7 - 15.01.2011
Hi
I'm start using PVars for player's variables but I have one problem.
My saving system be called when player disconnect from server, and it works perfect, player disconnecting and function saving his data in file.
But the problem is that when i type /RCON GMX, all PVars set to 0, and all player's variables set to 0, and data isn't saved correctly
How I can fix it? I want to save player's data in OnPlayerDisconnect :/
Sorry for my bad English...
Re: [HELP] PVars problem -
blackwave - 15.01.2011
Quote:
Originally Posted by Pooh7
Hi
I'm start using PVars for player's variables but I have one problem.
My saving system be called when player disconnect from server, and it works perfect, player disconnecting and function saving his data in file.
But the problem is that when i type /RCON GMX, all PVars set to 0, and all player's variables set to 0, and data isn't saved correctly
How I can fix it? I want to save player's data in OnPlayerDisconnect :/
Sorry for my bad English...
|
It unload most of filterscripts ( the /rcon gmx ). So, you had to do: /rcon reloadfs <NAME>
Re: [HELP] PVars problem -
Calgon - 15.01.2011
In the RCON command callback, create an if statement to check what they sent with strcmp, if it matches "gmx2" then add some code in the if statement which loops OnPlayerDisconnect per player (or some additional code to save PVars to a file) and set a timer to send the RCON command "gmx" a few seconds after.