I need help with one thing (8
#1

Okayy here again.... I have drug system and I've done /depositdrug command and I wondering how I can set the drugs amount to 0 in "bag"..... must I make dini file for player carrying amount or how I can do it? XD heres the command (8

pawn Код:
CMD:depositdrugs(playerid,params[])
{
new file[100],Name[MAX_PLAYER_NAME],Ip[16]; GetPlayerName(playerid,Name,sizeof(Name)); GetPlayerIp(playerid,Ip,sizeof(Ip)); format(file,sizeof(file),PlayerFile,Name);
new instack;
if(!IsPlayerInRangeOfPoint(playerid,15.0,  1286.2813, -1329.3278, 13.5526)) return SendClientMessage(playerid,0x38FF06FF,"ERROR : You Have To Be In DH");
else if(sscanf(params,"d",instack)) return SendClientMessage(playerid,0x38FF06FF,"USAGE : /deposit [Amount]");
else if(instack < Pinfo[playerid][Instack]) return SendClientMessage(playerid,0x38FF06FF,"ERROR : You Don't Have That Amount In Drug Bag!");
{
Pinfo[playerid][Instack] += instack;
new string[128];
format(string,sizeof(string),"SERVER : You Have Deposited %d g drugs",instack);
SendClientMessage(playerid,LIGHTGREEN,string);
dini_IntSet(file,"Instack",Pinfo[playerid][Instack]);
}
Reply
#2

Yes make a new enum for his bag and then make it 0 .
Reply
#3

okayy thx mate!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)