Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Superpower Filterscript By Guest123
- //
- #include <a_samp>//tnx to sa-mp
- #include <zcmd> //tnx to zeek
- #pragma tabsize 0 // zzz
- //me creator :D
- /*
- (C)2013
- GGGGGGGGGGGGGGGGGGGGGGGG GG GG GGGGGGGGGGGGG GGGGGGG GGGGGGGGGGGGGGGGGGG
- GG GG GG GG GG GG
- GG GG GG GG GG GG
- GG GG GG GG GG GG
- GG GG GG GG GG GG
- GGGGGGGGGGGGGGGGGGGGGGGG GG GG GGGGGGGGGGGGG GG GG
- GG GG GG GG GG GG GG
- GG GG GG GG GG GG GG
- GG GG GG GG GG GG GG
- GGGGGGGGGGGGGGGGGG GG GG GG GG GG GG
- GGGGGGGGGGGGGGGGGG GG GGGGGGGGGGGGGGGGGGG GGGGGGGGGGGGG GGGGGGGG GG 123
- */
- /*
- ==================================================== _________
- RRRR RRRRRR RRRRR RR RRR RRRRRR ++ == | )
- R R R R R R R R R R ++ == | )
- R R R RRRRR R R R R RRRRRR ++++++++++ | )
- RRRR RRRRR R R R R R R ++ == | )
- R R R R R R R R R ++ == | )
- R R RRRRR R R RR R RRRRRR ---------
- ====================================================
- */
- new
- SuperPower[MAX_PLAYERS];
- //tnx to wiki.sa-mp.com
- #define PRESSED(%0) \
- (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
- #define SetPlayerHoldingObject(%1,%2,%3,%4,%5,%6,%7,%8,%9) SetPlayerAttachedObject(%1,MAX_PLAYER_ATTACHED_OBJECTS-1,%2,%3,%4,%5,%6,%7,%8,%9)
- #define StopPlayerHoldingObject(%1) RemovePlayerAttachedObject(%1,MAX_PLAYER_ATTACHED_OBJECTS-1)
- #define IsPlayerHoldingObject(%1) IsPlayerAttachedObjectSlotUsed(%1,MAX_PLAYER_ATTACHED_OBJECTS-1)
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print(" Superpower filterscripts by Guest Loaded|version 0.2 (latest version)");
- print("--------------------------------------\n");
- return 1;
- }
- //auto off superpowers
- public OnPlayerConnect(playerid)
- {
- SuperPower[playerid] = 0;
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- SuperPower[playerid] = 0;
- return 1;
- }
- CMD:superon(playerid,params[])
- {
- if(IsPlayerAdmin(playerid))
- {
- SuperPower[playerid] = 1;
- SetPlayerHealth(playerid,999999.0);//can't die while using superpower lol
- SetPlayerArmour(playerid,999999.0);//can't die while using superpower lol
- SendClientMessage(playerid, -1, "Superpower has been {00ffff}enabled{ffffff}!");
- SetPlayerAttachedObject( playerid, 0, 2976, 15, 0.000000, 0.100000, -0.500000, 0.000000, 0.000000, 0.000000, 1.000000, 1.000000, 1.000000 );
- SetPlayerAttachedObject( playerid, 1, 18688, 5, -0.300000, 0.200000, -1.500000, 0.000000, 0.000000, 0.000000, 1.000000, 1.000000, 1.000000 );
- }
- else SendClientMessage(playerid,-1,"You Must be a RCON administrator to use this command");
- return 1;
- }
- CMD:superoff(playerid,params[])
- {
- if(IsPlayerAdmin(playerid))
- for(new i=0; i<MAX_PLAYER_ATTACHED_OBJECTS; i++)
- {
- SuperPower[playerid] = 0;
- if(IsPlayerAttachedObjectSlotUsed(playerid, i)) RemovePlayerAttachedObject(playerid, i);
- SetPlayerHealth(playerid,100.0);
- SetPlayerArmour(playerid,100.0);
- SendClientMessage(playerid, -1, "Superpower has been {00ffff}enabled{ffffff}!");
- }
- else SendClientMessage(playerid,-1,"You Must be a RCON administrator to use this command");
- return 1;
- }
- public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
- {
- if (PRESSED(KEY_JUMP))
- {
- if(SuperPower[playerid] == 1)
- {
- new
- Float:x,
- Float:y,
- Float:z;
- GetPlayerPos(playerid, x, y, z);
- GetXYInFrontOfPlayer(playerid, x, y, 16);
- SetPlayerPos(playerid, x, y, z+1.0);
- CreateExplosion(x, y, z, 0, 10.0);
- }
- }
- return 1;
- }
- /*
- Tnx To Aryzal
- */
- stock GetXYInFrontOfPlayer(playerid, &Float:x2, &Float:y2, Float:distance)
- {
- new Float:a;
- GetPlayerPos(playerid, x2, y2, a);
- GetPlayerFacingAngle(playerid, a);
- if(GetPlayerVehicleID(playerid))
- {
- GetVehicleZAngle(GetPlayerVehicleID(playerid), a);
- }
- x2 += (distance * floatsin(-a, degrees));
- y2 += (distance * floatcos(-a, degrees));
- }
Advertisement
Add Comment
Please, Sign In to add comment