• Lock Car from inside (Cider Roleplay)
    3 replies, posted
Hi guys, i need to no how to lock your car from the inside i looked in the keys weapon but it doesnt have a console command for locking your door/car. i have seen this on many servers and if you look down below you will see my atempt at a code :P
Why would you want to lock it from the inside? Its more practical to lock it from the outside.
Like when you are in the car so people cant hop in
Would it be something along these lines? [CODE] function SWEP:PrimaryAttack() self.Weapon:SetNextPrimaryFire(CurTime() + 1); if (CLIENT) then return; end; if (self.Owner:InVehicle) == 1 then ( ValidEntity(trace.Entity) and ( cider.entity.isDoor(trace.Entity) ) ) then if ( cider.player.hasDoorAccess(self.Owner, trace.Entity) ) then trace.Entity:Fire("lock", "", 0); [/CODE] Thats for lock. i dont code for in vehicle [editline]11:51AM[/editline] where would i add this to test it?
Sorry, you need to Log In to post a reply to this thread.