24.05.2013, 13:32
Hey guys, When i load up my server on my local computer i'm trying to load all the textlables by id from the database
it prints that it loaded ID: 1 and 2 but when i go into the game the texttable hasn't been created, The code i've made is below if anyone can help me solve this it would be great.
it prints that it loaded ID: 1 and 2 but when i go into the game the texttable hasn't been created, The code i've made is below if anyone can help me solve this it would be great.
pawn Код:
stock LoadDynamicTextLables()
{
format(Query, sizeof(Query), "SELECT * FROM `DynamicATMS`");
mysql_query(Query);
mysql_store_result();
new AtmID,TextRow1[100],TextRow2[100], Float:A_X, Float:A_Y, Float:A_Z,string[300];
new Count = 0,Fetched[150];
while(mysql_fetch_row_format(Query,"|"))
{
sscanf(Fetched, "p<|>ds[100]s[100]fff", AtmID, TextRow1, TextRow2, A_X, A_Y, A_Z);
format(string,sizeof(string),"T1: %s\nT2: %d", TextRow1,TextRow2);
Create3DTextLabel(string, 0xFFFFFF, A_X, A_Y, A_Z, 20.0, 0, 0);
Count ++;
printf("Dynamic Lable Created [ID: %d]", Count);
}
return 1;
}