Labels load with bad pos. - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Labels load with bad pos. (
/showthread.php?tid=315352)
Labels load with bad pos. -
[Nikk] - 02.02.2012
Hey, i have a system for make labels in game, and load from a .txt, but my problem is what the pos of the labels are bugged when they load, example, i have this in the txt:
pawn Код:
123.451, 12.2, 0.5, This is a test label 1//
1253.4551, 2612.2, 1.5, This is a test label 2 //the label 2 are in the same pos what label 1
Here is the code when the labels load:
pawn Код:
stock AgregarLabels(LFileName[])
{
if(!fexist(LFileName)) return 0;
new File:LFile, Line[128], LabelInfo[128], Float:LX, Float:LY, Float:LZ, lTotal = 0;
LFile = fopen(LFileName, io_read);
while(fread(LFile, Line))
{
if(Line[0] == '/' || isnull(Line)) continue;
unformat(Line, "p<,>s[128]fff", LabelInfo,LX,LY,LZ);
//CreateDynamic3DTextLabel(LabelInfo, COLOR_LIGHTGREEN, LX, LY, LZ, 100.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, -1, -1, -1, 100.0);
//ForRndColorLabel
CreateDynamic3DTextLabel(LabelInfo, ForRndColorLabel[random(sizeof(ForRndColorLabel))], LX, LY, LZ, 100.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, -1, -1, -1, 100.0);
lTotal++;
}
fclose(LFile);
return lTotal;
}
Respuesta: Labels load with bad pos. -
[Nikk] - 03.02.2012
someone can help me please ? this is urgent.
Re: Labels load with bad pos. -
Jefff - 03.02.2012
Must be
unformat(Line, "p<,>fffs[128]",LX,LY,LZ,LabelInfo);
Respuesta: Labels load with bad pos. -
[Nikk] - 04.02.2012
Now labels dont load !! Anyone can help me please ? Thanks.