SA-MP Forums Archive
format string in the head of players ? - 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: format string in the head of players ? (/showthread.php?tid=421638)



format string in the head of players ? - Saw® - 10.03.2013

EDITTING :

How to format like Kills:%d\nMoney:%d I mean how to display them above players' head & make the distance between head & string 1cm for ex...


Re: format string in the head of players ? - Saw® - 11.04.2013

U.P.


Re: format string in the head of players ? - Luis- - 11.04.2013

SetPlayerSpeechBubble? Create3DTextLabel? I'd use Create3DTextLabel.


Re: format string in the head of players ? - SilverKiller - 11.04.2013

This will help you :

https://sampwiki.blast.hk/wiki/SetPlayerChatBubble

EDIT: Too late.


Re: format string in the head of players ? - Saw® - 12.04.2013

thanks ,so it can be used with the format ?
EX
pawn Код:
new string[200]
format(blabla)
SetPlayerChatBubble(playerid,string, 0xFF0000FF, 100.0, 10000);



Re: format string in the head of players ? - Isolated - 12.04.2013

Why do you need 200 characters? Atleast attempt to optimize it :P


Re: format string in the head of players ? - Saw® - 14.04.2013

Quote:
Originally Posted by Isolated
Посмотреть сообщение
Why do you need 200 characters? Atleast attempt to optimize it :P
I use 200 characters in every format I add, how can we know how many characters the player will trype ? yea it can be 100 , but who knows?


Re: format string in the head of players ? - [XST]O_x - 14.04.2013

The length of the word Kills(plus ":") is 6. Add in 3 characters for the kill number and 1 for the space. That's 10.
The length of the world Money(plus ":") is also 6. Add in 7 characters for the money amount and 1 for the space. That's another 14. Total of 24.
Add in some extra characters, just to make sure. Make it 32.
32, 200, see the difference? You won't need more than 32...


Re: format string in the head of players ? - Saw® - 15.04.2013

Quote:
Originally Posted by [XST]O_x
Посмотреть сообщение
The length of the word Kills(plus ":") is 6. Add in 3 characters for the kill number and 1 for the space. That's 10.
The length of the world Money(plus ":") is also 6. Add in 7 characters for the money amount and 1 for the space. That's another 14. Total of 24.
Add in some extra characters, just to make sure. Make it 32.
32, 200, see the difference? You won't need more than 32...
Yea you've right , I should make it more accurate , but making a new string[200] has disadvantages? thanks


Re: format string in the head of players ? - [XST]O_x - 15.04.2013

Quote:
Originally Posted by Saw®
Посмотреть сообщение
Yea you've right , I should make it more accurate , but making a new string[200] has disadvantages? thanks
Ofcourse it does, if it didn't, everyone would have 1024 cell strings all over the place.
It makes the compiled file heavier (takes more time to compile), and it slows the server.