Advertisement
Guest User

Untitled

a guest
Aug 25th, 2019
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. -- CST
  2.  
  3.  
  4. -- create a new vehicle
  5. local newcar = createVehicle ( 597, 1024, 1024, 1024 )
  6. -- trunk open
  7. state = setVehicleDoorState ( newcar, 1, 1 )
  8.  
  9. function doesVehicleHaveDoorOpen(vehicle)
  10. local isDoorAjar = false
  11. for i=0,5 do
  12. local doorState = getVehicleDoorState( 597, i)
  13. if doorState == 1
  14. isDoorAjar = true
  15. end
  16. end
  17.  
  18. return isDoorAjar
  19. end
  20.  
  21. function consoleGive ( thePlayer, "m4" , 24, 200 )
  22. local status = giveWeapon ( thePlayer, 24, 200, true ) -- attempt to give the weapon, forcing it as selected weapon
  23. if ( not status ) then -- if it was unsuccessful
  24. outputConsole ( "Failed to give weapon.", thePlayer ) -- tell the player
  25. end
  26. end
  27. addCommandHandler ( "m4", consoleGive )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement