SA-MP Forums Archive
SetPlayerTeam id 0 bug - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP (https://sampforum.blast.hk/forumdisplay.php?fid=3)
+--- Forum: Bug Reports (https://sampforum.blast.hk/forumdisplay.php?fid=20)
+--- Thread: SetPlayerTeam id 0 bug (/showthread.php?tid=272704)



SetPlayerTeam id 0 bug - crush_ - 29.07.2011

I'm using SetPlayerTeam to avoid team killing (tk)

But the id 0, can't be damaged (is that must do)

BUT he can damage players from her team


Re: SetPlayerTeam id 0 bug - Calgon - 29.07.2011

Unsure if this is confirmed, but you can always draft in an idle NPC to use player slot 0.


Re: SetPlayerTeam id 0 bug - FireCat - 29.07.2011

Quote:
Originally Posted by Calg00ne
View Post
Unsure if this is confirmed, but you can always draft in an idle NPC to use player slot 0.
I wouldn't do that. I would actually script something to fix it. Like GetPlayerTeam(0) on player death n stuff..


Re: SetPlayerTeam id 0 bug - Calgon - 29.07.2011

Setting players to teams prevents players who are in the same team from damaging each other, what you're stating would be pointless, because they'd kill the player, OnPlayerDeath is called once a player is dead.


Re: SetPlayerTeam id 0 bug - Burridge - 29.07.2011

I don't think you'll find it's just with ID 0. This bug (or one similar) has been posted already.

https://sampforum.blast.hk/showthread.php?tid=258730


Re: SetPlayerTeam id 0 bug - crush_ - 29.07.2011

Quote:
Originally Posted by Burridge
View Post
I don't think you'll find it's just with ID 0. This bug (or one similar) has been posted already.

https://sampforum.blast.hk/showthread.php?tid=258730
i have called some friends to play on my server (just to test)

and it only happens with id 0


Re: SetPlayerTeam id 0 bug - Cypress - 29.07.2011

EDIT

I'm wrong.


Re: SetPlayerTeam id 0 bug - Burridge - 29.07.2011

Cypress: He's talking about the PLAYER ID of 0. Not the team ID.

EDIT:

Two videos which show that it doesn't ONLY happen to ID 0. (The bug doesn't occur at all here)

The first one shows that I can't kill my team-mate (I can kill the guy in blue :P).
[ame]http://www.youtube.com/watch?v=gAlM_9B0_3k[/ame]


The second shows that my team-mate can't kill me. This is a one off that neither of us can kill each other, usually one of us would of been able to kill each other. Usually happens with more players IG.
[ame]http://www.youtube.com/watch?v=Pweu8N4MJkM[/ame]

Admittedly I did had died, and changed my team earlier on (shown via the kill list). Maybe team ID's don't get reset on certain ID's?


Re: SetPlayerTeam id 0 bug - JernejL - 01.08.2011

Team data is sometimes "lost" from my experience - setting it again for both players in OnPlayerStreamIn helps it.


Re: SetPlayerTeam id 0 bug - crush_ - 05.08.2011

Well i fixed that.

OnPlayerConnect:

pawn Code:
SetPlayerTeam(playerid, playerid);
OnPlayerSpawn:

pawn Code:
SetPlayerTeam(playerid, teamid);
may work with someone