Jump to content

help me please


Recommended Posts

This for build car

--Server Side

function checkAccess(thePlayer)
   if isPlayerInACL(thePlayer, "") then
      local veh = createVehicle(vehid, x, y, z, 0, 0, rotz)
      if (veh) then
     outputChatBox("Done")
     end
  else
      outputChatBox("Access Denied!")
   end
end
addCommandHandler("createveh", checkAccess

And This for Enter car
--Server Side
 

vehs = { [598]=true, [596]=true, [597]=true, [599]=true }

function enterVehicle ( theVehicle, seat, jacked ) --when a player enters a vehicle
    if ( vehs[getElementModel ( theVehicle )] ) and ( not isPlayerInACL(source, "") ) then -- if the vehicle is one of 4 police cars, and the skin is not a police skin
        removePedFromVehicle ( source ) -- force the player out of the vehicle
    end
end
addEventHandler ( "onPlayerVehicleEnter", getRootElement(), enterVehicle )

Source :
https://wiki.multitheftauto.com/wiki/OnPlayerVehicleEnter

https://wiki.multitheftauto.com/wiki/IsPlayerInACL

Link to post

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