MySQL R39-4 (Loading Interiors)
#7

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

Quote:
Originally Posted by Vince
Посмотреть сообщение
It looks fine, to be honest. You could make it look neater by aligning all the "=" symbols and by splitting the Create functions over multiple lines. White-space has no influence on the code whatsoever.
This method will take alot of lines if i applied it on the whole script.
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)