[Release][ESX] ESX_GetOut - Kick players for stealing emergency vehicles! [V1.1]

This code is rather basic but I wrote it because I think some public servers will benefit from it. Sometimes when people steal emergency vehicles, and there is no admin online to kick them, it can’t be properly dealt with - until now. The code could also easily be modified to allow not just police, but EMS and mechanics to enter emergency vehicles as well. This may be necessary because sometimes mechanics need to enter a vehicle in order to repair it properly.
Enjoy!
Also - Thanks to Bo | sharky155 and Captain Sev for helping me test it.

Download: GitHub

Demonstration Video: YouTube Video

Update v1.1 (1/6/19): Updated the script to allow for ambulance and mecano employees to enter the driver seat of emergency vehicles

[11/18/2019] I will no longer be providing support for this script as it is very unoptimized and I don’t have any further interest in optimizing it; also my outlook on the ESX framework has changed quite a bit since then. At this point, I can not recommend the ESX framework in general due to exploits and other concerns.

You can check out my other works here:
Ultimate Vinewood Bowl [YMAP]
[Release] Temporator - A configurable in-game temperature display!
[Release] [ESX] ESX_JobWhitelisting - Whitelist jobs (and ranks!) to certain players!
[Release] [ESX] ESX_SodaMachine - Working in-game soda machines!

11 Likes

Thanks i had some old stuff on my server but im gonna test this out now thanks m8

1 Like

Could you make it wait 3 seconds or something before kicking? Giving a chance to step out right away. Will test later today.

1 Like

great way to destroy RP on server

1 Like

Yes you can. Just add this line before it kicks the player in the client.lua
Citizen.Wait(3000)

Well, I mean, if it’s a public server, and people aren’t permitted to steal police cars, then nobody should be in a police car except police.

Therefore, there isn’t much RP to be done/had just driving around in a police car if you aren’t police anyway lol. Thanks for checking it out though bub

1 Like

Nice release, nothing that i have a use of, but still good for the new servers. :stuck_out_tongue:

2 Likes

Thanks Bro :slight_smile:
I need help
how can i add a one more job and the jobcars in the script ?
i need police and ambulance :slight_smile:

Please check your DMs. I will be happy to walk you through that via Discord voice chat if you’d like

This just make the player get kicked after 3 seconds no chance to walk away.

Citizen.Wait(3000)

I realized after testing it would be a bit more difficult as is to do being the player cannot enter the seat, so no chance to exit before the kicking even it 15 seconds.

Tbh i hate scripts like this. You shouldnt kick people for getting into a car. Yes its illegal, but comon really…

Script doesn’t work

idk what i did wrong

https://youtu.be/Sh8oOSVa2oo?t=1199

Is there away to add ems to this to i tried but didnt get it right

Is there a way to distinguish between npc vehicles and player vehicles?

problem is you get people who dont use common sense because all they wanna do is shitlord cause either there bored or the que is way to long on there main server … if people use common sense then no one would have to worry about the script and getting booted and it becomes a mute point… but since people cant help themselves… you have things like this…

1 Like

esx_antitheft.zip (1.3 KB)

I can’t actually upload anything yet :smiley: So I guess here sits my revision of the “Get Out” mod. Someone removed the kick from server and simply set them not driving, I edited it to have them actually get out of the car, and also set it to only kick from the ambulance or fire truck. This is designed so players can still be put in as well as steal cop cars.

2 Likes

I mean…but ruin it for everybody who wants to RP police impersonation or theft of a police vehicle seriously?

That seems kind of a low blow and even though the script does have its purpose, a good one might I add I can also see why people dislike it.

can you get a way of put people handcuffed in car ? :stuck_out_tongue: Police ex

Nice one dude, I love it!!

For who want to add a notification when you get out of the car just add this to server.lua :

RegisterServerEvent('GetOut:EmergencyVehicle')
AddEventHandler('GetOut:EmergencyVehicle', function()
	TriggerClientEvent('esx:showNotification', source, 'You ~r~CAN NOT~w~ use emergency vehicles!')
end)

and this in client.lua after line 23:

TriggerServerEvent("GetOut:EmergencyVehicle")

1 Like

When i use Police car mod, i can still use it normally when I am not a police, there is a way to fix it with a mod car?