05.03.2013, 18:16
Try this. since im using this way to make a recently command if its only 1 command
pawn Код:
new HasUsedThisCommandRecently[ MAX_PLAYERS ];
forward Klevar(playerid);
public Klevar(playerid)
{
HasUsedThisCommandRecently[playerid] =0;
return 1;
}
CMD:klevar(playerid,params[])
{
if(pInfo[playerid][pVipLevel] < 2)
return SendClientMessage(playerid,-1,""chat""COL_LGREEN" [ERROR]: You are not an V.I.P!");
if(HasUsedThisCommandRecently[playerid] == 1)
return SendClientMessage(playerid, -1,"You have used this command recently");
if(team[playerid] == TEAM_HUMAN)
{
new Float:armor;
GetPlayerArmour(playerid,armor);
if(team[playerid] == TEAM_HUMAN)
{
if(armor >= 95)return SendClientMessage(playerid,-1,""chat" You have enough armour to survive.");
SetPlayerArmour(playerid,armor+25);
new string[18];
format(string, sizeof(string), "~w~+25 Armour");
GameTextForPlayer(playerid,string,4000,1);
new str[480];
format(str,sizeof(str),""chat""COL_YELLOW" [VIP]%s used an {99FFFF}SURVIVAL PACK to get +25 ARMOUR",PlayerName(playerid));
SendClientMessageToAll(-1,str);
SetTimerEx("Klevar",15000,0,"i",playerid);//no repeat
HasUsedThisCommandRecently[playerid] =1;
}
}
return 1;
}