[Help]SuperJump
#1

Код:
#define PRESSED(%0) \
    (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
new SuperJump[MAX_PLAYERS] = 0;
OnPlayerKeysStateChange
Код:
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);
}
OnPlayerCommandText
Код:
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;
		}
	}
What's wrong
Reply


Messages In This Thread
[Help]SuperJump - by .Campionull. - 08.08.2012, 14:10
Re: [Help]SuperJump - by [FSaF]Jarno - 08.08.2012, 14:12
Re: [Help]SuperJump - by .Campionull. - 08.08.2012, 14:23
Re: [Help]SuperJump - by Dan. - 08.08.2012, 14:32
Respuesta: [Help]SuperJump - by Convex - 08.08.2012, 14:41

Forum Jump:


Users browsing this thread: 1 Guest(s)