Help With putting random person on a certain team
#1

my game mode is hide n kill and alot of times people dont like being on TEAM_HUNTER 1 so i have to make it select a random person but i dont know how please help.
Reply
#2

Add this where you want to pick the random player...

pawn Код:
for(new x=0; x!=MAX_PLAYERS; x++)
{
    if(GetPlayerTeam(x) != TEAM_HUNTER)
    {
        new str[80];
        format(str, sizeof(str), "%s has been randomly set to \"Team Hunter\"", pName(x));
        SendClientMessageToAll(0xAAFFFFF, str);
        SetPlayerTeam(x, TEAM_HUNTER);
        break;
    }
}
Reply
#3

Quote:
Originally Posted by PotH3Ad
Посмотреть сообщение
Add this where you want to pick the random player...

pawn Код:
for(new x=0; x!=MAX_PLAYERS; x++)
{
    if(GetPlayerTeam(x) != TEAM_HUNTER)
    {
        new str[80];
        format(str, sizeof(str), "%s has been randomly set to \"Team Hunter\"", pName(x));
        SendClientMessageToAll(0xAAFFFFF, str);
        SetPlayerTeam(x, TEAM_HUNTER);
        break;
    }
}
this makes everyone who joins a hunter. how can i fix it
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)