Is this necessary?
#1

Hello everyone, I've noticed that people usually reset their variables on player disconnect. Is it really necessary to do so? I understand saving system but not resetting variables at all.

Example:

Код:
 new variable[MAX_PLAYERS];
public OnPlayerConnect(playerid)
{
  variable[playerid] = 0;
}
public OnPlayerDissconect(playerid, reason)
{
  variable[playerid] = 0;
}
Why would you put it to 0 if when a player leaves server it's over, he isn't anymore connected.
Reply


Messages In This Thread
Is this necessary? - by Fratello - 25.08.2017, 13:10
Re: Is this necessary? - by ranme15 - 25.08.2017, 13:16
Re: Is this necessary? - by Paulice - 25.08.2017, 13:17
Re: Is this necessary? - by AbyssMorgan - 25.08.2017, 13:30
Re: Is this necessary? - by Vince - 25.08.2017, 13:35
Re: Is this necessary? - by Paulice - 25.08.2017, 16:54
Re: Is this necessary? - by Fratello - 25.08.2017, 16:58
Re: Is this necessary? - by Paulice - 25.08.2017, 17:04

Forum Jump:


Users browsing this thread: 1 Guest(s)