Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- new EnableBoast[MAX_PLAYERS];
- #if defined FILTERSCRIPT
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print("SpeedBoost By Faour");
- print("--------------------------------------\n");
- return 1;
- }
- public OnFilterScriptExit()
- {
- print("\n--------------------------------------");
- print("Un Loaded Boost By Faour");
- print("--------------------------------------\n");
- return 1;
- }
- #else
- main()
- {
- print("////////////////////////////////////////////////////////////////////////\n");
- print("________________________________________________________________________\n");
- print("/////////\n");
- print("//\n");
- print("//\n");
- print("//\n");
- print("//////// ///////// ///////// / / /////////\n");
- print("// / / / / / / //\n");
- print("// / / / / / / //\n");
- print("// / / / / / / //\n");
- print("// /////////// ///////// ///////// //\n");
- print("________________________________________________________________________\n");
- print("////////////////////////////////////////////////////////////////////////\n");
- print("Speed Boost By Faour = Aloushi");
- }
- #endif
- public OnPlayerSpawn(playerid)
- {
- EnableBoast[playerid] = 0;
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if(!strcmp(cmdtext, "/Boost", true))
- {
- if(EnableBoast[playerid])
- {
- EnableBoast[playerid] = 0; //will enable boast
- SendClientMessage(playerid, 0x924161FF, "[ ! ] Boost Deactivated.");
- }
- else
- {
- EnableBoast[playerid] = 1; //will enable boast
- SendClientMessage(playerid, 0x924161FF, "[ ! ] Boost Activated.");
- }
- 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