How to sum damage
#3

PHP код:
public OnPlayerTakeDamage(playeridissueridFloatamountweaponid)
{
        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.4700001.100000);
        
TextDrawColor(Textdraw11[playerid], -14415873);
        
TextDrawSetOutline(Textdraw11[playerid], 1);
        
TextDrawSetProportional(Textdraw11[playerid], 0);
        
GetPlayerName(issueridpnamesizeof(pname));
        
format(cstringsizeof(cstring), "%s -(%.0f)"pnameamount++);
        
TextDrawSetString(Textdraw11[playerid], cstring);
        
TextDrawShowForPlayer(playeridTextdraw11[playerid]);
        
SetPVarFloat(issuerid"damageTaken"GetPVarFloat(issuerid"damageTaken") + amount);
        return 
1;

PHP код:
new Float:total_damage GetPVarFloat(issuerid"damageTaken"); 
Reply


Messages In This Thread
How to sum damage - by GwENiko - 12.05.2014, 11:39
Re: How to sum damage - by ball - 12.05.2014, 11:49
Re: How to sum damage - by gekas - 12.05.2014, 12:24
Re: How to sum damage - by GwENiko - 12.05.2014, 16:34
Re: How to sum damage - by GwENiko - 14.05.2014, 18:31
Re: How to sum damage - by GwENiko - 15.05.2014, 17:36
Re: How to sum damage - by ball - 15.05.2014, 17:54
Re: How to sum damage - by GwENiko - 16.05.2014, 16:35
Re: How to sum damage - by Konstantinos - 16.05.2014, 16:42
Re: How to sum damage - by GwENiko - 16.05.2014, 16:49

Forum Jump:


Users browsing this thread: 5 Guest(s)