Jump to content

Fast Please "CAR OWNERSHIP"!


xScatta

Recommended Posts

Posted (edited)

Hey guys i maked his script error below

CODE REMOVED

But when the player dont have owner serial he still can drive the vehicle.

no messages in debugscript 3.

Edited by Guest
Posted

If you don't want him to bump, then why don't you try to help him?

Try this anyway:

vehicles = {} 
  
addCommandHandler("vehicle", 
    function(player,vehicle,car) 
        local x, y, z = getElementPosition(player) 
        player = getPlayerSerial(player) 
        vehiclex = createVehicle(getVehicleModelFromName(car), x, y+2, z) 
        vehicles[vehiclex] = player 
    end) 
  
addEventHandler("onVehicleEnter", root, 
    function(playerx, seat) 
        if vehicles [ source ] == getPlayerSerial ( playerx ) and seat == 0 then 
            setVehicleEngineState(source, true) 
        elseif seat == 0 then 
            outputChatBox("You can't drive this vehicle.", playerx) 
            setVehicleEngineState(source, false) 
        end       
    end) 

  • Like 1

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...