Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Kangaroo script by Zombie Nest //
- // Enjoy jumping like a se** kangaroo //
- /*
- ===================================================
- | Defines |
- ===================================================
- */
- #define COLOR_YELLOW 0xFFFF00AA
- #define PRESSED(%0) \
- (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
- #define deactivatedskin 283
- #define kangarooskin 0
- /*
- ===================================================
- | Includes |
- ===================================================
- */
- #include <a_samp>
- #include <zcmd>
- #include <sscanf2>
- /*
- ===================================================
- | Variables |
- ===================================================
- */
- new kangaroo[MAX_PLAYERS];
- new permitted[MAX_PLAYERS];
- /*
- ===================================================
- | Forwards |
- ===================================================
- */
- forward OnPlayerJoinWhenFSLoaded(playerid);
- /*
- ===================================================
- | Script Callbacks |
- ===================================================
- */
- public OnPlayerConnect(playerid)
- {
- new Float:x, Float:y, Float:z;
- SendClientMessage(playerid,-1,"This server is using Kangaroo system, /kangaroo to activate");
- kangaroo[playerid] = 0;
- SendClientMessage(playerid,COLOR_YELLOW,"Do not use any commands for 1 seconds please");
- GetPlayerVelocity(playerid,Float:x,Float:y,Float:z);
- SetPlayerVelocity(playerid,Float:x,Float:y*0.9,Float:z+1.5* 0.9);
- TogglePlayerControllable(playerid, 0);
- SetTimer("OnPlayerJoinWhenFSLoaded", 1000, false);
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- kangaroo[playerid] = 0;
- SendClientMessage(playerid,COLOR_YELLOW,"Kangaroo mode is automatically disabled");
- return 1;
- }
- public OnPlayerJoinWhenFSLoaded(playerid)
- {
- kangaroo[playerid] = 0;
- SendClientMessage(playerid,COLOR_YELLOW," Loading the game..");
- //SendClientMessage(playerid,COLOR_YELLOW," Permitting you to use /kangaroo..");
- //permitted[playerid] = 1;
- SendClientMessage(playerid,COLOR_YELLOW,"Thanks for playing, You can now start");
- TogglePlayerControllable(playerid, 1);
- return 1;
- }
- public OnFilterScriptInit()
- {
- print("=======================================");
- print("|Kangaroo System by Zombie Nest |");
- print("|Be a kangaroo and high jump!/kangaroo|");
- print("=======================================");
- return 1;
- }
- public OnFilterScriptExit()
- {
- print("Kangaroo system unloaded");
- return 1;
- }
- /*
- ===================================================
- | Script Commands |
- ===================================================
- */
- CMD:kangaroo(playerid)
- {
- if(permitted[playerid] == 1)
- {
- if(kangaroo[playerid] == 0)
- {
- kangaroo[playerid] = 1;
- SendClientMessage(playerid,COLOR_YELLOW,"Kangaroo mode activated JUMP to high jump");
- SetPlayerChatBubble(playerid, "Kangaroo - 250 HP - High Jump - Kill me!", 0xFF0000FF, 500.0, 9999999);
- SetPlayerHealth(playerid,250);
- ResetPlayerWeapons(playerid);
- SetPlayerHealth(playerid,250);
- SetPlayerSkin(playerid,kangarooskin);
- SetPlayerAttachedObject(playerid, 0, 19314, 2, 0.1089, 0.0000, 0.0000, -5.4999, -8.3000, -2.8999, 1.0000, 1.0000, 1.0000, 0, COLOR_YELLOW);
- SetPlayerAttachedObject(playerid, 7, 19515, 1, 0.0740, 0.0509, 0.0000, 0.0000, 0.0000, 0.0000, 1.0000, 1.0000, 1.0000, 0, COLOR_YELLOW);
- SetPlayerAttachedObject(playerid, 2, 19514, 2, 0.1000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 1.0000, 1.0000, 1.0000, 0, COLOR_YELLOW);
- SetPlayerAttachedObject(playerid, 3, 2041, 6, 0.1790, 0.0000, 0.0819, 4.2999, -0.8999, 82.6000, 1.0000, 1.0000, 1.0000, 0, COLOR_YELLOW);
- SetPlayerAttachedObject(playerid, 4, 2041, 5, 0.2440, 0.0179, -0.0419, 134.5999, 0.0000, 84.9000, 1.0000, 1.0000, 1.0000, 0, COLOR_YELLOW);
- SetPlayerAttachedObject(playerid, 5, 2590, 1, -0.5350, -0.1229, -0.1779, 0.0000, -107.1999, 3.4999, 1.0000, 1.0000, 1.0000, 0, COLOR_YELLOW);
- SetPlayerAttachedObject(playerid, 6, 2589, 1, -4.7890, -0.0979, 0.3429, 0.0000, -86.7000, 0.0000, 1.0000, 1.0000, 1.0000, 0, COLOR_YELLOW);
- SetPlayerAttachedObject(playerid, 1, 18963, 2, 0.101, -0.0, 0.0, 5.50, 84.60, 83.7, 1, 1, 1, COLOR_YELLOW);
- SetPlayerHealth(playerid, 250);
- return 1;
- }
- else
- {
- kangaroo[playerid] = 0;
- SetPlayerChatBubble(playerid, " ", 0xFF0000FF, 0.0, 1000);
- SetPlayerHealth(playerid,100);
- SetPlayerSkin(playerid,deactivatedskin);
- SendClientMessage(playerid,-1,"Kangaroo mode deactivated");
- RemovePlayerAttachedObject(playerid, 0);
- RemovePlayerAttachedObject(playerid, 1);
- RemovePlayerAttachedObject(playerid, 2);
- RemovePlayerAttachedObject(playerid, 3);
- RemovePlayerAttachedObject(playerid, 4);
- RemovePlayerAttachedObject(playerid, 5);
- RemovePlayerAttachedObject(playerid, 6);
- RemovePlayerAttachedObject(playerid, 7);
- return 1;
- }
- }
- else
- {
- SendClientMessage(playerid,COLOR_YELLOW,"Sorry you are not permitted to use this cmd");
- return 1;
- }
- }
- CMD:depermit(playerid, params[])
- {
- /*if(isnull(params))
- {
- return SendClientMessage(playerid,COLOR_YELLOW,"USAGE: /depermit [playerid]");
- }*/
- if(IsPlayerAdmin(playerid))
- {
- new target, string[128];
- if (sscanf(params, "d", target)) return SendClientMessage(playerid, 0xFF0000AA,"Usage: /depermit [playerid]");
- format(string, sizeof(string), "{FFFFFF}>> {0033FF}[SYSTEM]{FFFFFF}: An Admin (ID:%d) took ID %d /kangaroo permissions", playerid, target);
- SendClientMessageToAll(0xFFFFFFAA,string);
- format(string, sizeof(string), "{FFFFFF}You de-permitted ID %d from using /kangaroo", target);
- SendClientMessage(playerid,0xFFFFFFAA,string);
- format(string, sizeof(string), "{FFFFFF}Your permission to use /kangaroo has been taken by Admin(ID:%d)", playerid);
- SendClientMessage(target,0xFFFFFFAA,string);
- permitted[playerid] = 0;
- return 1;
- }
- else
- {
- SendClientMessage(playerid,COLOR_YELLOW,"Sorry you are not a RCON Admin.");
- return 1;
- }
- }
- CMD:permit(playerid, params[])
- {
- /*if(isnull(params))
- {
- return SendClientMessage(playerid, COLOR_YELLOW, "USAGE: /permit [playerid]");
- }*/
- if(IsPlayerAdmin(playerid))
- {
- new target, string[128];
- if (sscanf(params, "d", target)) return SendClientMessage(playerid, 0xFF0000AA,"Usage: /permit [playerid]");
- format(string, sizeof(string), "{FFFFFF}>> {0033FF}[SYSTEM]{FFFFFF}: An Admin (ID:%d) permitted ID %d to use /kangaroo", playerid, target);
- SendClientMessageToAll(0xFFFFFFAA,string);
- format(string, sizeof(string), "{FFFFFF}You permitted ID %d to use /kangaroo", target);
- SendClientMessage(playerid,0xFFFFFFAA,string);
- format(string, sizeof(string), "{FFFFFF}You have been permitted to use /kangaroo by Admin(ID:%d)", playerid);
- SendClientMessage(target,0xFFFFFFAA,string);
- permitted[playerid] = 1;
- return 1;
- }
- else
- {
- SendClientMessage(playerid,COLOR_YELLOW,"Sorry you are not a RCON Admin.");
- return 1;
- }
- }
- /*
- ===================================================
- | Key Settings |
- ===================================================
- */
- public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
- {
- if (PRESSED(KEY_JUMP))
- {
- if(kangaroo[playerid] == 1)
- {
- new Float:x,Float:y,Float:z;
- GetPlayerVelocity(playerid,Float:x,Float:y,Float:z);
- SetPlayerVelocity(playerid,Float:x,Float:y*0.9,Float:z+0.9* 0.9);
- return 1;
- }
- }
- return 1;
- }
Add Comment
Please, Sign In to add comment