Command needed to do other command
#2

you hsould create a variable like..
pawn Код:
new holdingDrugs[MAX_PLAYERS];//on top of script under include a_samp
next you need to assign a value to that when a player buys drugs. Do
pawn Код:
holdingDrugs[playerid] += 1; // or any other vaue. you can use strtok to set it then it would be... holdingDrugs[playerid] += tmp; or something like it.
Now to use drugs you do
pawn Код:
if(holdingDrugs[playerid] > 0) { /* do what happens when he uses the drugs and dont forget to reduce the holdingDrugs */ holdingDrugs[playerid] --;}
else { /* do here what message he/she hsould get when he doesn't have drugs. */}
hope it helped!
Reply


Messages In This Thread
Command needed to do other command - by TehNobody - 01.06.2009, 06:25
Re: Command needed to do other command - by Ignas1337 - 01.06.2009, 06:38
Re: Command needed to do other command - by TehNobody - 01.06.2009, 07:35
Re: Command needed to do other command - by Castle - 01.06.2009, 07:40
Re: Command needed to do other command - by TehNobody - 01.06.2009, 07:47
Re: Command needed to do other command - by Castle - 01.06.2009, 08:05
Re: Command needed to do other command - by TehNobody - 01.06.2009, 08:06
Re: Command needed to do other command - by TehNobody - 01.06.2009, 08:28
Re: Command needed to do other command - by Think - 01.06.2009, 08:59
Re: Command needed to do other command - by TehNobody - 01.06.2009, 09:01

Forum Jump:


Users browsing this thread: 1 Guest(s)