14.05.2014, 18:31
This is not working. Even though i tried storing its values with GetPVarFloat, it stays the same, i can shoot someone with an AK-47 and the dmg remains +9, when i wanted it to go like 9, 18, 27, 36 until the textdraw hides. I tried Gekas way it didn't change anything lol
pawn Код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
// Ding System
PlayerPlaySound(issuerid, 17802, 0.0, 0.0, 0.0);
// Damage System
new cstring[128];
new Float:DamageTaken;
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]);
GetPVarFloat(playerid, "DamageTaken");
SetPVarFloat(playerid, "DamageTaken", DamageTaken + amount);
SetTimerEx("DamageTakenTextdraw", 7500, false,"f", playerid);
if(issuerid == INVALID_PLAYER_ID)
{
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);
format(cstring, sizeof(cstring), "Collision -(%.0f)",amount);
TextDrawSetString(Textdraw11[playerid], cstring);
TextDrawShowForPlayer(playerid, Textdraw11[playerid]);
}
return 1;
}