Почему не грузят зоны мафии ?
PHP код:
enum MzoneInfo
{
    
gID,
Float:gCoords[4],
    
gMemberZone
}
new 
MZInfo[16][MzoneInfo]; 
PHP код:
new TotalMafZones
В public OnGameModeInit()
PHP код:
    LoadMaf(); 
В public OnPlayerConnect(playerid)
PHP код:
for(new 115;i++)
    {
        
GangZoneShowForPlayer(playeridMZInfo[i][gID], GetMafZoneColor(i));
    } 
В конце мода:
PHP код:
stock GetMafZoneColor(mafiazonex)
{
    new 
zx;
    switch(
MZInfo[mafiazonex][gMemberZone])
    {
    case 
0zx 0xFFFFFFAA;
    case 
1zx CLCN;
    case 
2zx CYAKUZA;
    case 
3zx CRM;
    }
    return 
zx;

PHP код:
stock SaveMaf(i)
{
    new 
savezonesass[200];
    
format(savezonesasssizeof(savezonesass),
    
"update affect set x = '%f',y = '%f',xx = '%f',yy = '%f',member = '%i' where ID = '%i'",
    
MZInfo[i][gCoords][0],MZInfo[i][gCoords][1],MZInfo[i][gCoords][2],MZInfo[i][gCoords][3],MZInfo[i][gMemberZone],i);
    
mysql_pquery(dbHandle,savezonesass);
    return 
true;

PHP код:
forward LoadMaf();
public 
LoadMaf()
{
    
TotalMafZones cache_num_rows();
    if(
TotalMafZones)
    {
        for(new 
indexsa 1indexsa <= TotalMafZonesindexsa++)
        {
            
MZInfo[indexsa][gCoords][0] = cache_get_field_content_float(indexsa-1"X");
            
MZInfo[indexsa][gCoords][1] = cache_get_field_content_float(indexsa-1"Y");
            
MZInfo[indexsa][gCoords][2] = cache_get_field_content_float(indexsa-1"XX");
            
MZInfo[indexsa][gCoords][3] = cache_get_field_content_float(indexsa-1"YY");
            
MZInfo[indexsa][gMemberZone] = cache_get_field_content_int(indexsa-1"Member");
            
MZInfo[indexsa][gID] = GangZoneCreate(MZInfo[indexsa][gCoords][0], MZInfo[indexsa][gCoords][1], MZInfo[indexsa][gCoords][2], MZInfo[indexsa][gCoords][3]);
            
GangZoneShowForAll(MZInfo[indexsa][gID], GetMafZoneColor(indexsa));
        }
        
printf("Òåððèòîðèé ìàôèè çàãðóæåíû %i. [Äëèòåëüíîñòü çàãðóçêè: %d ms]"TotalMafZonescache_get_query_exec_time(UNIT_MILLISECONDS));
    }
    return 
true;

PHP код:
stock LoadMafia()
{
    
mysql_pquery(dbHandle"SELECT * FROM `affect`""LoadMaf") ;
    return 
true;