Team Friendly Fire.. Need your help.
#1

How to make team friendly fire for team mates. To disable them to decrease their own team mates.

i have this type of system

pawn Код:
if(gTeam[playerid] == TEAM1)
{
}
else if(gTeam[playerid] == TEAM2)
{
}
Please help. Urgently needed.
Reply
#2

Use SetPlayerTeam()
Reply
#3

but i am using gTeam feature. And where should i add this?
Reply
#4

SetPlayerTeam is so that other players in that same team can't damage you.

You can use it like this:
pawn Код:
if(gTeam[playerid] == TEAM1)
{
    SetPlayerTeam(playerid, 1); // if the playerid is in TEAM1, we set his team to 1
}
else if(gTeam[playerid] == TEAM2)
{
    SetPlayerTeam(playerid, 2); // if the playerid is in TEAM2, we set his team to 2
}
Make sure you update that each time you change gTeam
Reply
#5

Although,
Quote:
Note: Players can not damage/kill players on the same team unless they use a knife to slit their throat. As of SA-MP 0.3x, players are also unable to damage vehicles driven by a player from the same team. This can be enabled with EnableVehicleFriendlyFire.

Reply
#6

thank you -Prodigy-. Plus + one 1 Rep.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)