Replace the variables to 0
#1

Hello.

So now I have several variables like:
test1[playerid];

This variable will take a value, for example:
test1[playerid] = 1;

So I have put this variable to 0 when the player disconnects because another will take the same id and I do not want him to have this variable to 1.

I also have various tables with values ​​that give it:
PlayerInfo[playerid][Level];

The variable table will also have a value, and therefore I will have to disconnect it again to 0.
But hey, it's pretty boring, is there a way to reset it to zero?

At least for the tables?

THX
Reply
#2

At the top of your script were it says "new test1[MAX_PLAYERS];" Set it to "new test1[MAX_PLAYERS] = 0;
Reply
#3

Not because it is the launch of the script, if I do that anyway and that test1 is 1 to id 0 and the player disconnects and reconnects to another player id 0 variable will still be equal to 1 ...
Reply
#4

pawn Код:
//OnPlayerDisconnect
test1[playerid] = 0;
Reply
#5

Quote:
Originally Posted by Baltimore
Посмотреть сообщение
Not because it is the launch of the script, if I do that anyway and that test1 is 1 to id 0 and the player disconnects and reconnects to another player id 0 variable will still be equal to 1 ...
show us the part which sets test1 to 1 under onplayerconnect and disconnect and the new test1 show all
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)