CIT Forum Index
Ingame Community => News and Updates => Topic started 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
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)
-
Could be useful when you accidentally unlock a players car.
-
Yep. Happened to me often that I accidentally unlocked somebodies car standing next to the one I actually wanted to enter. Would be helpful.
-
Happened for me too, so I'm gonna support this idea.
-
Yes it has happened to me too, could be usefull