[HELP] PVars problem
#1

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...
Reply
#2

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>
Reply
#3

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)