if(strcmp(cmdtext, "/jetpack", true) == 0)
{
if(PlayerInfo[playerid][pVIP] >= 2)
{
SetPlayerSpecialAction(playerid, 2);
new name[MAX_PLAYER_NAME], string[128];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "O %s pegou jetpack", name);
SendClientMessageToAll(-1, string);
SendClientMessage(playerid, COR_ADMIN, "[BENEFICIARIO]: vOCК PEGOU JETPACK");
SendClientMessage(playerid, COR_ADMIN, "ACESSE NOSSO /FORUM");
SendClientMessage(playerid, COLOR_YELLOW, "[Erro]: VOCE NГO Й BENEFICIARIO VIP");
SendClientMessage(playerid, COLOR_YELLOW, "[Erro]: Acesse NOSSO /FORUM !!");
}
return 1;
}
public OnPlayerKeyStateChange(playerid,newkeys,oldkeys)
{
if(newkeys == KEY_SECONDARY_ATTACK)
{
if(GetPlayerSpecialAction(playerid) == 2)
{
SetPlayerSpecialAction(playerid, 0);
}
}
return 1;
}
public OnPlayerKeyStateChange(playerid,newkeys,oldkeys)
{
if(newkeys == KEY_SECONDARY_ATTACK)
{
if(GetPlayerSpecialAction(playerid) == 2)
{
new Float:Pos[3];
GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
SetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]+0.2);
}
}
return 1;
}
Tente usar isso:
pawn Код:
|
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys & KEY_SECONDARY_ATTACK && !(oldkeys & KEY_SECONDARY_ATTACK))
if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_USEJETPACK)
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_NONE);
return 1;
}