random spec?
#1

i already tried these both ways and i can't get a player spectate a random person after he dies by gravity. please help me .. :/

pawn Код:
if(killerid != INVALID_PLAYER_ID)
    {
        new count[MAX_PLAYERS];
        for (new i=0; i<MAX_PLAYERS; i++)
        {
            if(IsPlayerConnected(i))
            {
                count[i]++;
            }
        }
        SendDeathMessage(killerid, playerid, reason);
        TogglePlayerSpectating(playerid, 1);
        PlayerSpectatePlayer(playerid, random(sizeof(count)));
    }
pawn Код:
if(killerid != INVALID_PLAYER_ID)
    {
        new count;
        for (new i=0; i<MAX_PLAYERS; i++)
        {
            if(IsPlayerConnected(i))
            {
                count++;
            }
        }
        SendDeathMessage(killerid, playerid, reason);
        TogglePlayerSpectating(playerid, 1);
        PlayerSpectatePlayer(playerid, random(sizeof(count)));
    }
Reply


Messages In This Thread
random spec? - by jamesbond007 - 11.05.2011, 15:02
Re: random spec? - by netanelbb - 11.05.2011, 16:49
Re: random spec? - by jamesbond007 - 11.05.2011, 19:30
Re: random spec? - by Jefff - 11.05.2011, 19:42

Forum Jump:


Users browsing this thread: 2 Guest(s)