Posts: 221
Threads: 49
Joined: Jun 2014
Reputation:
0
So guys I'm currently working on a RP Gamemode and I want to know is it posible to reset all of player variables without doing it manualy for each variable? Is there a function/command that does that?The problem is if a player disconnects and a new player connects that new player will get the same variables as the player that disconnected, I think so...
Thanks in advice.
Posts: 221
Threads: 49
Joined: Jun 2014
Reputation:
0
Oh ok thanks... So it's not possible to clear normal variables without doing it manualy?
By normal I mean like
new something[MAX_PLAYERS];
Posts: 221
Threads: 49
Joined: Jun 2014
Reputation:
0
Am, I'm not sure how that works I mean I understood you but I didn't know that's how variables work?
Posts: 694
Threads: 2
Joined: Oct 2012
Reputation:
0
quickest way?
new cleanslot[pPlayerEnum];
PlayerI[playerid]=cleanslot;
Where pPlayerEnum is your enum name and PlayerI is your variable array.
This will only work if you don't use 1D arrays for each variable but 1 big 2D/3D array for all or most of your variables.
Posts: 221
Threads: 49
Joined: Jun 2014
Reputation:
0
I still don't understand how can I go through all of them...