Command doesn't remove the value
#1

I am making a pot smoking system but when i smoke it i don't lose the pots from my saving system i have checked everything in the saving system but everything seems to be fine also my animation doesn't work at all i am trying to make a animation that he will loop once but i cant seem to find the answer.

here is my code
pawn Код:
CMD:use(playerid,params[])
{
    new option[20],string[128];
    if(sscanf(params, "s[20]", option))
    {
        SendClientMessage(playerid,-1,"Available Options: pot,crack,materials,meth,heroin,radio,coldmeds.");
        SendClientMessage(playerid,-1,"Available Options: acid,seeds,pizza.");
        return 1;
    }
    if(!strcmp(option, "pot", true))
    {
        if(CantSmokePots[playerid] >= 1)
        {
            SendClientMessage(playerid,-1,"You already smoked some pots, please wait before doing it again.");
            return 1;
        }
        if(pInfo[playerid][pPot] == 0)
        {
           SendClientMessage(playerid,-1,"You don't have any pots to smoke..");
           return 1;
        }
        pInfo[playerid][pPot] -= 2;
        AddHealth(playerid,20);
        ApplyAnimation(playerid,"FOOD","EAT_burger",4.1,-1,-1,-1,-1,-1,-1);
        SendClientMessage(playerid,-1,"You have smoked 2 grams of pot.");
        format(string,sizeof(string),"*%s started to smoke some pots.",GetName(playerid));
        SendMessageToAllClosePlayers(playerid,COLOR_PURPLE,string);
        CantSmokePots[playerid] = 20;
        return 1;
    }
    if(!strcmp(option, "crack", true))
    {
        return 1;
    }
    return 1;
}
Reply


Messages In This Thread
Command doesn't remove the value - by DarkLored - 15.05.2014, 23:49
Re: Command doesn't remove the value - by yvoms - 15.05.2014, 23:52
Re: Command doesn't remove the value - by DarkLored - 16.05.2014, 00:09
Re : Command doesn't remove the value - by Ramoboss - 16.05.2014, 00:13
Re: Command doesn't remove the value - by DarkLored - 16.05.2014, 00:21
Re : Command doesn't remove the value - by Ramoboss - 16.05.2014, 00:26
Re: Command doesn't remove the value - by DarkLored - 16.05.2014, 00:35
Re: Command doesn't remove the value - by Threshold - 16.05.2014, 00:37
Re: Command doesn't remove the value - by DarkLored - 16.05.2014, 00:47

Forum Jump:


Users browsing this thread: 1 Guest(s)