16.04.2014, 11:06
So i have problem with my drugs, if player take drugs and rejoin he still on drugs.... also i want to add like if he have taken drugs, and try to take more, it will send a message like "please finish your current drugs before taking more", and when it is finished he can take more, how i can do this
This what i have in my drugs command
This what i have in my drugs command
pawn Код:
DrugTimer[playerid] = SetTimerEx("DrugsE", 1300, 3, "ii", playerid, amount);
public DrugsE(playerid,amount)
{
new Float:hZ;
busyAnim[playerid] = false;
GetPlayerHealth(playerid, hZ);
Deffect[playerid]++;
SetPlayerHealth(playerid, hZ+2);
if(hZ > 100.0) SetPlayerHealth(playerid, 100.0);
if(Deffect[playerid] >= amount) return KillTimer(DrugTimer[playerid]);
return 1;
}
public Busy(playerid, bool:type)
{
if(type == true) { busyAnim[playerid] = true; }
else if(type == false) { busyAnim[playerid] = false; }
return 1;
}