Little Help
#3

You only have 1 gangzone, but you are trying to loop through 50 of them... causing a out of bounds error and crashing your server.

You should use 'sizeof' instead.

pawn Код:
#include <YSI\y_hooks>
//==============================================================================
//--->>> Gang Zones
//==============================================================================
enum ZoneInfo
{
    Float:minX,
    Float:minY,
    Float:maxX,
    Float:maxY
}

new GangZone[][ZoneInfo] =
{
    {96.8898,1798.6938,390.6672,2081.8325}
};


hook OnGameModeInit()
{
    CreateGangZones();
    return 1;
}

stock CreateGangZones()
{
    for(new i = 0; i < sizeof(GangZone); i++)
    {
        GangZoneCreate(GangZone[i][minX], GangZone[i][minY], GangZone[i][maxX], GangZone[i][maxY]);
    }
    return 1;
}
Reply


Messages In This Thread
Little Help - by Sanady - 19.04.2015, 09:10
Re: Little Help - by Azula - 19.04.2015, 09:38
Re: Little Help - by Threshold - 19.04.2015, 09:41
Re: Little Help - by Ahmad45123 - 19.04.2015, 09:57

Forum Jump:


Users browsing this thread: 2 Guest(s)