16.07.2010, 15:58
pawn Код:
public Smoking(playerid)
{
new Float:fHealth;
new string[180];
GetPlayerHealth(playerid, fHealth);
if (fHealth < 75.00)
{
format(string, sizeof(string), "* %s taps on his cigarrete and finishes it off", GetPlayerNameEx(playerid));
ProxDetector(20.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
IsSmoking[playerid] = 0;
SetPlayerHealth(playerid, fHealth+25);
}
else
{
SendClientMessage(playerid, COLOR_RED, "[Info:] You're health is so good that the cigarrette damages it!");
SetPlayerHealth(playerid, fHealth+10);
IsSmoking[playerid] = 0;
}
return 1;
}