SA-MP Forums Archive
[HELP] pay for russian mafia on payday - 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] pay for russian mafia on payday (/showthread.php?tid=568511)



[HELP] pay for russian mafia on payday - Luca12 - 22.03.2015

Hello how can I make on payday for example when is player leader or member of that team russian mafia I know that part and I set their pay for example 100 and online is 4 player know how can I make that those 4 player get money I mean to split that 100 on 4 members if you know what I mean.


Re: [HELP] pay for russian mafia on payday - iPrivate - 22.03.2015

The code shall be something like this,,:

pawn Код:
for(new i; i < MAX_PLAYERS, i++);
{
     if(pTeam(i) == 1)
     {
          pMembers++;
     }
     GivePlayerMoney(playerid, 100/pMembers);
}
That shall give you the basic idea of how it works.