SA-MP Forums Archive
I need help with one thing (8 - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: I need help with one thing (8 (/showthread.php?tid=250618)



I need help with one thing (8 - the_zande - 23.04.2011

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]);
}



Re: I need help with one thing (8 - Tommy_Mandaz - 23.04.2011

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


Re: I need help with one thing (8 - the_zande - 23.04.2011

okayy thx mate!