[Release-Archived] Cops FiveM

anyone got the cuff and forceintovehicle command working? doesnt seem to work for me at all

[EN] Hello, how do we remove the cop on the minimap? We see between cop and I would like to remove it thank you!

[FR] Bonjour, comment on enlève les flic sur la minimap? on ce voit entre flic et je voudrais l’enlever merci !

@yosang : You should be closer for cuff and player must look at the vehicle for forceIntoVehicle

@Patrick47 : You can modify as you want the script in order to disable it :slight_smile:

Thanks for reply, I might have not tested enough with the forceintovehicle now that you say that the player have to be looking at it, will test that later. As for cuffs, it seems work, but not really, I mean the player received this message: You are cuffed, and right after, Freedom! so it doesnt really does it job, any idea why this happens?

How to proceed if you like?

Comment procèder si vous plait ?

@yosang : no ^^ Maybe you have some errors, can you check ?

@Patrick47 :
Just remove this line : https://github.com/Kyominii/Cops_FiveM/blob/master/police/client.lua#L112

@ Kyominii IT DONT WORK IT GIVES AN ERROR I SIGN ON THEN NO MENU THEREvestpolice.lua (11.3 KB)
here the files
and here the error log from in game http://steamcommunity.com/sharedfiles/filedetails/?id=927939502

First : no caps lock ! :rolling_eyes:
Then : give me a working link

where’s the file ? …

Edit : a “end” is missing after “end)”. Next time, please doing a good copy-paste …

There is already an open DataReader associated with this Connection Whuch must be closed first… help ?

It’s from MySQL, it’s a reason why kanersps moved to couchdb I think

@kyominii it works but the uniform dont go on me is that something to do with the code or what

Thank you dude i fixed <3

You’re welcome buddy :slight_smile:

You have to do the same thing with with another model in ServiceOff

@ Kyominii i do have that and there no error just the unifrom wont spawn on my player

function giveUniforme()
Citizen.CreateThread(function()

	local model = GetHashKey("s_m_y_cop_01")
	RequestModel(model)
	while not HasModelLoaded(model) do
		RequestModel(model)
		Citizen.Wait(0)
	end
		
	SetPlayerModel(GetPlayerPed(-1), model)
	SetModelAsNoLongerNeeded(model)
	RemoveAllPedWeapons(GetPlayerPed(-1), true)
	
	GiveWeaponToPed(GetPlayerPed(-1), GetHashKey("WEAPON_NIGHTSTICK"), true, true)
	GiveWeaponToPed(GetPlayerPed(-1), GetHashKey("WEAPON_PISTOL50"), 250, true, true)
	GiveWeaponToPed(GetPlayerPed(-1), GetHashKey("WEAPON_STUNGUN"), true, true)
	GiveWeaponToPed(GetPlayerPed(-1), GetHashKey("WEAPON_PUMPSHOTGUN"), 250, true, true)
    end)
end
function removeUniforme()
	Citizen.CreateThread(function()

	local model = GetHashKey("a_m_y_skater_02")
	RequestModel(model)
	while not HasModelLoaded(model) do
		RequestModel(model)
		Citizen.Wait(0)
	end
		
	SetPlayerModel(GetPlayerPed(-1), model)
	SetModelAsNoLongerNeeded(model)
	RemoveAllPedWeapons(GetPlayerPed(-1), true)
    end)
end
1 Like

Nothing seems to work, tells me that weapons are given but still nothing happens - I’m not using the “Job System” but my own personal created script, could this be why?

EDIT - Added Job System, still doesnt work - nothing happens when being added to cop.

Ok so I tried editing the code to make anybody go in service I have accomplished that by when my person goes on duty he can’t cuff and it tells the person he’s cuffed but he’s not I edited this code here maybe am doing something wrong?
so I edited if(iscop==true) to if(isinservice==true)

make sure youre not running both police and police-elite, I did this mistake myself, dont ask me why xD

Hey @Kyominii I know your busy with everything, You script works great, just a tad issue, occasionally when either people die or use the /copadd or /coprem the blue circles disappear.