[Help] Disable ped shooting at certain players

help

#1

Hello, I’m working on a gangs script, and I wanted to know, is there any way to disable certain peds shooting at certain players.
For example:
Stop ballas peds shooting at ballas members(players).

Thank you!


#2

yes , for just stop someone shooting you can use the native : DISABLE_PLAYER_FIRING(Player player, BOOL toggle);

(this native have to be call every frame)

for your case the best is to use Relationship, you have many possibility with the relationship , you can simply put the player in the same relationship group of the ballas , or set the relationship as friend between ballas’group and your player’s group. or you even can set that your player cannot be damage by the group’s id with that native : SET_ENTITY_CAN_BE_DAMAGED_BY_RELATIONSHIP_GROUP