loop doesn't work?!
#1

Hello, after the creation of the loop does not work for me either 3dText or MapIcon.

PHP код:
#define MAX_BAYS 3 
PHP код:
forward ShowBays(playerid);
public 
ShowBays(playerid)
{
    for(new 
id 0id MAX_BAYSid++)
    {
        
SetPlayerMapIcon(id12BayCache[bPosX], BayCache[bPosY], BayCache[bPosZ], 510MAPICON_LOCAL);
    }
    return 
1;

PHP код:
forward LoadBays();
public 
LoadBays()
{
    new 
        
info[256],
        
query[256], 
        
data[256];
    
    
format(querysizeof query"SELECT * FROM `bays`");
    
mysql_query(query);
    
    
mysql_store_result();
    new 
nums mysql_num_rows();
    
printf("[TOWARY] Zaladowano %d towarow."nums);
    for(new 
0numsi++)
    {
        if(
mysql_fetch_row(data","))
        {
            
sscanf(data"p<,>ds[32]fff",
                
BayCache[bUID],
                
BayCache[bName],
                
BayCache[bCargo],
                
BayCache[bPosX],
                
BayCache[bPosY],
                
BayCache[bPosZ]
            );
            
            
format(infosizeof info"{00CC00}[{FFFFFF}%d{00CC00}]\nDok załadunkowy w:\n{00CC00}%s"BayCache[bUID], BayCache[bName]);
            
Create3DTextLabel(info, -1BayCache[bPosX], BayCache[bPosY], BayCache[bPosZ], 0.001);
        }
    }
    
    
    return 
1;

Reply


Messages In This Thread
loop doesn't work?! - by Zevcore - 03.06.2016, 13:41

Forum Jump:


Users browsing this thread: 1 Guest(s)