New Way of working with state
#1

https://sampforum.blast.hk/showthread.php?tid=86850 after reading this i want to use these state function but i really got questions. Can state be loaded and changed ?
Like i have 3 different cities that run at different time in same game mode just spawn location are different and etc.

how can i do that when there is specific time game mode ends and restarts and start the other city.

I got LS as my first city
pawn Код:
main ()
{
    state GameCity:LS; // where do i add the first one ? that's what's the problem.
if(GameCity:LS) state GameCity:LV;
else if(GameCity:LV) state GameCity:LS;
}
so the day ends in game with a timer.
and i add this after that.
pawn Код:
state GameCity:LV;
SendRconCommand("gmx");
pawn Код:
public OnPlayerSpawn(playerid) <GameCity:LS>
{
//... code here
}
I want this feature this will give nice look easier editing and more over faster processing as it won't read all code.

I know how to do it with variable it that i can save it then load it. But i want to do it for State.

And another question can switch work with state ? if yes an example please.
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)