ViRuZGamiing Posted February 1, 2014 Posted February 1, 2014 Hi, This is my code policeVehicles = { [598]=true, [596]=true, [597]=true, [599]=true, [427]=true, [525]=true, [523]=true } policeSkins = { [280]=true, [281]=true, [282]=true, [283]=true, [284]=true, [285]=true, [286]=true } function enterVehicle ( thePlayer, seat, jacked ) if ( policeVehicles[getElementModel ( source )] ) and ( not policeSkins[getElementModel ( thePlayer )] ) then removePedFromVehicle ( thePlayer ) outputChatBox ( "Access Denied, employees only!", thePlayer ) end end addEventHandler ( "onVehicleEnter", getRootElement(), enterVehicle ) I'm assuming that i would be kicked out of the car too when I'm in the backseat, How can I set only removePedFromVehicle on Driver seat? "If debugging is the process of removing software bugs, then programming must be the process of putting them in."
ViRuZGamiing Posted February 1, 2014 Author Posted February 1, 2014 Fixed it myself, sry policeVehicles = { [598]=true, [596]=true, [597]=true, [599]=true, [427]=true, [525]=true, [523]=true } policeSkins = { [280]=true, [281]=true, [282]=true, [283]=true, [284]=true, [285]=true, [286]=true } function enterVehicle ( thePlayer, seat, jacked ) if ( policeVehicles[getElementModel ( source )] ) and ( not policeSkins[getElementModel ( thePlayer )] ) and ( getPedOccupiedVehicleSeat (thePlayer) == 0) then removePedFromVehicle ( thePlayer ) outputChatBox ( "Access Denied, employees only!", thePlayer ) end end addEventHandler ( "onVehicleEnter", getRootElement(), enterVehicle ) "If debugging is the process of removing software bugs, then programming must be the process of putting them in."
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now