[Release] Delete Vehicle Script [v1.1.0] (Updated 2020)

“That error has nothing to do with this script, it’s referencing the stringSplit method, which my script doesn’t even use.”

Check your other resources, because it isn’t mine, unless you modified it.

1 Like

no i dont, its really weird

Try redownloading and reinstalling the delete vehicle script and see if that helps, otherwise you probably have another script that uses the “dv” part somewhere in their commands which could cause issues.

Well another script doesn’t have to be using the exact same command to throw this error.

@AEGOOD , you probably have another script that hooks into the chatMessage event which is causing this issue.

looks like im gonna have to find out any usage of stringsplit. if i find one what do i change it too

The way you fix that is even tho his script doesnt have it… You still need to add to to the bottom of the server file… I had the same thing and once I added the new Stringsplit then it fixed it

can you add so you can just hit a button to delete vehicle

Add this to the bottom of your client.lua file:

Citizen.CreateThread(function()
	while true do
        if IsControlJustReleased(0, 243) then
            TriggerEvent('wk:deleteVehicle')
        end
        Citizen.Wait(0)
    end
end)

Then in-game press ‘~’ (CheatCodeInput).

1 Like

delveh works but for some reason /dv dont work…

I’m pretty new to all this Server making stuff, and i’m not able to figure out a way for just any player to dv his car …
I’m still learning and looking for alot of stuff, so i’m sorry if its just something stupid to ask lol

i got a problem with your mod i am new to five m modding but this is mij problem

Error running call reference function for resource essentialmode: citizen:/scripting/lua/scheduler.lua:351: server/main.lua:218: attempt to index a nil value (field ‘?’)
stack traceback:
server/main.lua:218: in upvalue ‘ref’
citizen:/scripting/lua/scheduler.lua:337: in function citizen:/scripting/lua/scheduler.lua:336
[C]: in function ‘xpcall’
citizen:/scripting/lua/scheduler.lua:336: in function citizen:/scripting/lua/scheduler.lua:335
pls help me

have same i just don’t use /dv just use /delveh i think, unless u can fix part to do with /dv

1 Like

That is a problem with EssentialMode, not my script.

o do you now how to fix that plz help me

Ask in the EssentialMode thread.

1 Like

Swapping them around won’t make a difference.

1 Like

ok i just rechecked both ways and for some reason i get no errors either way… weird maybe a small update was done or something but ur right, but its works fine now… i don’t know, think somethings sort them self’s out …lol

@WolfKnight179 Have you looked into deleteing ai cars/peds in a range with a command?

No but I can take a look.

not all my players can do this - no permissions,