12.05.2014, 11:49
(
Последний раз редактировалось ball; 12.05.2014 в 14:23.
)
You have to create player variable or save it in pvars
Then if you want get the total amount use:
@down - exactly the same code as my ... no comments
Код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid) { new cstring[128]; PlayerPlaySound(issuerid,17802,0.0,0.0,0.0); new pname[MAX_PLAYER_NAME]; TextDrawBackgroundColor(Textdraw11[playerid], 255); TextDrawFont(Textdraw11[playerid], 1); TextDrawLetterSize(Textdraw11[playerid], 0.470000, 1.100000); TextDrawColor(Textdraw11[playerid], -14415873); TextDrawSetOutline(Textdraw11[playerid], 1); TextDrawSetProportional(Textdraw11[playerid], 0); GetPlayerName(issuerid, pname, sizeof(pname)); format(cstring, sizeof(cstring), "%s -(%.0f)", pname, amount++); TextDrawSetString(Textdraw11[playerid], cstring); TextDrawShowForPlayer(playerid, Textdraw11[playerid]); SetPVarFloat(issuerid, "damageTaken", GetPVarFloat(issuerid, "damageTaken") + amount); return 1; }
Код:
new Float:total_damage = GetPVarFloat(issuerid, "damageTaken");