17.03.2013, 01:33
(
Последний раз редактировалось Vytixz; 20.03.2016 в 00:40.
)
dasdasdadsa
new MegaJump[MAX_PLAYERS]; //at the top of the script
#define PRESSED(%0) \
(((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
public OnPlayerConnect(playerid)
{
MegaJump[playerid] = 0;
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
MegaJump[playerid] = 0;
return 1;
}
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(MegaJump[playerid] == 1)
{
if(PRESSED(KEY_JUMP))
{
new Float:P[3];
GetPlayerPos(playerid,P[0],P[1],P[2]);
GetPlayerVelocity(playerid,P[0],P[1],P[2]);
SetPlayerVelocity(playerid,P[0],P[1],P[2]+5.0);
}
}
return 1;
}
CMD:megajump(playerid, params[])
{
if(MegaJump[playerid] == 0)
{
//Messages, Sound etc...
MegaJump[playerid] = 1;
}
else if(MegaJump[playerid] == 1)
{
//Messages, Sound etc...
MegaJump[playerid] = 0;
}
return 1;
}