Jump to content

I want to block the Car-Jack!


uniunicorn

Recommended Posts

Hi guys, i edited a little code for anti car-jack script. This script works but i want to block the car-jack while there's a driver. Please Help Me!

 

function checkCarJack(thePlayer, seat, jacked)

   
   if (thePlayer == getLocalPlayer()) and (seat == 0) then
      cancelEvent()
      outputChatBox("[!] #f0f0f0CarJack atmanız yasaklanmıştır!", 255, 0, 0, true)
   end
end
addEventHandler("onClientVehicleStartEnter", getRootElement(), checkCarJack)
 
Link to comment
3 hours ago, uniunicorn said:

I didn't got that, so can you place it to code?

function checkCarJack(thePlayer, seat, jacked)
veh = getPedOccupiedVehicleSeat(jacked)
  
   if jacked and veh == 0 then
      cancelEvent()
      outputChatBox("[!] #f0f0f0CarJack atmanız yasaklanmıştır!", 255, 0, 0, true)
   end
end
addEventHandler("onVehicleStartEnter", getRootElement(), checkCarJack)


server-side

sorry i didnt underst what youre trying

Edited by Furzy
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...