[Help] Damage (Amount) Problem - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [Help] Damage (Amount) Problem (
/showthread.php?tid=595100)
[Help] Damage (Amount) Problem -
David (Sabljak) - 28.11.2015
Hello, i want to make "How much damage you did" and its not working well.. first shot doing good, but after that is going crazy
Код:
public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid, bodypart)
{
if(RandomTarget(damagedid))
{
new string[64];
IsTarget[playerid][DamageDID] += amount;
format(string, sizeof(string)," %.0f",IsTarget[playerid][DamageDID]);
SCM(playerid, -1, string);
}
return 1;
}
Example: 1 hit with weapons give 18, and second hit gives 329832932
Re: [Help] Damage (Amount) Problem -
Ahmad45123 - 28.11.2015
Why are you adding to the array ?
That's probably why...
And also, Why are you using
IsTarget as an array once and as a function once ? :/
Re: [Help] Damage (Amount) Problem -
David (Sabljak) - 28.11.2015
Quote:
Originally Posted by Ahmad45123
Why are you adding to the array ?
That's probably why...
And also, Why are you using IsTarget as an array once and as a function once ? :/
|
ignore IsTarget, i translated it to english so thats not point...
Because i want to read with CMD how much damage i did... got idea?
Re: [Help] Damage (Amount) Problem -
Ada32 - 28.11.2015
that compiled?
Re: [Help] Damage (Amount) Problem -
David (Sabljak) - 29.11.2015
any1?
Re: [Help] Damage (Amount) Problem -
CmZxC - 29.11.2015
is DamageDid defined as a float in the IsTarget enum?