Guest User

comanda /speed

a guest
Jan 21st, 2019
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.08 KB | None | 0 0
  1. CMD:speed(playerid, params[])
  2. {
  3. if(PlayerInfo[playerid][pAdmin] >= 6)
  4. {
  5. if(SpeedBoost[playerid])
  6. {
  7. SpeedBoost[playerid] = 0; // aici e dezactivat
  8. SCM(playerid, COLOR_RED, "[Speed Boost]Ai dezactivat comanda pentru Speed Boost");
  9. }
  10. else
  11. {
  12. SpeedBoost[playerid] = 1; // aici e activat
  13. SCM(playerid, COLOR_GREEN, "[Speed Boost]Ai activat comanda pentru Speed Boost");
  14. }
  15. }
  16. return 1;
  17. }
  18. Si asta
  19. new SpeedBoost[MAX_PLAYERS];
  20. if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
  21. {
  22. if(PlayerInfo[playerid][pAdmin] >= 6)
  23. {
  24. if(newkeys & KEY_FIRE)
  25. {
  26. if(SpeedBoost[playerid] == 1)
  27. {
  28. new Float:vx, Float:vy, Float:vz;
  29. GetVehicleVelocity(GetPlayerVehicleID(playerid), vx, vy, vz);
  30. SetVehicleVelocity(GetPlayerVehicleID(playerid), vx * 1.8, vy *1.8, vz * 1.8);
  31. }
  32. }
  33. }
  34. }
Advertisement
Add Comment
Please, Sign In to add comment