/usedrugs problems
#4

Or try this
pawn Код:
if(strcmp(cmdtext, "/usedrugs", true) == 0)
   {
    if(IsPlayerConnected(playerid))
    {
     if(PlayerBoxing[playerid] > 0)
     {
       SendClientMessage(playerid, COLOR_GREY, "  Cant use Drugs while you are fighting !");
       return 1;
     }
     if(PlayerInfo[playerid][pDrugs] > 1)
     {
       PlayerStoned[playerid] += 1;
       if(PlayerStoned[playerid] >= 2) { GameTextForPlayer(playerid, "~w~You are~n~~p~Stoned", 4000, 1); }
       new Float:health;
       GetPlayerHealth(playerid, health);
       if(PlayerInfo[playerid][pDrugPerk] > 0)
       {
         new hp = 2 * PlayerInfo[playerid][pDrugPerk]; hp += 20;
        SetPlayerHealth(playerid, health + hp);
       }
       else
       {
         SetPlayerHealth(playerid, health + 20.0);
       }
       SendClientMessage(playerid, COLOR_GREY, "  2 Drug Grams used !");
       PlayerInfo[playerid][pDrugs] -= 2;
       if(CommandUsed[playerid]) return SendClientMessage(playerid, COLOR_RED, "You must wait 30secounds before using drugs again.");
       {
         CommandUsed[playerid] = -1; // "tab" this one too
         SetTimerEx("resetCmd", 30000, 0, "i", playerid); // "tab" so it gets in the right position
       }
       if(STDPlayer[playerid]==1)
       {
         STDPlayer[playerid] = 0;
         SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You are no longer infected with a STD anymore because of the Drugs !");
       }
       else if(STDPlayer[playerid]==2)
       {
         STDPlayer[playerid] = 1;
         SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You lowered the STD to Chlamydia because of the Drugs !");
       }
       else if(STDPlayer[playerid]==3)
       {
         STDPlayer[playerid] = 2;
         SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You lowered the STD to Gonorrhea because of the Drugs !");
       }
     }
     else
     {
       SendClientMessage(playerid, COLOR_GREY, "  You dont have any Drug Grams left !");
     }
    }//not connected
    return 1;
  }
Reply


Messages In This Thread
/usedrugs problems - by Nexx - 04.08.2009, 15:37
Re: /usedrugs problems - by Buwla - 04.08.2009, 19:45
Re: /usedrugs problems - by JaTochNietDan - 04.08.2009, 20:08
Re: /usedrugs problems - by Buwla - 04.08.2009, 20:29
Re: /usedrugs problems - by Nexx - 05.08.2009, 00:27

Forum Jump:


Users browsing this thread: 1 Guest(s)