SA-MP Forums Archive
[HELP] Can you HELP ME PLEASE? - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [HELP] Can you HELP ME PLEASE? (/showthread.php?tid=208476)



[HELP] Can you HELP ME PLEASE? - Nexotronix - 08.01.2011

I have his function

pawn Код:
stock OwnedTurfs2( teamid )
{
    new turf;
    for (new i = 0; i < MAX_TURFS; i++) if (turfs[ i ][TurfOwner] == teamid) turf++;
    return turf;
}
i need to find the team with biggest number of owned turfs
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++;
            }
        }
    }
}
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!