SA-MP Forums Archive
SetPlayerTeam bug, or is it me? - 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)
+--- Thread: SetPlayerTeam bug, or is it me? (/showthread.php?tid=445255)



SetPlayerTeam bug, or is it me? - BaubaS - 20.06.2013

Hello, I have a problem with SetPlayerTeam. I believe that it is a bug of SAMP? Because I tried to use many other ways to do this command, but the result is the same - I cant shoot any player either its off or on.

pawn Код:
CMD:tf(playerid, params[])
{
    teamFire = !teamFire;
   
    for (new i; i < MAX_PLAYERS; i++)
    {
        if (!IsPlayerConnected(i)) continue;
       
        SetPlayerTeam(i, (teamFire) ? 37 : 0);
    }
   
    return (true);
}



Re: SetPlayerTeam bug, or is it me? - BaubaS - 20.06.2013

Oh, to reset player's team you must use NO_TEAM, not 0. You can lock this one.