20.06.2010, 12:04
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;
}
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.

