SA-MP Forums Archive
SetPlayerTeam - Cannot kill each other? - 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: SetPlayerTeam - Cannot kill each other? (/showthread.php?tid=147937)



SetPlayerTeam - Cannot kill each other? - cAMo - 15.05.2010

SetPlayerTeam (https://sampwiki.blast.hk/wiki/SetPlayerTeam)

Says: "Note: Players on the same team can not kill each other."

1. Does that mean two players on the same team trying to kill each other take no damage from each other when being shot?

2. Does the team set in SetSpawnInfo = SetPlayerTeam?

3. I am scripting an RP server, so I want everyone to be able to kill everyone. How can I accomplish this?



Re: SetPlayerTeam - Cannot kill each other? - Faith - 15.05.2010

Yep..
peoples in the same team cannot attack each other.


I suggest you do something similar to this:


#define Team_POLICE 1
#define Team_ CIVILIAN 2


gteam[playerid] == Team_CIVILIAN
gteam[playerid] == TEAM_POLICE


etc. etc.


Re: SetPlayerTeam - Cannot kill each other? - cAMo - 15.05.2010

Well, I want everyone to be able to kill everyone. Including police on police, civilians on civilians.


Re: SetPlayerTeam - Cannot kill each other? - Faith - 15.05.2010

Hence gteam[playerid].


Setplayerteam = Friendlyfire OFF.


gteam[playerid] = Friendlyfire ON..


Good luck champ


Re: SetPlayerTeam - Cannot kill each other? - cAMo - 15.05.2010

I appreciate your help, but I am not understanding...

What do I need to do so everyone can kill everyone?


Re: SetPlayerTeam - Cannot kill each other? - Faith - 15.05.2010

#define Team_Civilian 1


public OnPlayerSpawn

gteam[playerid] = Team_Civilian;




and remove the SetPlayerTeam as that makes FriendlyFire OFF.

I dont know your code, but when he then login as police, then:


#define Team_Police 2

gteam[playerid] = Team_Police