[Help] Save variables
#1

is it possible that I create some variable that is saved even after I close and start the server again, for example, I define the following:

PHP код:
new test;
if (! (
IsPlayerOnAdminDuty (playerid)))
return 
test 
Even after I close and start the server, I would like the test variable to remain 1, without having to check with "if" again, is that possible in any way? if anyone could teach me how to do?
Reply
#2

yes.
make global variable.
When server starts(OnGameModeInit) reassign the correct value to variable.
When servers close(OnGameModeExit) save it inside the file.
Reply
#3

But in this case, the intention is that I do not need to reassign the values ​​of the variables again, if they are already saved, understand?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)