HEX formatting
#5

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
It does work.

Run:
pawn Код:
#include <a_samp>

main()
{
    new
        string[9],
        color = 0x009900FF;
    format(string, sizeof(string), "{%06x}", color >>> 8);
    print(string);
}
The output is: {009900}
This is a function that I am making. It is supposed to be used like this:
pawn Код:
SendSystemMessage(playerid, 0x009900FF, "This is a message")
It will send a client message that looks like this: "[MSG] This is a message", where the "[]" are blue and the "MSG" is white, and the "This is a message" will be green (or whatever color you use in the function)
Reply


Messages In This Thread
HEX formatting - by sim_sima - 19.12.2013, 14:15
Re: HEX formatting - by Konstantinos - 19.12.2013, 14:20
Re: HEX formatting - by sim_sima - 19.12.2013, 14:26
Re: HEX formatting - by Konstantinos - 19.12.2013, 14:30
Re: HEX formatting - by sim_sima - 19.12.2013, 14:36
Re: HEX formatting - by Konstantinos - 19.12.2013, 14:41
Re: HEX formatting - by sim_sima - 19.12.2013, 14:43
Re: HEX formatting - by Konstantinos - 19.12.2013, 14:51
Re: HEX formatting - by sim_sima - 19.12.2013, 14:55

Forum Jump:


Users browsing this thread: 2 Guest(s)