MySql: Objects not loading
#1

here is my codes
PHP код:
enum TowerEnum{
    
t_owner[MAX_PLAYER_NAME],
    
t_range,
    
Text3D:t_text,
    
Float:t_x,
    
Float:t_y,
    
Float:t_z,
    
Float:t_rx,
    
Float:t_ry,
    
Float:t_rz,
    
t_model,
    
t_id
}
new 
tInfo[MAX_TOWER][TowerEnum]; 
PHP код:
mysql_function_query(dbhandlequerytrue"OnTowerLoad""");
    
format(querysizeof(query), "SELECT * FROM towers"); 
PHP код:
public OnTowerLoad(limit)
{
    new 
countrowsfields;
    
cache_get_data(rowsfields);
    for(new 
irowsi++)
    {
        for(new 
hsizeof(tInfo); h++)
        {
            if(
tInfo[h][t_id] == 0)
            {
                
cache_get_field_content(i"owner"tInfo[h][t_owner], dbhandle);
                
tInfo[h][t_range] = cache_get_field_content_int(i"t_range"dbhandle);
                
tInfo[h][t_model] = cache_get_field_content_int(i"t_model"dbhandle);
                
tInfo[h][t_x] = cache_get_field_content_float(i"t_x"dbhandle);
                
tInfo[h][t_y] = cache_get_field_content_float(i"t_y"dbhandle);
                
tInfo[h][t_z] = cache_get_field_content_float(i"t_z"dbhandle);
                new 
string[126];
                
format(string,sizeof(string),"%i,%f,%f,%f",tInfo[h][t_model], tInfo[h][t_x], tInfo[h][t_y], tInfo[h][t_z]);
                
SendClientMessageToAll(-1,string);
                
CreateDynamicObject(tInfo[h][t_model], tInfo[h][t_x], tInfo[h][t_y], tInfo[h][t_z], 0.00.00.0,200,300);
                
count++;
                break;
            }
        }
    }
    
printf("Current objects on the server: %d",CountDynamicObjects());
    return 
1;

Database:


its not getting data from the db
Reply


Messages In This Thread
MySql: Objects not loading - by akib - 30.01.2018, 03:08
Re: MySql: Objects not loading - by Mugala - 30.01.2018, 03:25
Re: MySql: Objects not loading - by akib - 30.01.2018, 03:35
Re: MySql: Objects not loading - by Mugala - 30.01.2018, 03:58
Re: MySql: Objects not loading - by Gammix - 30.01.2018, 04:16
Re: MySql: Objects not loading - by akib - 30.01.2018, 10:41

Forum Jump:


Users browsing this thread: 1 Guest(s)