/take drugs cmd
#5

CMD:givemedrugs(playerid, params[])
{
SendClientMessage(playerid, -1,"You have received 1 drugs");
PlayerInfo[playerid][pHasDrugs]++;
return 1;
}
CMD:takedrugs(playerid, params[])
{
if(PlayerInfo[playerid][pHasDrugs] >= 1)
{
UseDrugs1[playerid] = SetTimerEx("UseDrugs", 1000, true, "i", playerid);
SetTimer("KillUseDrugs", 50000, false);
}
else if(PlayerInfo[playerid][pHasDrugs] >= 0)
{
SendClientMessage(playerid, COL_RED,"You do not have any drugs.");
}
return 1;
}
forward KillUseDrugs(playerid);
public KillUseDrugs(playerid)
{
KillTimer(UseDrugs1[playerid]);
return 1;
}
forward UseDrugs(playerid);
public UseDrugs(playerid)
{
new Float:health;
GetPlayerHealth(playerid,health);
if (health < 10.0)
{
SetPlayerHealth(playerid, 20.0);
}
else if (health > 20.0)
{
SetPlayerHealth(playerid, 25.0);
}
else if (health > 25.0)
{
SetPlayerHealth(playerid, 30.0);
}
else if (health > 30.0)
{
SetPlayerHealth(playerid, 35.0);
}
else if (health > 35.0)
{
SetPlayerHealth(playerid, 40.0);
}
else if (health > 40.0)
{
SetPlayerHealth(playerid, 45.0);
}
else if (health > 45.0)
{
SetPlayerHealth(playerid, 50.0);
}
else if (health > 50.0)
{
SetPlayerHealth(playerid, 55.0);
}
else if (health > 55.0)
{
SetPlayerHealth(playerid, 60.0);
}
else if (health > 60.0)
{
SetPlayerHealth(playerid, 65.0);
}
else if (health > 65.0)
{
SetPlayerHealth(playerid, 70.0);
}
else if (health > 70.0)
{
SetPlayerHealth(playerid, 75.0);
}
else if (health > 75.0)
{
SetPlayerHealth(playerid, 80.0);
}
else if (health > 80.0)
{
SetPlayerHealth(playerid, 85.0);
}
else if (health > 85.0)
{
SetPlayerHealth(playerid, 90.0);
}
else if (health > 90.0)
{
SetPlayerHealth(playerid, 95.0);
}
else if (health > 95.0)
{
SetPlayerHealth(playerid, 100.0);
}
return 1;
}
Reply


Messages In This Thread
/take drugs cmd - by AIMigboboy - 27.07.2013, 02:56
Re: /take drugs cmd - by kartik - 27.07.2013, 02:59
Re: /take drugs cmd - by PrinceKumar - 27.07.2013, 03:43
Re: /take drugs cmd - by Vanter - 27.07.2013, 04:19
Re: /take drugs cmd - by AIMigboboy - 27.07.2013, 22:12
Re: /take drugs cmd - by Ceez - 27.07.2013, 22:19
Re: /take drugs cmd - by AIMigboboy - 28.07.2013, 00:55
Re: /take drugs cmd - by AIMigboboy - 28.07.2013, 03:32
Re: /take drugs cmd - by Vanter - 28.07.2013, 07:16
Re: /take drugs cmd - by Anak - 28.07.2013, 07:25

Forum Jump:


Users browsing this thread: 1 Guest(s)