Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- ===================================================
- =================High Jump fS======================
- ===================================================
- | |
- Created By: Zayan
- Created On: 12/02/2013 [16:41:58]
- Created By Using: Pawn compiler 3.2.3664 (PAWNO)
- Thanks To: SA-MP for functions & more
- If you find any bug, please report it on with a photo.
- */
- #include <a_samp>
- new IsMad[MAX_PLAYERS];
- new Float:ghp;
- 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)
- {
- 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;
- return 1;
- }
- else if(IsMad[playerid] == 1)
- {
- if(!IsPlayerAdmin(playerid)) return ReturnErrMsg(playerid);
- SendClientMessage(playerid, 0xFFBBDD, "* Jump power: OFF");
- IsMad[playerid] = 0;
- return 1;
- }
- return 1;
- }
- return 0;
- }
- public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
- {
- if(newkeys & KEY_JUMP)
- {
- 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);
- SendClientMessage(playerid, 0xFFBBCC, "NOTE: Press the JUMP_KEY before you hit the ground! (This spam will be removed & the bug will be fixed in the next update)");
- }
- }
- return 1;
- }
- public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
- {
- if(playerid != INVALID_PLAYER_ID)
- {
- if(IsMad[playerid] == 1)
- {
- SetPlayerHealth(playerid, 100);
- }
- }
- return 1;
- }
- stock ShowInfo(playerid) // dont remove it ;C
- {
- GameTextForPlayer(playerid, "This server is running~n~High jump fs by zayan", 7000, 4);
- }
- stock ReturnErrMsg(playerid) // new
- {
- return SendClientMessage(playerid, 0xFFBBAA, "You are not a RCON admin!");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement