Question: Hex to Embed
#10

Same thing you asked for:

pawn Код:
#define HexToEmbed(%0) HexToEmbed_Final(#%0)

stock HexToEmbed_Final(szHex[])
{
    new
        szVal[16];
       
    format(szVal, sizeof(szVal), "{%s}", szHex);
    strdel(szVal, 1, 3);
    strdel(szVal, strlen(szVal) - 3, strlen(szVal) - 1);
    return szVal;
}

// Example: printf("%s", HexToEmbed(0xFFFF00FF));
// Output: {FFFF00}
Reply


Messages In This Thread
Question: Hex to Embed - by Sniper Kitty - 19.09.2012, 04:07
Re: Question: Hex to Embed - by YourLord - 19.09.2012, 05:09
Re: Question: Hex to Embed - by Sniper Kitty - 19.09.2012, 05:11
Re: Question: Hex to Embed - by YourLord - 19.09.2012, 05:30
Re: Question: Hex to Embed - by Sniper Kitty - 19.09.2012, 05:43
Re: Question: Hex to Embed - by XtremeR - 19.09.2012, 06:00
Re: Question: Hex to Embed - by Sniper Kitty - 19.09.2012, 06:02
Re: Question: Hex to Embed - by XtremeR - 19.09.2012, 06:07
Re: Question: Hex to Embed - by Sniper Kitty - 19.09.2012, 06:10
Re: Question: Hex to Embed - by Emmet_ - 19.09.2012, 06:19

Forum Jump:


Users browsing this thread: 7 Guest(s)