31.07.2010, 17:07
well my game mode is hide n kill so of course no one wants to be the killer so how can i make it so 1 person gets randomly selected to be the kiler
public StartGame()
{
for(new x=0; x<MAX_PLAYERS; x++)
{
if(IsPlayerConnected(x))
{
new rand = random(2);
if(rand == 1)
{
SetPVarInt(x, "IsKiller", 1);
new str[85];
format(str, sizeof(str), "%s has been randomly chosen as the killer!", pName(x));
SendClientMessageToAll(0xFFFAFFF, str);
break;
}
else continue;
}
}
return 1;
}