SA-MP Forums Archive
Storing Damage amount - 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: Storing Damage amount (/showthread.php?tid=629938)



Storing Damage amount - Flamehaze7 - 05.03.2017

I want to store the Damage Amount but i can't really understand how to do this:

i tried like this but it doesn't work, it says " warning 215: expression has no effect "

Код:
UccisioniGDM[issuerid] + amount;
	new string[256];
	format(string,sizeof(string),"Danno fatto: %0.f", amount);
	SendClientMessage(issuerid,Lightblue,string);



Re: Storing Damage amount - Toroi - 05.03.2017

Код:
format(string,sizeof(string),"Danno fatto: %.0f", amount); // notice the change in %.0f . Test it



Re: Storing Damage amount - Flamehaze7 - 05.03.2017

Quote:
Originally Posted by Troydere
Посмотреть сообщение
Код:
format(string,sizeof(string),"Danno fatto: %.0f", amount); // notice the change in %.0f . Test it
The invalid expression pawno says is: "UccisioniGDM[issuerid] + amount;"

How can i store the damage i've done to an array? Cause i'm doing a deathmatch system, the first to reach like 1500 DMG wins.


Re: Storing Damage amount - Toroi - 05.03.2017

Код:
UccisioniGDM[issuerid] += amount;



Re: Storing Damage amount - Flamehaze7 - 05.03.2017

Quote:
Originally Posted by Troydere
Посмотреть сообщение
Код:
UccisioniGDM[issuerid] += amount;
Thank you!