Problem with my antidote timer
#1

I got a problem with my antidote timer the problem is when you do /antidote it runs the "timer" but problem is people around you will loose the infection to and get the message "You ain't infected any more"

/ANTIDOTE COMMAND:
pawn Код:
if (strcmp(cmd, "/antidote", true) == 0)
    {
      if(Antidote[playerid] >= 1)
            {
       if(gTeam[playerid] == TEAM_ZOMBIE)
      {
      SendClientMessage(playerid,COLOR_WHITE,"Your a ZOMBIE! You cannot use a antidote!");
        }
            GetPlayerName(playerid, sendername, sizeof(sendername));
            format(string, sizeof(string), "* %s takes out a package and looks for a syringe.", sendername);
            ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            format(string, sizeof(string), "* %s takes out the syringe with antidote and injects it into his arm.", sendername);
            ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            SetTimerEx("injectantidote",6000,0,"i",playerid);
            TogglePlayerControllable(playerid,0);
            GameTextForPlayer(playerid, "~b~Injecting antidote", 6000, 3);
      }
      else
      {
      SendClientMessage(playerid,COLOR_RED,"Your antidote syringes is empty! Go search after antidotes!");
        }
      return 1;
     }
AND THE TIMER:
pawn Код:
public injectantidote()
{
   for(new i = 0; i <= MAX_PLAYERS; i++)
  {
            Infected[i] = 0;
            Antidote[i] -= 1;
            TogglePlayerControllable(i,true);
            }
            return 1;
            }
What I want is that the player who does /antidote will only get the message AND the infection away .. Thanks for all help I tried to do Injectionantidote(playerid) and re code the timer to playerid but when I did the /antidote nothing happend .. no unfreeze or infection away..
Thanks for all help I receive!
Reply


Messages In This Thread
Problem with my antidote timer - by Julian2574 - 25.02.2010, 12:17
Re: Problem with my antidote timer - by Rac3r - 25.02.2010, 12:37
Re: Problem with my antidote timer - by Julian2574 - 25.02.2010, 12:50
Re: Problem with my antidote timer - by Julian2574 - 25.02.2010, 19:03
Re: Problem with my antidote timer - by Julian2574 - 26.02.2010, 09:42

Forum Jump:


Users browsing this thread: 1 Guest(s)