• Open locked cars with battering ram?
    4 replies, posted
How can i make it so you can open locked cars with a battering ram, as a police officer?
@diff360 I am not good a lua coding so... :c
Then you should look into learning it since chances are you are running a server and the problem with most servers these days is no one goes through the effort of learning it is just config work. Try read through what I am saying and try work out what is going on so you can start learning to code. First of all you will want to add this as a darkrp module and name the folder something like vehicleDoorRam. Then inside this file you will want to add a hook with hook.Add and the hook you will want to be using is a darkRP hook of Hooks/Server/onDoorRamUsed since that is called when the door ram is used by a player. You will then want to add a few checks at the start of the hook like if the entity is a vehicle, if that vehicle is locked, and then if the vehicle is locked you add the Functions/Entity/Server/keysUnLock on the vehicle entity if it turns out the vehicle was locked. Example: hook.Add('onDoorRamUsed', 'fp-unlock-vehicle-on-ram', function(ramWentWell, _, traceTable) if not IsValid(traceTable) then return end if ramWentWell == false then return end traceTable:keysUnLock() end) (Chances are it will not work but am not giving it to you just trying to give you an idea on how it is done.
@BronsonNewto TY, i will try to look into learning LUA
Sorry, you need to Log In to post a reply to this thread.