SA-MP Forums Archive
Does not show the name. - 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: Does not show the name. (/showthread.php?tid=421467)



Does not show the name. - Denying - 09.03.2013

Hey there, first of all - thank you for reading this.

I've the following lines;

pawn Код:
format(housetextadd, sizeof(housetextadd), "\n{FFFFFF}Owner{1BBF39}: {FFFFFF}%s", dini_Get(file, "Owner"));
Create3DTextLabel(housetextadd, 0xFFFFFFFF, x, y, z, 10.0, 0, 0);
It shows the 3D text, but.. it does not show the owner's name. It shows the following:

"Owner: "

Any ideas?


Re: Does not show the name. - DiGiTaL_AnGeL - 09.03.2013

Don't you have a variable for the owner?
pawn Код:
new owner[24] = dini_Get(file, "Owner"));
format(housetextadd, sizeof(housetextadd), "\n{FFFFFF}Owner{1BBF39}: {FFFFFF} %s", owner));
Create3DTextLabel(housetextadd, 0xFFFFFFFF, x, y, z, 10.0, 0, 0);



Re: Does not show the name. - Denying - 09.03.2013

I done it with a variable at the beginning, it did not work, I tried this way and it stayed this way since then.


Re: Does not show the name. - DiGiTaL_AnGeL - 09.03.2013

Edited the post, try it like that.


Re: Does not show the name. - Denying - 09.03.2013

The variable has to be at the size of 256, if I am not wrong. One moment.

EDIT: The size has to be 255 or higher.


Re: Does not show the name. - DiGiTaL_AnGeL - 09.03.2013

Quote:
Originally Posted by Denying
Посмотреть сообщение
The variable has to be at the size of 256, if I am not wrong. One moment.
The variable must be the same with the max characters for the player's name(default 24). You can also use "MAX_PLAYER_NAME".


Re: Does not show the name. - Denying - 09.03.2013

Quote:
Originally Posted by DiGiTaL_AnGeL
Посмотреть сообщение
The variable must be the same with the max characters for the player's name(default 24). You can also use "MAX_PLAYER_NAME".
I know that, but you can not use dini_Get if the variable's size is lower than 255.


Re: Does not show the name. - DiGiTaL_AnGeL - 09.03.2013

I never worked with dini, just with Y INI. Try it like this, and if it doesn't works try it with 256.


Re: Does not show the name. - Denying - 09.03.2013

It does not work, and I tried with 256 and it does not work aswell.


Re: Does not show the name. - DiGiTaL_AnGeL - 09.03.2013

Do you have another string where you use the house owner? And don't you have an enumeration for the house's info?