SA-MP Forums Archive
Just making me look @ the brdige... - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Just making me look @ the brdige... (/showthread.php?tid=174374)



Just making me look @ the brdige... - LifeStyle - 05.09.2010

//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;
        }
    }
}



Re: Just making me look @ the brdige... - iggy1 - 05.09.2010

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


Re: Just making me look @ the brdige... - WillyP - 05.09.2010

he tells you the problem in the title..


Re: Just making me look @ the brdige... - iggy1 - 05.09.2010

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


Re: Just making me look @ the brdige... - LifeStyle - 05.09.2010

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


Re: Just making me look @ the brdige... - iggy1 - 05.09.2010

Edited my last post maybe thats the prob.