Resetting variables
#1

Okay, resetting variables is something I tend to do differently each time..
I have never really looked into the best places to reset them..

Sometimes I will reset them on connect, sometimes on disconnect, and sometimes both..
So, the question is, where is the best place to reset player variables?


Example:
pawn Code:
new Example[MAX_PLAYERS];

public OnPlayerConnect(playerid)
{
    Example[playerid] = 0;
    return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
    Example[playerid] = 0;
    return 1;
}
Reply


Messages In This Thread
Resetting variables - by iTorran - 20.08.2012, 23:30
Re: Resetting variables - by detter - 20.08.2012, 23:46
Re: Resetting variables - by Arca - 20.08.2012, 23:47
Re: Resetting variables - by SuperViper - 21.08.2012, 00:28
Re: Resetting variables - by iTorran - 21.08.2012, 13:33

Forum Jump:


Users browsing this thread: 2 Guest(s)