New Way of working with state
#5

Quote:
Originally Posted by Vince
Посмотреть сообщение
OnGameModeInit is executed before main, however illogical it may seem, so it is only natural that it will execute the fallback. So you can load all general stuff in OnGameModeInit, then set the state in main and execute another function to load the city specific stuff.
okay i did that so there is no what that the simple one gets executed every time and the state one too. This will save me code for e.g

pawn Код:
public OnPayerSpawn(playerid) <GameMode:LS>
{
    //..Only spawn location and messages here.
    return 1;
}

public OnPayerSpawn(playerid) <GameMode:LV>
{
    //..Only spawn location and messages here.
    return 1;
}

public OnPayerSpawn(playerid) <>
{
    //..All the spawn code for example giving weapon and setting variables.
    return 1;
}
Reply


Messages In This Thread
New Way of working with state - by AroseKhanNiazi - 28.02.2015, 09:17
Re: New Way of working with state - by Vince - 28.02.2015, 09:49
Re: New Way of working with state - by AroseKhanNiazi - 28.02.2015, 09:56
Re: New Way of working with state - by Vince - 28.02.2015, 10:53
Re: New Way of working with state - by AroseKhanNiazi - 28.02.2015, 11:00
Re: New Way of working with state - by AroseKhanNiazi - 03.03.2015, 11:21
AW: Re: New Way of working with state - by Kaliber - 03.03.2015, 12:02
AW: Re: New Way of working with state - by Kaliber - 03.03.2015, 12:21
AW: Re: New Way of working with state - by Kaliber - 03.03.2015, 12:28
Re: AW: Re: New Way of working with state - by AroseKhanNiazi - 03.03.2015, 12:48

Forum Jump:


Users browsing this thread: 1 Guest(s)