Problem with turfs
#1

Hi i have Problem with turfs to load them i have 49 gangzone on my sql but my server just show 24 of them always this is .
always just show 24 of them how can fix to show all of them?

PHP код:
    if(!strcmp(cmd,"/turfs",true))
    {
    if(
TurfShow[playerid] == 0)
    {
    
TurfShow[playerid] = 1;
    
SCM(playerid,COLOR_ARIAIE,"Turfs Showed on map");
     
GangZoneShowForPlayer(playerid,B4,0xFFFFFFFF);
    
GangZoneShowForPlayer(playerid,B1,0xFFFFFFFF);
    
GangZoneShowForPlayer(playerid,B2,0xFFFFFFFF);
    
GangZoneShowForPlayer(playerid,B3,0xFFFFFFFF);
    
GangZoneShowForPlayer(playerid,B5,0xFFFFFFFF);
    
GangZoneShowForPlayer(playerid,B6,0xFFFFFFFF);
    
GangZoneShowForPlayer(playerid,B7,0xFFFFFFFF);
    
GangZoneShowForPlayer(playerid,B8,0xFFFFFFFF);
    
GangZoneShowForPlayer(playerid,B9,0xFFFFFFFF);
    
GangZoneShowForPlayer(playerid,B10,0xFFFFFFFF);
    
GangZoneShowForPlayer(playerid,B11,0xFFFFFFFF);
    
GangZoneShowForPlayer(playerid,B12,0xFFFFFFFF);
    
GangZoneShowForPlayer(playerid,C1,0xFFFFFFFF);
    
GangZoneShowForPlayer(playerid,C2,0xFFFFFFFF);
    
GangZoneShowForPlayer(playerid,C3,0xFFFFFFFF);
    
GangZoneShowForPlayer(playerid,C4,0xFFFFFFFF);
    
GangZoneShowForPlayer(playerid,C5,0xFFFFFFFF);
    
GangZoneShowForPlayer(playerid,C6,0xFFFFFFFF);
    
GangZoneShowForPlayer(playerid,C7,0xFFFFFFFF);
    
GangZoneShowForPlayer(playerid,C8,0xFFFFFFFF);
    
GangZoneShowForPlayer(playerid,C10,0xFFFFFFFF);
    
GangZoneShowForPlayer(playerid,C11,0xFFFFFFFF);
    
GangZoneShowForPlayer(playerid,C12,0xFFFFFFFF);
    
GangZoneShowForPlayer(playerid,C13,0xFFFFFFFF);
    
GangZoneShowForPlayer(playerid,C14,0xFFFFFFFF);
    
GangZoneShowForPlayer(playerid,C15,0xFFFFFFFF);
    
GangZoneShowForPlayer(playerid,C16,0xFFFFFFFF);
    
GangZoneShowForPlayer(playerid,V1,0xFFFFFFFF);
    
GangZoneShowForPlayer(playerid,V2,0xFFFFFFFF);
    
GangZoneShowForPlayer(playerid,V3,0xFFFFFFFF);
    
GangZoneShowForPlayer(playerid,V4,0xFFFFFFFF);
    
GangZoneShowForPlayer(playerid,V5,0xFFFFFFFF);
    
GangZoneShowForPlayer(playerid,V6,0xFFFFFFFF);
    
GangZoneShowForPlayer(playerid,V7,0xFFFFFFFF);
    
GangZoneShowForPlayer(playerid,V8,0xFFFFFFFF);
    
GangZoneShowForPlayer(playerid,V9,0xFFFFFFFF);
    
GangZoneShowForPlayer(playerid,V10,0xFFFFFFFF);
    
GangZoneShowForPlayer(playerid,V11,0xFFFFFFFF);
    
GangZoneShowForPlayer(playerid,V12,0xFFFFFFFF);
    
GangZoneShowForPlayer(playerid,V13,0xFFFFFFFF);
    
GangZoneShowForPlayer(playerid,V14,0xFFFFFFFF);
    
GangZoneShowForPlayer(playerid,V15,0xFFFFFFFF);
    
GangZoneShowForPlayer(playerid,V16,0xFFFFFFFF);
    
GangZoneShowForPlayer(playerid,V17,0xFFFFFFFF);
    
GangZoneShowForPlayer(playerid,V18,0xFFFFFFFF);
    
GangZoneShowForPlayer(playerid,V19,0xFFFFFFFF);
    
GangZoneShowForPlayer(playerid,V20,0xFFFFFFFF);
    
GangZoneShowForPlayer(playerid,V21,0xFFFFFFFF);
    
GangZoneShowForPlayer(playerid,C9,0xFFFFFFFF);
    for(new 
0;i<sizeof(TurfInfo);i++)
    {
    if(!
strcmp(TurfInfo[i][zOwner],"SilenceMafia",true))
    {
    
GangZoneShowForPlayer(playerid,Turfs[i],0xFF3300AA);
    }
    if(!
strcmp(TurfInfo[i][zOwner],"TheKillers",true))
    {
    
GangZoneShowForPlayer(playerid,Turfs[i],0x3E353500);
    }
    if(!
strcmp(TurfInfo[i][zOwner],"DangerousTigers",true))
    {
    
GangZoneShowForPlayer(playerid,Turfs[i],0x19AF23FF);
    }
    if(!
strcmp(TurfInfo[i][zOwner],"LegendaryMen",true))
    {
    
GangZoneShowForPlayer(playerid,Turfs[i],0xFFBA00AA);
    }
    if(!
strcmp(TurfInfo[i][zOwner],"FastNFarious",true))
    {
    
GangZoneShowForPlayer(playerid,Turfs[i],0x9900FFAA);
    }
    if(!
strcmp(TurfInfo[i][zOwner],"StormMen",true))
    {
    
GangZoneShowForPlayer(playerid,Turfs[i],0x00FFFFFF);
    }
    }
    if(
OnWar[playerid] != 9999)
    {
    new 
famil;
    new 
familtaraf;
    if(
PlayerInfo[playerid][pLeader]) famil PlayerInfo[playerid][pLeader];
    else 
famil PlayerInfo[playerid][pMember];
    new 
rang;
    for(new 
0;i<LastPID;i++)
    {
    if(
gPlayerLogged[i] && OnWar[i] == OnWar[playerid])
    {
    if(
PlayerInfo[i][pMember] != famil && PlayerInfo[i][pLeader] != famil)
    {
    if(
PlayerInfo[i][pLeader]) familtaraf PlayerInfo[i][pLeader];
    else 
familtaraf PlayerInfo[i][pMember];
    }
    }
    }
    if(
familtaraf == 5)
    {
    
rang 0xFF3300AA;
    }
    if(
familtaraf == 6)
    {
    
rang 0x3E353500;
    }
    if(
familtaraf == 12)
    {
    
rang 0x19AF23FF;
    }
    if(
familtaraf == 13)
    {
    
rang 0xFFBA00AA;
    }
    if(
familtaraf == 14)
    {
    
rang 0x9900FFAA;
    }
    if(
familtaraf == 15)
    {
    
rang 0x00FFFFFF;
    }
    if(
familtaraf == 17)
    {
    
rang 0xe00500AA;
    }
    if(
familtaraf == 18)
    {
    
rang 0xefd1657AA;
    }
    if(
familtaraf == 19)
    {
    
rang 0xebcd530AA;
    }
    
GangZoneFlashForPlayer(playerid,OnWar[playerid],rang);
    }
    return 
1;
    }
    if(
TurfShow[playerid] == 1)
    {
    
TurfShow[playerid] = 0;
    
SCM(playerid,COLOR_ARIAIE,"Turfs hidded from map");
    
GangZoneHideForPlayer(playerid,B4);
    
GangZoneHideForPlayer(playerid,B1);
    
GangZoneHideForPlayer(playerid,B2);
    
GangZoneHideForPlayer(playerid,B3);
    
GangZoneHideForPlayer(playerid,B5);
    
GangZoneHideForPlayer(playerid,B6);
    
GangZoneHideForPlayer(playerid,B7);
    
GangZoneHideForPlayer(playerid,B8);
    
GangZoneHideForPlayer(playerid,B9);
    
GangZoneHideForPlayer(playerid,B10);
    
GangZoneHideForPlayer(playerid,B11);
    
GangZoneHideForPlayer(playerid,B12);
    
GangZoneHideForPlayer(playerid,C1);
    
GangZoneHideForPlayer(playerid,C2);
    
GangZoneHideForPlayer(playerid,C3);
    
GangZoneHideForPlayer(playerid,C4);
    
GangZoneHideForPlayer(playerid,C5);
    
GangZoneHideForPlayer(playerid,C6);
    
GangZoneHideForPlayer(playerid,C7);
    
GangZoneHideForPlayer(playerid,C8);
    
GangZoneHideForPlayer(playerid,C10);
    
GangZoneHideForPlayer(playerid,C11);
    
GangZoneHideForPlayer(playerid,C12);
    
GangZoneHideForPlayer(playerid,C13);
    
GangZoneHideForPlayer(playerid,C14);
    
GangZoneHideForPlayer(playerid,C15);
    
GangZoneHideForPlayer(playerid,C16);
    
GangZoneHideForPlayer(playerid,V1);
    
GangZoneHideForPlayer(playerid,V2);
    
GangZoneHideForPlayer(playerid,V3);
    
GangZoneHideForPlayer(playerid,V4);
    
GangZoneHideForPlayer(playerid,V5);
    
GangZoneHideForPlayer(playerid,V6);
    
GangZoneHideForPlayer(playerid,V7);
    
GangZoneHideForPlayer(playerid,V8);
    
GangZoneHideForPlayer(playerid,V9);
    
GangZoneHideForPlayer(playerid,V10);
    
GangZoneHideForPlayer(playerid,V11);
    
GangZoneHideForPlayer(playerid,V12);
    
GangZoneHideForPlayer(playerid,V13);
    
GangZoneHideForPlayer(playerid,V14);
    
GangZoneHideForPlayer(playerid,V15);
    
GangZoneHideForPlayer(playerid,V16);
    
GangZoneHideForPlayer(playerid,V17);
    
GangZoneHideForPlayer(playerid,V18);
    
GangZoneHideForPlayer(playerid,V19);
    
GangZoneHideForPlayer(playerid,V20);
    
GangZoneHideForPlayer(playerid,V21);
    
GangZoneHideForPlayer(playerid,C9);
    for(new 
0;i<sizeof(TurfInfo);i++)
    {
    
GangZoneHideForPlayer(playerid,Turfs[i]);
    }
    }
    return 
1;
    } 
PHP код:
TurfInfo[49][zInfo],
       
Turfs[49], 
PHP код:
public LoadTurfs()
{
    print(
"\nLoading Turfs ...\n");
    
mysql_function_query(handle,"SELECT * FROM `turfs`",true,"OnTurfsLoad","");
    return 
1;
}
forward OnTurfsLoad();
public 
OnTurfsLoad()
{
for(new 
0;i<cache_get_row_count(handle);i++)
{
TurfInfo[i][zSQLid] = i;
cache_get_row(i,1,TurfInfo[i][zOwner],handle,64);
TurfInfo[i][zMinX] = cache_get_row_float(i,2,handle);
TurfInfo[i][zMinY] = cache_get_row_float(i,3,handle);
TurfInfo[i][zMaxX] = cache_get_row_float(i,4,handle);
TurfInfo[i][zMaxY] = cache_get_row_float(i,5,handle);
}
    for(new 
0sizeof(TurfInfo); i++)
    {
        
Turfs[i] = GangZoneCreate(TurfInfo[i][zMinX],TurfInfo[i][zMinY],TurfInfo[i][zMaxX],TurfInfo[i][zMaxY]);
        
turfattacker[i] = 9999;
        
turfkhod[i] = 9999;
        
killsattackerturf[i] = 0;
        
deathsattackerturf[i] = 0;
        
killskhodturf[i] = 0;
        
deathskhodturf[i] = 0;
        
scoreattacker[i] = 0;
        
scorekhod[i] = 0;
        
TurfTime[i] = 0;
        
TurfReload[i] = 0;
    }
print(
"\nAll Turfs Loaded.\n");
return 
1;
}
public 
SaveTurfs(turfid)
{
    new 
query[256];
    
format(query,256,"UPDATE `turfs` SET zOwner='%s' WHERE `id`='%d'",TurfInfo[turfid][zOwner],turfid);
    
mysql_function_query(handle,query,false,"SendQuery","");
    
format(query,256,"UPDATE `turfs` SET zMinX='%.4f' WHERE `id`='%d'",TurfInfo[turfid][zMinX],turfid);
    
mysql_function_query(handle,query,false,"SendQuery","");
    
format(query,256,"UPDATE `turfs` SET zMinY='%.4f' WHERE `id`='%d'",TurfInfo[turfid][zMinY],turfid);
    
mysql_function_query(handle,query,false,"SendQuery","");
    
format(query,256,"UPDATE `turfs` SET zMaxX='%.4f' WHERE `id`='%d'",TurfInfo[turfid][zMaxX],turfid);
    
mysql_function_query(handle,query,false,"SendQuery","");
    
format(query,256,"UPDATE `turfs` SET zMaxY='%.4f' WHERE `id`='%d'",TurfInfo[turfid][zMaxY],turfid);
    
mysql_function_query(handle,query,false,"SendQuery","");
    
format(query,256,"UPDATE `turfs` SET zMaxY='%.4f' WHERE `id`='%d'",TurfInfo[turfid][zMaxY],turfid);
    
mysql_function_query(handle,query,false,"SendQuery","");
    
format(query,256,"UPDATE `turfs` SET zMaxY='%.4f' WHERE `id`='%d'",TurfInfo[turfid][zMaxY],turfid);
    
mysql_function_query(handle,query,false,"SendQuery","");
    
format(query,256,"UPDATE `turfs` SET zMaxY='%.4f' WHERE `id`='%d'",TurfInfo[turfid][zMaxY],turfid);
    
mysql_function_query(handle,query,false,"SendQuery","");
    
format(query,256,"UPDATE `turfs` SET zMaxY='%.4f' WHERE `id`='%d'",TurfInfo[turfid][zMaxY],turfid);
    
mysql_function_query(handle,query,false,"SendQuery","");
    
format(query,256,"UPDATE `turfs` SET zMaxY='%.4f' WHERE `id`='%d'",TurfInfo[turfid][zMaxY],turfid);
    
mysql_function_query(handle,query,false,"SendQuery","");
    
format(query,256,"UPDATE `turfs` SET zMaxY='%.4f' WHERE `id`='%d'",TurfInfo[turfid][zMaxY],turfid);
    
mysql_function_query(handle,query,false,"SendQuery","");
    
format(query,256,"UPDATE `turfs` SET zMaxY='%.4f' WHERE `id`='%d'",TurfInfo[turfid][zMaxY],turfid);
    
mysql_function_query(handle,query,false,"SendQuery","");
    
format(query,256,"UPDATE `turfs` SET zMaxY='%.4f' WHERE `id`='%d'",TurfInfo[turfid][zMaxY],turfid);
    
mysql_function_query(handle,query,false,"SendQuery","");
    
format(query,256,"UPDATE `turfs` SET zMaxY='%.4f' WHERE `id`='%d'",TurfInfo[turfid][zMaxY],turfid);
    
mysql_function_query(handle,query,false,"SendQuery","");
    
format(query,256,"UPDATE `turfs` SET zMaxY='%.4f' WHERE `id`='%d'",TurfInfo[turfid][zMaxY],turfid);
    
mysql_function_query(handle,query,false,"SendQuery","");
    
format(query,256,"UPDATE `turfs` SET zMaxY='%.4f' WHERE `id`='%d'",TurfInfo[turfid][zMaxY],turfid);
    
mysql_function_query(handle,query,false,"SendQuery","");
    
format(query,256,"UPDATE `turfs` SET zMaxY='%.4f' WHERE `id`='%d'",TurfInfo[turfid][zMaxY],turfid);
    
mysql_function_query(handle,query,false,"SendQuery","");
    return 
1;

Reply
#2

rly? any body cant help me?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)