28.02.2015, 09:17
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
so the day ends in game with a timer.
and i add this after that.
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.
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;
}
and i add this after that.
pawn Код:
state GameCity:LV;
SendRconCommand("gmx");
pawn Код:
public OnPlayerSpawn(playerid) <GameCity:LS>
{
//... code here
}
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.