Armour Problem
#6

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;
}
Reply


Messages In This Thread
Armour Problem - by Blackazur - 05.03.2013, 17:49
Re : Armour Problem - by Shidony - 05.03.2013, 17:54
Re: Armour Problem - by Kreatyve - 05.03.2013, 17:54
Re : Armour Problem - by DaRk_RaiN - 05.03.2013, 17:54
AW: Armour Problem - by Blackazur - 05.03.2013, 18:07
Re: Armour Problem - by Patrick - 05.03.2013, 18:16
Re : Armour Problem - by Shidony - 05.03.2013, 18:16
Re: Armour Problem - by Vince - 05.03.2013, 18:38

Forum Jump:


Users browsing this thread: 1 Guest(s)