08.01.2011, 16:41
I have his function
i need to find the team with biggest number of owned turfs
so i writed this
i think somthing wrong? because IT's ALL WRONG!
so help me please in this? i spent 2 hours to deside to write this and i'm just read all samp wiki and i do not lnow how to create normal script! HELP ME PLEASE!
pawn Код:
stock OwnedTurfs2( teamid )
{
new turf;
for (new i = 0; i < MAX_TURFS; i++) if (turfs[ i ][TurfOwner] == teamid) turf++;
return turf;
}
so i writed this
pawn Код:
stock Turfs()
{
new turf;
for(new i=0; i<MAX_TEAMS; i++)
{
for (new t = 0; t < MAX_TURFS; t++)
{
if (turfs[ t ][TurfOwner] == i)
{
turf++;
}
}
}
}
so help me please in this? i spent 2 hours to deside to write this and i'm just read all samp wiki and i do not lnow how to create normal script! HELP ME PLEASE!