08.08.2012, 14:10
Код:
#define PRESSED(%0) \ (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0))) new SuperJump[MAX_PLAYERS] = 0;
Код:
if (PRESSED(KEY_JUMP)) { if(SuperJump[playerid] == 0) return 0; new Float:x, Float:y, Float:z; GetPlayerPos(playerid, x, y, z); SetPlayerPos(playerid, x, y, z + 10.0); }
Код:
if(strcmp(cmd, "/superjump", true)==0 || strcmp(cmd, "/sj", true)==0) { if(PInfo[playerid][Level] < 3) return SendClientMessage(playerid,COLOR_YELLOW,"* Sorry, only level 3+ Admins can use the superjump commmand."); if (SuperJump[playerid] == 0) { SendClientMessage(playerid, COLOR_GREEN, "* SuperJump ENABLED..."); SuperJump[playerid] = 1; return 1; } else if(SuperJump[playerid] == 1) { SendClientMessage(playerid, COLOR_RED, "* SuperJump DISABLED"); SuperJump[playerid] = 0; return 1; } }