format string in the head of players ?
#1

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

U.P.
Reply
#3

SetPlayerSpeechBubble? Create3DTextLabel? I'd use Create3DTextLabel.
Reply
#4

This will help you :

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

EDIT: Too late.
Reply
#5

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

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

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?
Reply
#8

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

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
Reply
#10

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


Forum Jump:


Users browsing this thread: 1 Guest(s)