SetPlayerTeam id 0 bug
#1

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
Reply
#2

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

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..
Reply
#4

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.
Reply
#5

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
Reply
#6

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
Reply
#7

EDIT

I'm wrong.
Reply
#8

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?
Reply
#9

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

Well i fixed that.

OnPlayerConnect:

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

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


Forum Jump:


Users browsing this thread: 1 Guest(s)