MySQL R39-4 (Loading Interiors)
#1

I am kinda new using mysql databases and i have a question about loading interiors from a created table, i scripted something and it works fine for loading, but i don't feel that this is the right way to load. Here is it.. please tell me if it's wrong.

PHP код:
public OnGameModeExit()
{
    for(new 
0MAX_INTERIORSi++)
    {
        
mysql_tquery(ConnectionHandle"SELECT * FROM interiors""LoadInteriorData""i"i);
    }
    return 
1;
}
forward LoadInteriorData(intid);
public 
LoadInteriorData(intid)
{
    new 
rowsfieldscache_get_data(rowsfieldsConnectionHandle);
    if(!
rows) return 1;
    
cache_get_field_content(intid"intname"INTInfo[intid][INTName], ConnectionHandle64);
    
cache_get_field_content(intid"inttype"INTInfo[intid][INTType], ConnectionHandle64);
    
cache_get_field_content(intid"intlocation"INTInfo[intid][INTLocation], ConnectionHandle64);
    
INTInfo[intid][INTInterior] = cache_get_field_content_int(intid"intinterior");
    
INTInfo[intid][INTIcon] = cache_get_field_content_int(intid"inticon");
    
INTInfo[intid][INTCPOutX] = cache_get_field_content_float(intid"intcpoutx");
    
INTInfo[intid][INTCPOutY] = cache_get_field_content_float(intid"intcpouty");
    
INTInfo[intid][INTCPOutZ] = cache_get_field_content_float(intid"intcpoutz");
    
INTInfo[intid][INTSPInX] = cache_get_field_content_float(intid"intspinx");
    
INTInfo[intid][INTSPInY] = cache_get_field_content_float(intid"intspiny");
    
INTInfo[intid][INTSPInZ] = cache_get_field_content_float(intid"intspinz");
    
INTInfo[intid][INTSPInA] = cache_get_field_content_float(intid"intspina");
    
INTInfo[intid][INTSPOutX] = cache_get_field_content_float(intid"intspoutx");
    
INTInfo[intid][INTSPOutY] = cache_get_field_content_float(intid"intspouty");
    
INTInfo[intid][INTSPOutZ] = cache_get_field_content_float(intid"intspoutz");
    
INTInfo[intid][INTSPOutA] = cache_get_field_content_float(intid"intspouta");
     
InteriorCP[intid] = CreateDynamicCP(INTInfo[intid][INTCPOutX], INTInfo[intid][INTCPOutY], INTInfo[intid][INTCPOutZ], 1.500, -120);
     
CreateDynamic3DTextLabel(INTInfo[intid][INTName], COLOR_YELLOWINTInfo[intid][INTCPOutX], INTInfo[intid][INTCPOutY], INTInfo[intid][INTCPOutZ], 30);
    if(
INTInfo[intid][INTIcon] != 0CreateDynamicMapIcon(INTInfo[intid][INTCPOutX], INTInfo[intid][INTCPOutY], INTInfo[intid][INTCPOutZ], INTInfo[intid][INTIcon],0,0,0,-1,300.0);
    
printf("Loading Interior (%s)"INTInfo[intid][INTName]);
    return 
1;

Reply


Messages In This Thread
MySQL R39-4 (Loading Interiors) - by Juvanii - 02.01.2016, 23:23
Re: MySQL R39-4 (Loading Interiors) - by Juvanii - 15.01.2016, 20:39
Re: MySQL R39-4 (Loading Interiors) - by Yousha - 15.01.2016, 21:19
Re: MySQL R39-4 (Loading Interiors) - by Juvanii - 15.01.2016, 21:49
Re: MySQL R39-4 (Loading Interiors) - by Jefff - 15.01.2016, 21:57
Re: MySQL R39-4 (Loading Interiors) - by Vince - 15.01.2016, 22:04
Re: MySQL R39-4 (Loading Interiors) - by Juvanii - 16.01.2016, 12:22

Forum Jump:


Users browsing this thread: 1 Guest(s)