hex to RGBA?
#10

Quote:
Originally Posted by Albon
Посмотреть сообщение
Okay here's my dialog:
For example if my input is "FFFF00" the HEX will become FFFFFF00 without the 0x at the beginning and the color of the object wouldn't change either.

pawn Код:
//CODE
Yeah pretty much

If you use sscanf you don't need isnull, if you still want to use it you need to use && (and) not || (or)
pawn Код:
if(response)
{
    new hex;
    if(sscanf(inputtext, "h", hex))
        return RedNoticeEx(playerid, "Invalid HEX color."), ShowTextureColorChange(playerid, FMatSlot[playerid]);
    new matmodel, txdname[45], texturename[45], color;
    //some as before
}
For SCMEx i hope you use a function and not a macro, see
http://pastebin.com/JcX7qFGd
macro would be SCM1, use a version with emit like SCM2, SCM3 or SM4 (best) \/
http://forum.sa-mp.com/showthread.ph...88#post2857588
Reply


Messages In This Thread
hex to RGBA? - by Albon - 11.02.2015, 20:51
Re: hex to RGBA? - by Vince - 11.02.2015, 20:55
Re: hex to RGBA? - by Dignity - 11.02.2015, 20:56
Re: hex to RGBA? - by Albon - 11.02.2015, 23:18
Re: hex to RGBA? - by Jefff - 11.02.2015, 23:42
Re: hex to RGBA? - by Albon - 12.02.2015, 00:08
AW: hex to RGBA? - by Nero_3D - 12.02.2015, 00:27
Re: hex to RGBA? - by PaulDinam - 12.02.2015, 00:47
Re: AW: hex to RGBA? - by Albon - 12.02.2015, 01:04
AW: Re: AW: hex to RGBA? - by Nero_3D - 12.02.2015, 01:42

Forum Jump:


Users browsing this thread: 3 Guest(s)