Advertisement
Guest User

sal

a guest
Dec 11th, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  2. {
  3.  
  4. #define PRESSED(%0) \
  5. (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
  6. #define HOLDING(%0) \
  7. ((newkeys & (%0)) == (%0))
  8.  
  9.  
  10. if(PRESSED(KEY_CROUNCH))
  11. {
  12. if(IsPlayerInRangeOfPoint(playerid, distancia, x, y, z) || IsPlayerInAnyCar(playerid))
  13. { // Ou a variavel do carro caso tenha setado
  14. //Comando pra abrir o portao aki
  15. //axo q criando uma variavel pra verifica se o portao foi fechado ou aberto dps vejo isso
  16. }
  17. }
  18. return 1;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement