Guest User

JaTochNietDan

a guest
Aug 20th, 2009
2,466
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.92 KB | None | 0 0
  1. /*
  2.     By JaTochNietDan with help from Killerkid
  3. */
  4.  
  5. #include <a_samp>
  6.  
  7. forward Speedboost();
  8.  
  9. public OnFilterScriptInit()
  10. {
  11.     SetTimer("Speedboost",200,1);
  12.     return 1;
  13. }
  14.  
  15. public Speedboost()
  16. {
  17.     for(new i; i < MAX_PLAYERS; i++)
  18.     {
  19.             if(IsPlayerConnected(i) && !IsPlayerNPC(i))
  20.             {
  21.                 new Keys,up,down;
  22.                 GetPlayerKeys(i,Keys,up,down);
  23.             if(Keys &= 1024)
  24.             {
  25.                 if(GetPlayerState(i) == PLAYER_STATE_ONFOOT)
  26.                 {
  27.                     new Float:x,Float:y,Float:z;
  28.                     GetPlayerVelocity(i,x,y,z);
  29.                     SetPlayerVelocity(i,x+(x / 4),y+(y / 4),z+(z / 4));
  30.                 }
  31.             }
  32.             GetPlayerKeys(i,Keys,up,down);
  33.             if(Keys &= 4)
  34.                 {
  35.                     if(GetPlayerState(i) == PLAYER_STATE_DRIVER)
  36.                 {
  37.                     new Float:x,Float:y,Float:z;
  38.                     GetVehicleVelocity(GetPlayerVehicleID(i),x,y,z);
  39.                     SetVehicleVelocity(GetPlayerVehicleID(i),x+(x / 4),y+(y / 4),z+(z / 4));
  40.                 }
  41.             }
  42.         }  
  43.     }
  44.     return 1;
  45. }
Advertisement
Add Comment
Please, Sign In to add comment