Quantcast
Channel: SA-MP Forums
Viewing all articles
Browse latest Browse all 18226

loop doesn't work?!

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

PHP Code:

#define MAX_BAYS 3 

PHP Code:

forward ShowBays(playerid);
public 
ShowBays(playerid)
{
    for(new 
id 0id MAX_BAYSid++)
    {
        
SetPlayerMapIcon(id12BayCache[bPosX], BayCache[bPosY], BayCache[bPosZ], 510MAPICON_LOCAL);
    }
    return 
1;


PHP Code:

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;



Viewing all articles
Browse latest Browse all 18226

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>