Payday fraction
#10

Quote:
Originally Posted by kovac
Посмотреть сообщение
Try this:
PHP код:
stock countFactionMembers(factionid)
{
    new 
count;
    foreach (new 
Player)
    {
        if(
pl[i][pMember] == factionid || pl[i][pLeader] == factionid)
        {
            
count++;
        }
    }
    return 
count;

I'm not sure what "number" is so I left it as it was
PHP код:
new amount strval(inputtext)
foreach (new 
Player)
{
    if(
pl[i][pMember]==number||pl[i][pLeader]==number)
    {
        
GivePlayerMoney(iamount/2);
    }

Hope this will help you

EDIT: I assume that you already have included foreach.
That wouldn't satisfy his requirements. You're dividing the amount of money entered by 2 instead of the number of online faction members. & I'm not sure why you included countFactionMembers if you're not going to use it in your command.
Reply


Messages In This Thread
Payday fraction - by EvgeniyHostel1992 - 25.03.2018, 11:33
Re: Payday fraction - by kovac - 25.03.2018, 11:42
Re: Payday fraction - by XVlaDX - 25.03.2018, 11:50
Re: Payday fraction - by EvgeniyHostel1992 - 25.03.2018, 11:51
Re: Payday fraction - by EvgeniyHostel1992 - 25.03.2018, 11:58
Re: Payday fraction - by XVlaDX - 25.03.2018, 12:00
Re: Payday fraction - by kovac - 25.03.2018, 12:01
Re: Payday fraction - by EvgeniyHostel1992 - 25.03.2018, 12:03
Re: Payday fraction - by kovac - 25.03.2018, 12:22
Re: Payday fraction - by XVlaDX - 25.03.2018, 19:13

Forum Jump:


Users browsing this thread: 5 Guest(s)