policeVehicle = createVehicle ( 426, 2418.4436035156, 85.328956604004, 26.292650222778, 0, 0, 90 )
setElementData(policeVehicle,"vehicle","police")
policeSkins = { [286]=true,[288]=true }
medicVehicle = createVehicle ( 426, 2401.4436035156, 76.328956604004, 25.292650222778, 0, 0, 90 )
setElementData(medicVehicle,"vehicle","medic")
medicSkins = { [275]=true,[277]=true }
function enterVehicle ( player, seat, jacked )
if (getElementData(source, "vehicle" ) == "police") and ( not policeSkins[getElementModel( player )] ) then
outputChatBox ( "You're not a cop!", player )
cancelEvent()
end
if (getElementData(source, "vehicle" ) == "medic") and ( not medicSkins[getElementModel( player )] ) then
outputChatBox ( "You're not a medic!", player )
cancelEvent()
end
end
addEventHandler ( "onVehicleStartEnter", getRootElement(), enterVehicle )