Guest User

Untitled

a guest
Jan 23rd, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. public Speedboost() // Speed ALT
  2. {
  3. for(new i; i < MAX_PLAYERS; i++)
  4. {
  5. if(IsPlayerConnected(i) && !IsPlayerNPC(i) && IsPlayerAdmin(i) && IsXLevel(i))
  6. {
  7. new Keys,up,down;
  8. GetPlayerKeys(i,Keys,up,down);
  9. if(Keys &= 1024)
  10. {
  11. if(GetPlayerState(i) == PLAYER_STATE_ONFOOT)
  12. {
  13. new Float:x,Float:y,Float:z;
  14. GetPlayerVelocity(i,x,y,z);
  15. SetPlayerVelocity(i,x+(x / 4),y+(y / 4),z+(z / 4));
  16. }
  17. }
  18. GetPlayerKeys(i,Keys,up,down);
  19. if(Keys &= 4)
  20. {
  21. if(GetPlayerState(i) == PLAYER_STATE_DRIVER)
  22. {
  23. new Float:x,Float:y,Float:z;
  24. GetVehicleVelocity(GetPlayerVehicleID(i),x,y,z);
  25. SetVehicleVelocity(GetPlayerVehicleID(i),x+(x / 4),y+(y / 4),z+(z / 4));
  26. }}}}
  27. return 1;
  28. }f
Add Comment
Please, Sign In to add comment