Turfs not showing
#1

Hi guys.

I'm working on a dynamic faction system and it's all ok. I can create a faction, the turf appears but if I restart the server the turfs are not showing anymore. In my table I'm storing the coords, min x, min y, max x, max y and also the color for the turf but for some reason it does not show.

Here is the code I use for this thing:

PHP код:
forward OnTurfsLoad(playerid);
enum TDATA
{
    
tid,
    
tfaction,
    
tcolor[16],
    
Float:tfminx,
    
Float:tfminy,
    
Float:tfmaxx,
    
Float:tfmaxy
}
new 
tInfo[MAX_PLAYERS][TDATA];
// Under main()
mysql_format(mysqlsqlsizeof(sql), "SELECT * FROM turfs");
mysql_tquery(mysqlsql"OnTurfsLoad""");
// Finally
public OnTurfsLoad(playerid)
{
    new 
rowsfields;
    
cache_get_data(rowsfieldsmysql);
    if(
rows)
    {
        for (new 
i=0i<cache_get_row_count(); i++)
        {
            
tInfo[i][tid] = cache_get_field_content_int(i"id");
            
tInfo[i][tfaction] = cache_get_field_content_int(i"faction");
            
cache_get_field_content(i"color"tInfo[i][tcolor], mysql16);
            
tInfo[i][tfminx] = cache_get_field_content_float(i"tfminx");
            
tInfo[i][tfminy] = cache_get_field_content_float(i"tfminy");
            
tInfo[i][tfmaxx] = cache_get_field_content_float(i"tfmaxx");
            
tInfo[i][tfmaxy] = cache_get_field_content_float(i"tfmaxy");
            
GangZoneCreate(tInfo[i][tfminx], tInfo[i][tfminy], tInfo[i][tfmaxx], tInfo[i][tfmaxy]);
            
GangZoneShowForAll(itInfo[i][tcolor]);
        }
    }
    
printf("Number of existing turfs: %d"cache_get_row_count());
    return 
1;

I've tried alot of things but nothing worked. Maybe you guys can please help me.
Reply


Messages In This Thread
Turfs not showing - by Nightkill - 05.01.2015, 20:02
Re: Turfs not showing - by Divergent - 05.01.2015, 20:29
Re: Turfs not showing - by Nightkill - 05.01.2015, 20:36
Re: Turfs not showing - by Nightkill - 06.01.2015, 22:30
Re: Turfs not showing - by Nightkill - 08.01.2015, 14:31
Re: Turfs not showing - by ball - 08.01.2015, 14:42
Re: Turfs not showing - by Nightkill - 11.01.2015, 06:33
Re: Turfs not showing - by bgedition - 11.01.2015, 06:49
Re: Turfs not showing - by fatlirmorina - 11.01.2015, 09:00
Re: Turfs not showing - by Nightkill - 11.01.2015, 10:33

Forum Jump:


Users browsing this thread: 1 Guest(s)