Help Chat colors
#1

Hello guys I need someone to help me
I want to script something..
when someone from a group and when he talk in main chat his name would be colored as his badge color g_hDutyColour can someone help me?
Reply
#2

Well, by default the chat is like this:
(name in player's color, settable with SetPlayerColor): (what the player typed)

So technically all you need to do is set the players color to the badge color. However, you may have the player's color set to something you want separate.

If g_hDutyColour is in RGB format, you can simply send it like this in OnPlayerText:
pawn Код:
OnPlayerText(playerid, text[]) {
    SendClientMessageToAll(g_hDutyColour[playerid], text);
    return 0; // so the default message isn't sent
}
If it's in RGBA format, you need to right shift the color (which I will not go into depth with here).
pawn Код:
OnPlayerText(playerid, text[]) {
    SendClientMessageToAll(g_hDutyColour[playerid] >> 8, text);
    return 0; // so the default message isn't sent
}
Reply
#3

Okay thank you I will test it and I will tell you please keep checking on the post ^_^
Reply
#4

That was just example code, you have to know how to implement it.
Reply
#5

You know what is problem with almost everyone @Crayder. If you give them exaple of code, they say "Okay i will go test it now", and because they didn't learned pawno properly they will come again saying "Damn idiot that didn't worked. Don't help me anymore". I just don't know...
Reply
#6

I'd call it laziness. Getting someone else to do the work you could be doing with just a little effort. And trust me, PAWN doesn't take much effort to learn the base of.
Reply
#7

They are going like "Okay lets start learning PAWN. First thing i will go to forum and ask them to make me commands, But one at time so they don't suspect anything. Okay half of job done. Now I will put my name as scripter and put GM online. YEA!!". But on first problem they will be f***** up
Reply
#8

PAWN isnt really a language, its a broken down version of C.
Reply
#9

Quote:
Originally Posted by KevinExec
Посмотреть сообщение
PAWN isnt really a language, its a broken down version of C.
Not to go off topic but...

Bullshit it's not a language! What makes you think it's not a language? And no it's not a "broken down version of C". It's similar to C-like languages because it was built to be.

I seriously want you to explain to all of us how PAWN is not a language.
Reply
#10

You said that pawn is broken version of C. You realise that most languages are written in C and by following your example only C is language
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)