[HELP]Need 3people to gangattack.
#3

pawn Код:
for(new a = 0, b = GetMaxPlayers(); a < b; a++)
{
    new GangMembersInTurf = 0;
   
    if(Gang[a] == Gang[playerid] && Turf[a] == Turf[playerid])
    {
        GangMembersInTurf++;
   
        if(GangMembersInTurf >= GANG_MEMBERS_FOR_ATTACK)
        {
            // Do s00m33 funnkeh st00f.
         
        }
        format(str,sizeof(str),"You need %d Gangmembers in the turf you want to attack.", GANG_MEMBERS_FOR_ATTACK);
        SendClientMessage(playerid, red, str);
        return 1;
    }
    return 1;
}
You didn't give me any information on how you arrays for gangs or whatever is set up so I just made up some.

Now, this could be hugely improved depending on how your arrays and gangs are set up, so I've just done it very basic (2 loops :<)

I assume you know what to replace and where.

EDIT: Just like above, though I wasn't sure if you where set up to use arrays/varibles or functions or whatever.
Reply


Messages In This Thread
[HELP]Need 3people to gangattack. - by Lutsen - 20.06.2010, 11:53
Re: [HELP]Need 3people to gangattack. - by Hiddos - 20.06.2010, 12:02
Re: [HELP]Need 3people to gangattack. - by Joe_ - 20.06.2010, 12:04

Forum Jump:


Users browsing this thread: 1 Guest(s)