How to get each player cash and collet them ? - 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: How to get each player cash and collet them ? (
/showthread.php?tid=454412)
How to get each player cash and collet them ? -
omidi - 28.07.2013
How to get each player cash and collet them ?
Quote:
new GetEachPlayerCash= BankCash[i]/100;
etc
if playerA:GetEachPlayerCash[playerid] is -500 and playerB:GetEachPlayerCash[playerid] is -4000 and continue to
like
Player id 100
(playerA+playerB+playerC+playerD+and.............. )
then collet all values and put in new GetAllCollectedCash
and then Givecash(playerid,GetAllCollectedCash)
|
Re: How to get each player cash and collet them ? -
SuperViper - 28.07.2013
pawn Код:
new totalPlayerCash;
for(new playerIndex; playerIndex < MAX_PLAYERS; playerIndex++)
{
totalPlayerCash += GetPlayerMoney(playerIndex);
}
printf("The total amount of cash counted from all of the online players is $%d.", totalPlayerCash);