wadsonlucas

Untitled

Jun 3rd, 2018
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. -- CONFIG --
  2.  
  3. -- Allow passengers to shoot
  4. local passengerDriveBy = true
  5.  
  6. -- CODE --
  7.  
  8. Citizen.CreateThread(function()
  9. while true do
  10. Wait(1)
  11.  
  12. playerPed = GetPlayerPed(-1)
  13. car = GetVehiclePedIsIn(playerPed, false)
  14. if car then
  15. if GetPedInVehicleSeat(car, -1) == playerPed then
  16. SetPlayerCanDoDriveBy(PlayerId(), false)
  17. elseif passengerDriveBy then
  18. SetPlayerCanDoDriveBy(PlayerId(), true)
  19. else
  20. SetPlayerCanDoDriveBy(PlayerId(), false)
  21. end
  22. end
  23. end
  24. end)
Add Comment
Please, Sign In to add comment