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)


#11

Ok, so I saw you can disable friendly fire only if ScripthookV is enabled but I’m using vMenu and so I disabled Scripthook so users cant use their own menus how can I disable friendly fire then??? Need this fixed asap Please help…


#12

use the search function on the forums perhaps? and watch the dates on posts.


#13