[Help] Damage (Amount) Problem
#1

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
Reply
#2

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 ? :/
Reply
#3

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?
Reply
#4

that compiled?
Reply
#5

any1?
Reply
#6

is DamageDid defined as a float in the IsTarget enum?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)