#1

From

SetPlayerColor(playerid, dini_Int(org2,"Color"));

to something like

SetPlayerColor(playerid, dini_Get(org2,"Color"));


i gonna wait this time.
Reply
#2

lol, why would you use "dini" for SetPlayerColor?
Reply
#3

pawn Код:
SetPlayerColor(playerid, strval(dini_Get(org2,"Color")));
Like this or what?
Reply
#4

Okay basically i making something dynamic..

On my org1.ini
Код:
color=0x9BFF00FF
I want tat color to appear my player color.

But it seems not to be changing my name color. Its suppose to be green but turned out black.
Reply
#5

I can't think of any way now. Maybe there is even no way. But dunno.
Reply
#6

Put this function in your script

pawn Код:
stock HexToInt(string[])
{
    if (string[0]==0) return 0;
    new i;
    new cur=1;
    new res=0;
    for (i=strlen(string);i>0;i--)
    {
        if (string[i-1]<58) res=res+cur*(string[i-1]-48); else res=res+cur*(string[i-1]-65+10);
        cur=cur*16;
    }
    return res;
}
then use

pawn Код:
SetPlayerColor(playerid, HexToInt(dini_Get(org2,"Color")));
Reply
#7

Thanks!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)