Help Please
#1

how i can create like if someone his color blue and other color is blue when they shot each other no one lose health like God Mod ??! Please Help!
Reply
#2

I think if you do; SetPlayerTeam(playerid, 0); < That will set there team to 0. I think that disables team-kill, but im not sure. Otherwise you could create a system using OnPlayerShootPlayer if there in the same team then reset there health to what it was before. if not then take the damage.
Reply
#3

pawn Код:
public OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid) {
    if (GetPlayerTeam(playerid) == GetPlayerTeam(damagedid)) {
        new Float:damagedHealth;
        GetPlayerHealth(damagedid, damagedHealth);
        SetPlayerHealth(damagedid, damagedHealth + amount);
    }
    return 1;
}
Reply
#4

Use GetPlayerColor.
Reply
#5

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

"Players on the same team can not kill each other unless they use a knife. "
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)