Problem with CreateDynamicCP from database
#1

Hello there i made some HQ's for Gangs but i want that checkpoints position in the front of the building where will be the HQ enter to load from database. I made already everything and
in the console says: Loaded x headquarters (15 at me).

Here is the photo:


I'll paste here the function that loads from database the HQ's:
PHP код:
function LoadGangHq( )
{
    new 
x_rowsx;
    
cache_get_row_countx_rows );
    for( new 
0x_rows++ )
    {
         
cache_get_value_inti"ID");
         
         
cache_get_value_floati"hqX"gTeamHq][ hqX ] );
        
cache_get_value_floati"hqY"gTeamHq][ hqY ] );
        
cache_get_value_floati"hqZ"gTeamHq][ hqZ ] );
        
gHQ] = CreateDynamicCPgTeamHq][ hqX ], gTeamHq][ hqY ], gTeamHq][ hqZ ], 1.00);
    }
    
printf"Loaded %d headquarters."x_rows );
    return 
1;

Database `headquarters` table:


Also in the past i made the same operation but not with MySQL i just made a variable, ex: new gHq[ 16 ];
Than i created the Dynamic CP on the "OnGameModeInit" public just like this:

PHP код:
gHq] = CreateDynamiCPxyzsizeworldinterior, .... );
gHq] = CreateDynamiCPxyzsizeworldinterior, .... );
gHq] = CreateDynamiCPxyzsizeworldinterior, .... );
.
.
.
gHq14 ] = CreateDynamiCPxyzsizeworldinterior, .... ); 
and it worked. I wanted to change from this to MySQL because i like more to use
with MySQL almost for everything can u help me with that problem ? Thx.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)