I want to make a system that player avoid from using every car, the problem is, that i want that this system only works for the door 0 (driver seat) so a player who should not be allowed to enter on the driver's sead atlhought he can enter on the other seats
here is the code i tried it out:
ambulanceVehicles = { [416]=true }
ambulanceSkins = {[274]=true, [276]=true}
doors = {[0]=true}
function enterAmbulanceVehicle ( player, seat, jacked, door )
if ( ambulanceVehicles[getVehicleID ( source )] ) and ( not ambulanceSkins[getPlayerSkin ( player )] ) and if (doors[ then
[color=#BF0000]if door == 0[/color]
cancelEvent()
outputChatBox ( "Du darfst dieses vehicle nicht benutzen!", player, 255, 255, 255, true)
end
end
end
addEventHandler ( "onVehicleStartEnter", getRootElement(), enterAmbulanceVehicle )