SA-MP Forums Archive
Name does not appear - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Name does not appear (/showthread.php?tid=154672)



Name does not appear - wofka13 - 14.06.2010

(Sry for bad English )

Hi all,
I have a problem, and although the name does not appear,

Код:
//3DTextLabels
	for(new i=0;i<MAX_HOUSES;i++)
	{
	  if(INI_Open("Haus.cfg"))
	  {
		  new string[256];
			format(string, 32, "eX%d",i);
			HausInfo[i][eX] = INI_ReadFloat(string);
			format(string, 32, "eY%d",i);
			HausInfo[i][eY] = INI_ReadFloat(string);
			format(string, 32, "eZ%d",i);
			HausInfo[i][eZ] = INI_ReadFloat(string);
			format(string, 32, "Besitzer%d",i);
			HausInfo[i][Besitzer] = INI_ReadInt(string);
			format(string,sizeof(string),".:[Haus Information]:. \nLevel:5\nPreis:1000$\nInhaber:%d",HausInfo[i][Besitzer]);
			Create3DTextLabel(string,0x0099FFFF,HausInfo[i][eX], HausInfo[i][eY], HausInfo[i][eZ],40.0,0);
		}
	}
The problem is (Besitzer)
In the game displayed by Create3DTextLabel, only Inhaber (Besitzer) a 0

Does anybody know where is here the error?
Код:
format(string, 32, "Besitzer%d",i);
HausInfo[i][Besitzer] = INI_ReadInt(string);
format(string,sizeof(string),".:[Haus Information]:. \nLevel:5\nPreis:1000$\nInhaber:%d",HausInfo[i][Besitzer]);
@Haus.cfg
Besitzer0=Staat
Actually, there should be 'Staat' and are not '0 '




Re: Name does not appear - Cameltoe - 14.06.2010

try using %s instead of %d


Re: Name does not appear - wofka13 - 14.06.2010

Not Work


Re: Name does not appear - Cameltoe - 14.06.2010

format(string, 32, "Besitzer%s",i);
HausInfo[i][Besitzer] = INI_ReadInt(string);
format(string,sizeof(string),".:[Haus Information]:. \nLevel:5\nPreis:1000$\nInhaber:%s",HausInfo[i][Besitzer]);


Re: Name does not appear - wofka13 - 15.06.2010

Quote:
Originally Posted by Cameltoe
format(string, 32, "Besitzer%s",i);
HausInfo[i][Besitzer] = INI_ReadInt(string);
format(string,sizeof(string),".:[Haus Information]:. \nLevel:5\nPreis:1000$\nInhaber:%s",HausInfo[i][Besitzer]);
Thx for the answer, but it dont work


Re: Name does not appear - wofka13 - 16.06.2010

can anyone help me?


Re: Name does not appear - (SF)Noobanatior - 16.06.2010


Код:
new playername[MAX_PLAYER_NAME];

GetPlayerName(i,playername,sizeof(playername);

format(string, 32, "Besitzer%s",playername);



Re: Name does not appear - Cameltoe - 16.06.2010

Hey again, look in this post:

http://forum.sa-mp.com/index.php?topic=143553.0

and i'm 100% sure you will find a fix


Re: Name does not appear - wofka13 - 16.06.2010

I've discovered there is not really what