Creates the last object only
#4

Quote:
Originally Posted by AndySedeyn
Посмотреть сообщение
PHP код:
// Get rid of the 'index' variable
for(new icache_get_row_count(); && MAX_TAGS_PER_PLAYERi++) {
    
// Use 'i' to address the second array dimension

So like that?
PHP код:
                function LoadSprayTags(playerid)
                {
                
                    new 
Index tagid[playerid];
                    
cache_get_data(rowsfieldsmysql);
                    for(new 
icache_get_row_count(); && MAX_TAGS_PER_PLAYERi++) 
                    { 
                        
cache_get_field_content(i"TagName"TagInfo[playerid][Index][TagName], mysql,25);
                        
cache_get_field_content(i"TagOwner"TagInfo[playerid][Index][TagOwner], mysql25);
                        
cache_get_field_content(i"TagFont"TagInfo[playerid][Index][TagFont], mysql20);
                        
TagInfo[playerid][Index][TagX] = cache_get_field_content_float(i"TagX");
                        
TagInfo[playerid][Index][TagY] = cache_get_field_content_float(i"TagY");
                        
TagInfo[playerid][Index][TagZ] = cache_get_field_content_float(i"TagZ");
                        
TagInfo[playerid][Index][TagRX] = cache_get_field_content_float(i"TagRX");
                        
TagInfo[playerid][Index][TagRY] = cache_get_field_content_float(i"TagRY");
                        
TagInfo[playerid][Index][TagRZ] = cache_get_field_content_float(i"TagRZ");
                        
TagInfo[playerid][Index][TagFontSize] = cache_get_field_content_int(i"TagFontSize");
                        
TagInfo[playerid][Index][TagFontColor] = cache_get_field_content_int(i"TagFontColor");
                        
TagInfo[playerid][Index][TagBold] = cache_get_field_content_int(i"TagBold");
                        
                        
TagInfo[playerid][i][TagObject] = CreateDynamicObject(19482TagInfo[playerid][i][TagX], TagInfo[playerid][i][TagY], TagInfo[playerid][i][TagZ], TagInfo[playerid][i][TagRX], TagInfo[playerid][i][TagRY], TagInfo[playerid][i][TagRZ], -1, -1, -1300.0300.0);
                        
SetDynamicObjectMaterialText(TagInfo[playerid][i][TagObject], 0TagInfo[playerid][i][TagName], 70TagInfo[playerid][i][TagFont], TagInfo[playerid][i][TagFontSize], 1TagInfo[playerid][i][TagFontColor], 00);
                            
                        new 
str[90];
                        
                        
format(strsizeof(str)," "COL_LIGHTBLUE"Graffiti Owner:"COL_WHITE" %s \n"COL_LIGHTBLUE"Tag ID:"COL_WHITE" %i"TagInfo[playerid][i][TagOwner], TagInfo[playerid][i][TagID]);
                        
TagInfo[playerid][i][TagAdminInfo] = CreateDynamic3DTextLabel(strCOLOR_YELLOWTagInfo[playerid][i][TagX], TagInfo[playerid][i][TagY], TagInfo[playerid][i][TagZ], 100.0);
                            
                        
printf("Name:%s Owner:%s \n Font:%s X:%f Y:%f Z:%f \n RX:%f RY:%f RZ:%f \nFontSize:%d FontColor:%d Bold: %d"TagInfo[playerid][i][TagName], TagInfo[playerid][i][TagOwner], TagInfo[playerid][i][TagFont],
                        
TagInfo[playerid][i][TagX], TagInfo[playerid][i][TagY], TagInfo[playerid][i][TagZ], TagInfo[playerid][i][TagRX], TagInfo[playerid][i][TagRY],TagInfo[playerid][i][TagRZ],
                        
TagInfo[playerid][i][TagFontSize], TagInfo[playerid][i][TagFontColor],TagInfo[playerid][i][TagBold]);
                    }  
                    return 
1;
                } 
Reply


Messages In This Thread
Creates the last object only - by vassilis - 28.10.2016, 10:55
Re: Creates the last object only - by iLearner - 28.10.2016, 10:58
Re: Creates the last object only - by AndySedeyn - 28.10.2016, 11:07
Re: Creates the last object only - by vassilis - 28.10.2016, 11:35
Re: Creates the last object only - by AndySedeyn - 28.10.2016, 11:39
Re: Creates the last object only - by vassilis - 28.10.2016, 12:04

Forum Jump:


Users browsing this thread: 2 Guest(s)