Author Topic: [Resolved] Locking any car  (Read 1061 times)

Steve

  • Guest
[Resolved] Locking any car
« 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)
« Last Edit: 28 04, 2012, 02:55:02 pm by Arran »

Offline K0Killer2

  • Senior Community Member
  • ****
  • Posts: 31
  • Registered: 27/06/2011
    YearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYears
  • Ingame: K0Killer2
Re: Locking any car
« Reply #1 on: 16 02, 2012, 01:26:28 am »
Could be useful when you accidentally unlock a players car.

The Amazonic

  • Guest
Re: Locking any car
« Reply #2 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.

Sprintoch

  • Guest
Re: Locking any car
« Reply #3 on: 18 02, 2012, 08:45:13 am »
Happened for me too, so I'm gonna support this idea.

Offline Gonzalo

  • Honorable
  • *****
  • Posts: 127
  • Lua, C#, PHP, HTML & CSS Developer
  • Registered: 07/10/2011
    YearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYears
  • Group: BNA
  • Ingame: Gonzalo|BNA
  • Squad: SO -Special Ops
Re: Locking any car
« Reply #4 on: 18 02, 2012, 08:57:50 am »
Yes it has happened to me too, could be usefull
Quote
Innovation fuels success