Drugs help
#5

Quote:
Originally Posted by Jordan69
Quote:
Originally Posted by ilikepie2221
Use SetTimerEx when they sell drugs, and make a variable to save the seconds that have passed. For example:

pawn Код:
new
   drugstimer[MAX_PLAYERS];
   drugtimer;

forward SellDrugTimer(playerid);

public OnPlayerCommandText(playerid, cmdtext[])
{
  if(strcmp("/selldrugs",cmdtext,true) == 0)
  {
    if(drugstimer[playerid] == 0)
    {
      // Code to sell the drug
      drugtimer = SetTimerEx("SellDrugTimer",1000,true,playerd);
      return 1;
    }
    if(drugstimer[playerid] >= 1)
    {
      SendClientMessage(Well, yeah);
      return 1;
    }
 }
 return 0;
}

public SellDrugTimer(playerid)
{
  if(drugstimer[playerid] => 1)
    drugstimer[playerid] -= 1;
  if(drugstimer[playerid] == 1)
    KillTimer(drugtimer);
  return 1;
}
Well I added it, now I get 14 errors. BTW, Im using GF edit.. so Im really confuzed, .
He was just giving you an example, post your /selldrugs command & i'll add it.
Reply


Messages In This Thread
Drugs help - by Jordan69 - 14.10.2009, 22:53
Re: Drugs help - by ilikepie2221 - 14.10.2009, 23:02
Re: Drugs help - by Jordan69 - 14.10.2009, 23:16
Re: Drugs help - by ilikepie2221 - 14.10.2009, 23:30
Re: Drugs help - by Abernethy - 14.10.2009, 23:36
Re: Drugs help - by Jordan69 - 15.10.2009, 00:20
Re: Drugs help - by Abernethy - 15.10.2009, 00:36
Re: Drugs help - by Matthew_Murdoch - 15.10.2009, 10:32

Forum Jump:


Users browsing this thread: 1 Guest(s)