player's color (again :v)
#8

Quote:
Originally Posted by BenzoAMG
Посмотреть сообщение
pInfo[playerid][pColor] is the wrong value.

Do this:
pawn Код:
if(pInfo[playerid][pUseCol] == 1)
        {
            /*new color;
            //strmid(color,pInfo[playerid][pColor], 0, strlen(pInfo[playerid][pColor]), 11);
            color = pInfo[playerid][pColor];
            color <<= 8;
            color |= 0xFF;*/

            SetPlayerColor(playerid, pInfo[playerid][pColor]);
            printf("%d", pInfo[playerid][pColor]);
        }
Then see what appears in your server log/console.

EDIT: You can also shorten your code to:

pawn Код:
stock LoadColor(playerid)
    return SetPlayerColor(playerid, ((pInfo[playerid][pUseCol]) ? (pInfo[playerid][pColor]) : (PlayerColors[playerid])));
i will try it...

EDIT:

i've edited my LoadColor into
pawn Код:
stock LoadColor(playerid,onlogin)
{
    if(onlogin == 1) return SetPlayerColor(playerid, ((pInfo[playerid][pUseCol]) ? (pInfo[playerid][pColor]) : (PlayerColors[playerid]))), printf("%d", pInfo[playerid][pColor]);
    return 1;
}
and change the LoadColor at OnPlayerDeath into
pawn Код:
LoadColor(playerid, 0);
Reply


Messages In This Thread
player's color (again :v) - by AiRaLoKa - 18.05.2014, 00:33
Re: player's color (again :v) - by Threshold - 18.05.2014, 00:35
Re: player's color (again :v) - by Dignity - 18.05.2014, 00:36
Re: player's color (again :v) - by AiRaLoKa - 18.05.2014, 00:55
Re: player's color (again :v) - by RajatPawar - 18.05.2014, 02:29
Re: player's color (again :v) - by AiRaLoKa - 18.05.2014, 02:32
Re: player's color (again :v) - by Threshold - 18.05.2014, 04:37
Re: player's color (again :v) - by AiRaLoKa - 18.05.2014, 05:41

Forum Jump:


Users browsing this thread: 1 Guest(s)