Customizing colors in SendClientMessage
#7

pawn Код:
// ** INCLUDES

#include <a_samp>
#include <sscanf>
#include <zcmd>

// ** MAIN

main()
{
    print("Loaded \"color_hex_function.amx\".");
}

// ** CALLBACKS

public OnGameModeInit()
{
    return 1;
}

public OnGameModeExit()
{
    return 1;
}

// ** COMMANDS

CMD:color(playerid, params[])
{
    Function(playerid, "0xFFF000FF", "0xFF0000FF");
    return 1;
}

// ** FUNCTIONS

stock Function(playerid, color_1[], color_2[])
{
    new string[144];
    format(string, sizeof(string), "{%06x}Hello {%06x}World!", HexToInt(color_1) >>> 8, HexToInt(color_2) >>> 8);
    SendClientMessage(playerid, -1, string);
    return 1;
}

stock HexToInt(hex[])
{
    new int;
    sscanf(hex, "x", int);
    return int;
}
Reply


Messages In This Thread
Customizing colors in SendClientMessage - by Elie1996 - 04.07.2016, 20:13
Re: Customizing colors in SendClientMessage - by DRIFT_HUNTER - 04.07.2016, 20:36
Re: Customizing colors in SendClientMessage - by Mencent - 04.07.2016, 20:41
Re: Customizing colors in SendClientMessage - by Stinged - 04.07.2016, 21:12
Re: Customizing colors in SendClientMessage - by Elie1996 - 04.07.2016, 21:15
Re: Customizing colors in SendClientMessage - by Stinged - 04.07.2016, 21:33
Re: Customizing colors in SendClientMessage - by SickAttack - 04.07.2016, 21:34
Re: Customizing colors in SendClientMessage - by Elie1996 - 04.07.2016, 23:25
Re: Customizing colors in SendClientMessage - by Elie1996 - 04.07.2016, 23:27
Re: Customizing colors in SendClientMessage - by SickAttack - 05.07.2016, 00:35

Forum Jump:


Users browsing this thread: 1 Guest(s)