Posts: 6,242
Threads: 8
Joined: Jun 2008
Quote:
Originally Posted by AbyssMorgan
PHP код:
public GMChange(){
new rand = random(4), buffer[128];
format(buffer,sizeof(buffer),">> Your next mission will be: {F2C80C}%d {FFFFFF}...please wait.",rand);
SendClientMessageToAll(-1,buffer);
format(buffer,sizeof(buffer),">> Changing mission, next will be: %d", rand);
IRC_GroupSay(groupID, IRC_CHANNEL, buffer);
switch(rand)
{
case 0: SendRconCommand("changemode gmone");
case 1: SendRconCommand("changemode gmtwo");
case 2: SendRconCommand("changemode gmthree");
case 3: SendRconCommand("changemode gmfour");
}
return 1;
}
|
^^ This fellas got the better idea... Re-arranged your code to simply run through in a different order, which is more logical in a sense.