23.08.2016, 15:17
Hello i have a system that ingame creates 3d labels but when server restarts its not loading them all the labels are in the .txt file how can i load that txt file when server is loading..
This is the text that is in the Texts.txt : Create3DTextLabel("test!",0x3A47DEFF,2637.90, 1129.06, 11.17,30.0,1);
AND this is how i save them new File:file,str[256]; file=fopen("Texts.txt",io_append); new Float,Float:y,Float:z; GetPlayerPos(playerid,x,y,z); Create3DTextLabel(inputtext,COLOR_RED,x,y,z,30.0,0 ,1); format(str, 256, "\r\nCreate3DTextLabel(\"%s\",0xFF0000AA,%.2f, %.2f, %.2f,30.0,1);" ,inputtext, x, y, z); fwrite(file,str); fwrite(file,"\r\n"); fclose(file); |
enum L_DATA
{
ID,
Text[256],
Color,
Float:POSX,
Float:POSY,
Float:POSZ,
Float:Distance,
World
}
new Text3D:Label[MAX_LABELS][L_DATA];