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

It work ? Where is the text? In game ?

        -- log( "Player is at:\nX: " .. pos.x .. " Y: " .. pos.y .. " Z: " .. pos.z )
        -- log( "Found vehicle?: " .. tostring( DoesEntityExist( vehicle ) ) )

function log( msg )
    Citizen.Trace( "\n[DEBUG]: " .. msg )
end 

Those are for debug purposes only.

how do u make this so only cops/tow can use this command?

You’ll have to implement that yourself into whatever gamemode you want/use.

I dont know when or what happened but this worked fine a few days ago and now nothing… During the few days nothing has been changed in the server or clientside on my end as my server has been shut down for 3 days… This is just out of the blue random error in the log and the script is not working… Any thoughts? (I would post the error from log but I can not expand it long enough to get the error

That’s strange I just tried the script on my server and it worked fine. Send me a screenshot of the console of the error that you can see, might give some clues.

This is what I am seeing. I wish I could stretch the console further but I am not sure I am able to lol When I take the resource out the error goes away.

That says there’s an error creating the resource “server-resources”, not “deleteveh”.

Yeah I just realized that… I had it compiled with other server stuff into one resource and it was working out of that… I have placed it on its own i jut have not had a moment at the PC to check it… If it happens to continue and I get a error for it separately I will post again.

@WolfKnight179 Everything works fine… Must have been something else for some other reason… Thanks

Update 1.0.5

  • Added a check to make sure that the vehicle has actually been deleted - a notification will display if not

Can you add a function where i can put in a steam id as an admin of the script so that person is the only one that can delete a car.

2 Likes

Here you go, just add the steam ids that you want to allow at the top of server.lua.

deleteveh-idauth.zip (2.2 KB)

2 Likes

When you say SteamID, in which format? I’ve tried steam:64 ID here, steam: ID(after 0_0:) here and nothing seems to be working?

Steam64, so steam:0123456789998

It’s your steamID64 converted to hex. I use this website: http://vacbanned.com/engine/check or use rcon and say ‘status’ and look at the online players. It would either be steam:ID or ip:IP depending on how they’re connect and you just copy that and use it.

https://gyazo.com/be000a5a6c86d6891b67925d13133435

does anybody get that error^^

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

1 Like

it only happens when i type /dv

Do you have another script active that uses the same /dv command?

1 Like