Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- ===================================================
- =================High Jump fS======================
- ===================================================
- | |
- Created By: Zayan
- Created On: 13/02/2013 [20:34:21]
- Created By Using: Pawn compiler 3.2.3664 (PAWNO)
- Thanks To: SA-MP for functions & more
- If you find any bug, please report it with a photo.
- */
- #include <a_samp>
- #define INFINITY \
- (Float:0x7F800000) // this define was added in V-0.3 | Comment added in (V-0.3)
- new
- IsMad[MAX_PLAYERS]; // Dont edit or remove it | Comment added in (V-0.2)
- new
- Float:ghp; // This line is for ythe
- new
- Float:health;
- public OnFilterScriptInit()
- {
- print("\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
- print(" High Jump Filter Script by Zayan \nIf you find any bug, please report on www.sa-mp.com");
- print("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n");
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- IsMad[playerid] = 0; // This was very important, added in V-0.3 | Comment was added in (V-0.3)
- ShowInfo(playerid);
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if(strcmp("/setjumppower", cmdtext, true, 10) == 0)
- {
- if(IsMad[playerid] == 0)
- {
- if(!IsPlayerAdmin(playerid)) return ReturnErrMsg(playerid);
- SendClientMessage(playerid, 0xFFBBCC, "* Jump power: ON");
- IsMad[playerid] = 1;
- SetPlayerHealth(playerid, INFINITY); // This function was added in V-0.3 | Comment added in (V-0.3)
- return 1;
- }
- else if(IsMad[playerid] == 1)
- {
- if(!IsPlayerAdmin(playerid)) return ReturnErrMsg(playerid);
- SendClientMessage(playerid, 0xFFBBDD, "* Jump power: OFF");
- IsMad[playerid] = 0;
- SetPlayerHealth(playerid, 100); // This line was added in V-0.3 | Comment was added in (V-0.3)
- return 1;
- }
- return 1;
- }
- return 0;
- }
- public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
- {
- if(newkeys & KEY_JUMP) // you can change KEY_JUMP to any key name e.g: KEY_FIRE (left mouse button) | KEY_SPRINT (space key) & more | Comment added in (V-0.2)
- {
- if(IsMad[playerid] == 1)
- {
- new Float:X;
- new Float:Y;
- new Float:Z;
- GetPlayerPos(playerid, X,Y,Z);
- GetPlayerHealth(playerid, ghp);
- CreateExplosion(X,Y,Z-2,7,6);
- SetPlayerHealth(playerid, ghp);
- SetPlayerHealth(playerid, INFINITY);
- }
- }
- return 1;
- }
- public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
- {
- if(playerid != INVALID_PLAYER_ID)
- {
- if(IsMad[playerid] == 1)
- {
- SetPlayerHealth(playerid, INFINITY);
- GetPlayerHealth(playerid,health);
- if ( health < 19.9 ) // This line was added in V-0.3 | This was added for a health bug fix | Comment was added in (V-0.3)
- {
- SetPlayerHealth(playerid, INFINITY);
- }
- }
- }
- return 1;
- }
- stock ShowInfo(playerid) // dont remove it ;C | Comment added in (V-0.2)
- {
- GameTextForPlayer(playerid, "This server is running~n~High jump fs by zayan", 7000, 4);
- }
- stock ReturnErrMsg(playerid) // new function added in (V-0.2) * it returns a error message of "You are not a RCON admin!" | e.g: if(!IsPlayerAdmin(playerid)) return ReturnErrMsg(playerid) | Comment added in (V-0.2)
- {
- return SendClientMessage(playerid, 0xFFBBAA, "You are not a RCON admin!");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement