27.07.2013, 22:12
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;
}
{
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;
}