Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Please don't remove the credits :)
- #include <a_samp>
- new EnableBoast[MAX_PLAYERS];
- #if defined FILTERSCRIPT
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print("Speed Boost By 1Geek");
- print("--------------------------------------\n");
- return 1;
- }
- public OnFilterScriptExit()
- {
- print("\n--------------------------------------");
- print("Speed Boost By 1Geek");
- print("--------------------------------------\n");
- return 1;
- }
- #else
- main()
- {
- print("////////////////////////////////////////////////////////////////////////\n");
- print("________________________________________________________________________\n");
- print("/////////\n");
- print("//\n");
- print("//\n");
- print("//\n");
- print("1Geek :P / ///////// / 1Geek :P\n");
- print("// / / / / //\n");
- print("// / / / / //\n");
- print("// / / / / //\n");
- print("// ///////// ///////// ///////// //\n");
- print("________________________________________________________________________\n");
- print("////////////////////////////////////////////////////////////////////////\n");
- print(" Speed Boost By 1Geek ");
- }
- #endif
- public OnPlayerSpawn(playerid)
- {
- EnableBoast[playerid] = 0;
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if(IsPlayerAdmin(playerid))
- if(!strcmp(cmdtext, "/Boost", true))
- {
- if(EnableBoast[playerid])
- {
- EnableBoast[playerid] = 0;
- SendClientMessage(playerid, 0x924161FF, "!!!Boost Deactivated.!!!");
- }
- else
- {
- EnableBoast[playerid] = 1;
- SendClientMessage(playerid, 0x924161FF, "!!! Boost Activated. Press LALT and MAJ for Speed / Jump");
- }
- return 1;
- }
- return 0;
- }
- public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
- {
- if (IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
- {
- if(newkeys & KEY_FIRE)
- {
- if(EnableBoast[playerid] == 1)
- {
- new Float:vx,Float:vy,Float:vz;
- GetVehicleVelocity(GetPlayerVehicleID(playerid),vx,vy,vz);
- SetVehicleVelocity(GetPlayerVehicleID(playerid), vx * 1.8, vy *1.8, vz * 1.8);
- }
- }
- }
- if (IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
- {
- if (newkeys & KEY_CROUCH)
- {
- if(EnableBoast[playerid] == 1)
- {
- new Float:x, Float:y, Float:z;
- GetVehicleVelocity(GetPlayerVehicleID(playerid),x,y,z);
- SetVehicleVelocity(GetPlayerVehicleID(playerid),x,y,z+0.3);
- }
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement