How can I make my game text show like this?
#1

In my admin script I have /slap and other commands too, but I want to do something specific.

When I /slap them, I want it to show this game text on their screen:



I already have a reason that shows why I slapped them in the chat using SendClientMessageToAll but I also want it to show like the above picture on the player's screen that is being slapped, but the problem is instead of it showing the red "Admin Slap" message and white reason, it shows up like this with the ugly yellow default colour:



I'm not sure what I'm doing wrong, but here is what the code looks like:

pawn Код:
format(string,sizeof(string),"**SLAP:  %s (%d)  (ADMIN SLAP)  %s ",playername,player1,params[2]);    SendClientMessageToAll(COLOR_PINK,string);
format(string,sizeof(string),"~r~admin slap: ~w~%s ",params[2]);    GameTextForPlayer(playerid,params[2],3000,1);
(Scroll RIGHT -> to see the rest of the code)

On the 1st Pawn line, that's the text that shows up in the chat to everyone, which works FINE.

The 2nd line shows the game text for the specific player, and as I mentioned earlier, it only shows up with the default yellow colour. Note on the second line I have the ~r~ and ~w~ params to make the text red and white just like in the first picture, except I did /announce to show what I want it too look like. The second pic shows what happened when i did /slap [reason] and what it looked like.

Sorry for so much info, but I hope you understand me Let me know if you don't.
Reply
#2

I'm taking a lucky guess here, but maybe try a different style ?

https://sampwiki.blast.hk/wiki/GameTextForPlayer
Reply
#3

Use {}

Example:

{CCFFDD}
Reply
#4

Quote:
Originally Posted by Snipa
Посмотреть сообщение
Use {}

Example:

{CCFFDD}
I guess that could work, but some styles (i think) still don't change color when u use that o.O
Reply
#5

Quote:
Originally Posted by marinov
Посмотреть сообщение
I'm taking a lucky guess here, but maybe try a different style ?

https://sampwiki.blast.hk/wiki/GameTextForPlayer
Hmm, I heard the same thing that certain styles don't work with strings. I'll give that a try tomorrow and see how it works and let you know !

Quote:
Originally Posted by Snipa
Посмотреть сообщение
Use {}

Example:

{CCFFDD}
Do those colour codes legitimately work on any game text instead of ~w~ and ~p~ and ~r~ etc... ?

I'll give that a try tomorrow too and let you know, thanks !
Reply
#6

Well, I've tried both of those suggestions but they still don't work, any other ideas?
Reply
#7

The images dont display. And unless it displays you cant be helped. Better update the images.
Reply
#8

Quote:
Originally Posted by deather
Посмотреть сообщение
The images dont display. And unless it displays you cant be helped. Better update the images.
I sent you a PM.
Reply
#9

The image still displays as the ones above. Can you upload it to some other site like photobucket?
Reply
#10

Quote:
Originally Posted by deather
Посмотреть сообщение
The image still displays as the ones above. Can you upload it to some other site like photobucket?
D: You have to make an account on that, and I don't have the time lol, I re-uploaded it to imageshack:

Try here:

/imageshack/g/samp0672.png/
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)