Labels
#1

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..
Reply
#2

Show the file and how you save them, and what files include you use?
Reply
#3

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);
Reply
#4

Quote:
Originally Posted by RuNBoY
Посмотреть сообщение
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);
First, i advise you to use a files include, like dini2 is best imo.
And, that's not how to save labels, it's should be using enums like
PHP код:
enum L_DATA
{
        
ID,
    
Text[256],
    
Color,
    
Float:POSX,
    
Float:POSY,
     
Float:POSZ,
     
Float:Distance,
     
World
}
new 
Text3D:Label[MAX_LABELS][L_DATA]; 
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)