Kdog549

Untitled

May 16th, 2015
297
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. function entering( thePlayer, seat )
  2. local model = getElementModel ( source )
  3. local factionID = getElementData(getPlayerTeam(thePlayer), "id")
  4. if model == 432 or model == 447 or model == 476 or model == 520 then
  5. if not exports.global:isPlayerHeadAdmin(thePlayer) then
  6. if not (getElementDimension(thePlayer) == 1) then
  7. if not factionID == 238 then
  8. toggleControl ( "vehicle_fire", false )
  9. toggleControl ( "vehicle_secondary_fire", false )
  10. end
  11. end
  12. end
  13. addEventHandler("onClientVehicleEnter", getRootElement(), entering)
  14.  
  15.  
  16. function exiting( thePlayer, seat )
  17. if thePlayer == localPlayer then
  18. local model = getElementModel ( source )
  19. if model == 432 or model == 447 or model == 476 or model == 520 then
  20. toggleControl ( "vehicle_fire", true )
  21. toggleControl ( "vehicle_secondary_fire", true )
  22. end
  23. end
  24. end
  25. addEventHandler("onClientVehicleExit", getRootElement(), exiting)
Advertisement
Add Comment
Please, Sign In to add comment