28.12.2010, 16:24
pawn Код:
new SuperJumpEnabled[MAX_PLAYERS] = 0;
COMMAND:sjump(playerid, params[])
{
if(IsPlayerVipType(playerid, 2))
{
if(SuperJumpEnabled[playerid] == 0) {
SuperJumpEnabled[playerid] = 1;
SendClientMessage(playerid, COLOR, "[Action] You have enabled super jump. Jump to see the effects! Use /sjump to disable it!");
}
else {
SuperJumpEnabled[playerid] = 0;
SendClientMessage(playerid, COLOR, "[Action] You have disabled super jump. Use /sjump to enable it again!");
}
}
else return SendClientMessage(playerid, ERROR_COLOR, "[Error]: You are not a VIP Gold Member.");
return 1;
}
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if (PRESSED(KEY_JUMP))
{
if(IsPlayerVipType(playerid, 2) && SuperJumpEnabled[playerid] == 1)
{
new
Float:x,
Float:y,
Float:z;
GetPlayerPos(playerid, x, y, z);
SetPlayerPos(playerid, x, y, z + 10.0);
}
}
return 1;
}