Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- By JaTochNietDan with help from Killerkid
- */
- #include <a_samp>
- forward Speedboost();
- public OnFilterScriptInit()
- {
- SetTimer("Speedboost",200,1);
- return 1;
- }
- public Speedboost()
- {
- for(new i; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i) && !IsPlayerNPC(i))
- {
- new Keys,up,down;
- GetPlayerKeys(i,Keys,up,down);
- if(Keys &= 1024)
- {
- if(GetPlayerState(i) == PLAYER_STATE_ONFOOT)
- {
- new Float:x,Float:y,Float:z;
- GetPlayerVelocity(i,x,y,z);
- SetPlayerVelocity(i,x+(x / 4),y+(y / 4),z+(z / 4));
- }
- }
- GetPlayerKeys(i,Keys,up,down);
- if(Keys &= 4)
- {
- if(GetPlayerState(i) == PLAYER_STATE_DRIVER)
- {
- new Float:x,Float:y,Float:z;
- GetVehicleVelocity(GetPlayerVehicleID(i),x,y,z);
- SetVehicleVelocity(GetPlayerVehicleID(i),x+(x / 4),y+(y / 4),z+(z / 4));
- }
- }
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment