Is there a way to turn on friendly fire?


#1

I have been playing with my friends on my server but we can’t shoot each other, was wondering if there is someway you can turn on friendly fire?


#2

@harrypooter You are able to code this, if you require help with that ask Talent on discord.


#3

Anyone have a TUT on this yet?


#4

@Horhey said in Is there a way to turn on friendly fire?:

Anyone have a TUT on this yet?

CLIENT (only if ScriptHookV is allowed by the server)

NETWORK::NETWORK_SET_FRIENDLY_FIRE_OPTION(true);
PED::SET_CAN_ATTACK_FRIENDLY(PLAYER::PLAYER_PED_ID(), true, true);

SERVER

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

#5

Ya so where do you write this?


#6

You can make a resource with that code. It’s a client script.


#7

Can I use C# to make a .dll with this type of code?

How would it look in C#?

Thanks


#8

How to set a player friend and other not?

EDIT: without a trainer


#9

Essentialmode has an option for this now.


#10

I just saw it, but it use the code we can found here, with:

But, how can I set only 1 player has hostil and all other as friend? like we can do this in Enhanced Reborn? (if its possible server side)