Random gamemode change help
#1

Hello, im developing a missions server and i made a small code to change randomly the missions, this is the code:

Код:
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;
}
And this is how i called it in the mission gamefile:

Код:
CallRemoteFunction("GMChange","");
The message "the next mode will be" shows, but server gets stuck at restart after executing that code...whats wrong?
Reply


Messages In This Thread
Random gamemode change help - by Face9000 - 23.09.2015, 09:13
Re: Random gamemode change help - by BroZeus - 23.09.2015, 14:22
Re: Random gamemode change help - by Face9000 - 23.09.2015, 20:35
Re: Random gamemode change help - by BroZeus - 24.09.2015, 03:59
Re: Random gamemode change help - by Face9000 - 24.09.2015, 09:49
Re: Random gamemode change help - by Jefff - 24.09.2015, 15:22
Re: Random gamemode change help - by Face9000 - 25.09.2015, 09:37
Re: Random gamemode change help - by rappy93 - 25.09.2015, 12:14
Re: Random gamemode change help - by Face9000 - 26.09.2015, 10:18
Re: Random gamemode change help - by Face9000 - 29.09.2015, 11:42

Forum Jump:


Users browsing this thread: 1 Guest(s)