Just making me look @ the brdige...
#1

//OnPlayerDeath:
pawn Код:
TogglePlayerSpectating(playerid, true);
SetTimerEx("Speccing",2000,false,"d",playerid);

pawn Код:
Speccing(playerid)
{
    new Float:Health;
    for(new i = 0; i < MAX_PLAYERS; i++)
        {
        if(!IsPlayerConnected(i)) continue;
        GetPlayerHealth(i, Health);
        if(Health < 1) continue;
        if(mTeam[playerid] == mTeam[i])
        {
            PlayerSpectatePlayer(playerid, i);
            break;
        }

        if(TeamCounting[mTeam[playerid]-1] == 0)
        {
            PlayerSpectatePlayer(playerid, i);
            break;
        }
    }
}
Reply
#2

So what is it that you want? lol no text just code
Reply
#3

he tells you the problem in the title..
Reply
#4

Yes but thats not enough info is it?

Try this,
pawn Код:
Speccing(playerid)
{
    new Float:Health;
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(!IsPlayerConnected(i)) continue;
        GetPlayerHealth(i, Health);
        if(Health < 1) continue;
        if(mTeam[playerid] == mTeam[i])
        {
            TogglePlayerSpectating(playerid, 1);
            PlayerSpectatePlayer(playerid, i);
            break;
        }

        if(TeamCounting[mTeam[playerid]-1] == 0)
        {
            TogglePlayerSpectating(playerid, 1);
            PlayerSpectatePlayer(playerid, i);
            break;
        }
    }
}
Check this page,
https://sampwiki.blast.hk/wiki/PlayerSpectatePlayer
Reply
#5

When i die, or someone else. It won't make us spec a player. Just keep making us look @ the river / bridge
Reply
#6

Edited my last post maybe thats the prob.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)