23.09.2015, 09:13
Hello, im developing a missions server and i made a small code to change randomly the missions, this is the code:
And this is how i called it in the mission gamefile:
The message "the next mode will be" shows, but server gets stuck at restart after executing that code...whats wrong?
Код:
new ModeNames[][] = { "GM1", "GM2", "GM3", "GM4" }; public GMChange() { new modestring[50]; new randmode = random(sizeof(ModeNames)); format(modestring,sizeof(modestring),"The Next mode will be %s!",ModeNames[randmode]); SendClientMessageToAll(0x32CD32FF,modestring); format(modestring,sizeof(modestring),"changemode %s",ModeNames[randmode]); SendRconCommand(modestring); return 1; }
Код:
CallRemoteFunction("GMChange","");