05.07.2016, 09:21
Hello!
Try this:
Try this:
PHP код:
forward LoadGraffiti();
public LoadGraffiti()
{
new Cache: Result = mysql_query(mysql, "SELECT * FROM `graffiti` ORDER BY `graffiti`.`ID` ASC");
new graff = 0, x, result[256], tagname[1000];
for(new i, j = cache_get_row_count (); i != j; ++i)
{
graff ++;
cache_get_field_content(i, "ID", result); x = strval(result); GraffitiInfo[i][gfID] = x; //that is line 15464
cache_get_field_content(i, "X", result); GraffitiInfo[i][gfX] = floatstr(result);
cache_get_field_content(i, "Y", result); GraffitiInfo[i][gfY] = floatstr(result);
cache_get_field_content(i, "Z", result); GraffitiInfo[i][gfZ] = floatstr(result);
cache_get_field_content(i, "Rot", result); GraffitiInfo[i][gfRot] = floatstr(result);
cache_get_field_content(i, "Owned", result); GraffitiInfo[i][gfOwned] = strval(result);
GraffitiInfo[i][gfObject] = CreateDynamicObject(19373, GraffitiInfo[i][gfX], GraffitiInfo[i][gfY], GraffitiInfo[i][gfZ], 0.0, 0.0, GraffitiInfo[i][gfRot]);
//GraffitiInfo[i][gfObject] = CreateDynamicObject(19482, GraffitiInfo[i][gfX], GraffitiInfo[i][gfY], GraffitiInfo[i][gfZ], 0.0, 0.0, GraffitiInfo[i][gfRot]);
if(GraffitiInfo[i][gfOwned] == 0 ) tagname = "None";
else format(tagname, sizeof(tagname), "{%s}%s \n %s", ClanInfo[GraffitiInfo[i][gfOwned]][Color], ClanInfo[GraffitiInfo[i][gfOwned]][Name] ,ClanInfo[GraffitiInfo[i][gfOwned]][Tag]);
SetDynamicObjectMaterialText(GraffitiInfo[i][gfObject], 0, tagname, OBJECT_MATERIAL_SIZE_512x512, "BankGothic Md BT", 60, 1, 0xfff0f0f0, 0, 1);
}
printf("[Graffiti Script]: %d graffiti loaded.", graff);
cache_delete(Result);
return 1;
}