- เครดิต
- 35
- ความรู้
-
- เงิน $
-
- ความดี
-
|
forward OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid);
public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid)
{
new s[20];
format(s, 20, "Damage +%.0f", amount);
TextDrawSetString(GiveDamage[playerid], s);
TextDrawShowForPlayer(playerid, GiveDamage[playerid]);
PlayerPlaySound(playerid,17802,0.0,0.0,0.0);
SetTimerEx("DestruirTextoDraw", 1000, false, "i", playerid);
return 1;
}
forward OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid);
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
new s[20];
format(s, 20, "HP -%.0f", amount);
TextDrawSetString(TakeDamage[playerid], s);
TextDrawShowForPlayer(playerid, TakeDamage[playerid]);
SetTimerEx("DestruirTextoDraw", 1000, false, "i", playerid);
return 1;
}
forward DestruirTextoDraw(playerid);
public DestruirTextoDraw(playerid)
{
TextDrawHideForPlayer(playerid, GiveDamage[playerid]);
TextDrawHideForPlayer(playerid, TakeDamage[playerid]);
return 1;
} |
|