04.08.2015, 11:46
Hi, I'm little bit confuse that how can i make these code to change the gamemode in Sequence. It changes randomly at this moment.
I want it to be like First mode should be Gamemode 1 and gamemode 2 and gamemode 3 and at last gamemode 4.
Here are the codes:
Regards,
- SpikY_
I want it to be like First mode should be Gamemode 1 and gamemode 2 and gamemode 3 and at last gamemode 4.
Here are the codes:
Код:
forward switchmode(); forward StopChangemodeTimer(); static changemodetimer, currentmode ; enum smode { Mode[50], Time } static const ModeInfo[][smode] = { {"Gamemode 1", 300000}, {"Gamemode 2", 300000}, {"Gamemode 3", 300000}, {"Gamemode 4", 300000} }; public OnGameModeInit() { new randmode = random( sizeof (ModeInfo) ); currentmode = randmode; changemodetimer = SetTimer("switchmode", ModeInfo[currentmode][Time], false); return 1; } public OnGameModeExit() { KillTimer(changemodetimer); currentmode = 0; return 1; } public StopChangemodeTimer() { KillTimer(changemodetimer); return 1; } public switchmode() { new modestring[50], randmode = random( sizeof (ModeInfo) ) ; format(modestring, sizeof(modestring), "The Next mode will be %s!", ModeInfo[currentmode][Mode]); SendClientMessageToAll(0x32CD32FF, modestring); format(modestring,sizeof(modestring), "changemode %s", ModeInfo[currentmode][Mode]); SendRconCommand(modestring); currentmode = randmode; changemodetimer = SetTimer("switchmode", ModeInfo[currentmode][Time], false); return 1; }
- SpikY_