Getting the half sum of a variable - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Getting the half sum of a variable (
/showthread.php?tid=84455)
Getting the half sum of a variable -
hanzen - 30.06.2009
I have this:
new robbery;
robbery = PlayerInfo[playerid][pHeadValue]%2;
If robbery is 600k it will be 300k if you understand?
Re: Getting the half sum of a variable -
Correlli - 30.06.2009
pawn Код:
new robbery;
robbery = (PlayerInfo[playerid][pHeadValue]) / 2;