15.05.2014, 23:49
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
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;
}