[SOLVED]How to set a player as friend or hostil?

Hi,

How to make a player hostil or friend? I looking for it in native, but nothing look clear… I don’t want to make all player hostil, only some of them, so using this it’s not a good solution for me:

local playerPed = GetPlayerPed(-1)
NetworkSetFriendlyFireOption(true)
SetCanAttackFriendly(playerPed, true, true)

Thank you!

You can in the enhanced reborn trainer
Otherwise you’ll have to make a script which does it by text command

if you want to setup something for AI i suggest use the pedrelationshitgroup natives

Yes, I try to make a script, but I don’t found a native to mark player as hostil and another one as friend.

In the trainer we can’t kill a player marked as friend but we can kill a player marked as hostil (if I remember well)

I don’t want players can use the trainer, so I try to make a script by myself, just, I don’t found any native to do that… if a native exist to do that!

For who want to know how to do this: SetPedAsEnemy(ped, bool)