CIT Forum Index

Ingame Community => News and Updates => Topic started by: Steve on 14 02, 2012, 06:58:12 am

Title: [Resolved] Locking any car
Post by: Steve on 14 02, 2012, 06:58:12 am
Well, this could be used for when you're in a friends car or something and they are AFK, idk. Maybe for higher staff that can spawn cars. Anyways, I put it below. I know you could just cancelEvent for a player entering a vehicle that has a staff in it, but then no player could enter the vehicle you're in even if you wanted them too. :P

Pointless, yes, but who cares lol.

Don't hate on my indentation/spacing Arran <_<
I did it to solve any time wasting in typing it out for you. Code seems fine, can just add it :P

Code: [Select]
function lockCar(player, command)
if (getTeamName(getPlayerTeam(player)) ~= "Staff") then return end
local veh = getPedOccupiedVehicle(player)
if veh then setVehicleLocked(veh, true)
outputChatBox("Your staff has locked the "..getVehicleName(veh)..".",player,0,255,0)
end
end
addCommandHandler("lc", lockCar)
Title: Re: Locking any car
Post by: K0Killer2 on 16 02, 2012, 01:26:28 am
Could be useful when you accidentally unlock a players car.
Title: Re: Locking any car
Post by: The Amazonic on 18 02, 2012, 03:46:31 am
Yep. Happened to me often that I accidentally unlocked somebodies car standing next to the one I actually wanted to enter. Would be helpful.
Title: Re: Locking any car
Post by: Sprintoch on 18 02, 2012, 08:45:13 am
Happened for me too, so I'm gonna support this idea.
Title: Re: Locking any car
Post by: Gonzalo on 18 02, 2012, 08:57:50 am
Yes it has happened to me too, could be usefull