SetPlayerColor is not working.
#1

I'm becoming a bit annoyed. :/
A simple command, SetPlayerColor, it is not working for me.
Here's my code:

pawn Код:
public OnPlayerSpawn(playerid)
{

    GetPlayerName(playerid, aname, sizeof(aname));
    format(file, sizeof(file), "Users/%s.ini", aname);
   
    if(fexist(file))
    {
        if(PlayerInfo[playerid][Rented] == 1)
        {
            format(file, sizeof(file), "Houses/House_%d.ini", PlayerInfo[playerid][RentedHouseID]);
            SetPlayerPos(playerid, HouseInfo[PlayerInfo[playerid][RentedHouseID]][ExitX], HouseInfo[PlayerInfo[playerid][RentedHouseID]][ExitY], HouseInfo[PlayerInfo[playerid][RentedHouseID]][ExitZ]);
            SetPlayerVirtualWorld(playerid, HouseInfo[PlayerInfo[playerid][RentedHouseID]][VWorld]);
            SetPlayerInterior(playerid, dini_Int(file, "InteriorID"));
            InHouse[playerid] = true;
        }
    }
    else
    {
        PlayerInfo[playerid][Rented] = 0;
        PlayerInfo[playerid][RentedHouseID] = -1;
        SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
        SetPlayerVirtualWorld(playerid, 0);
        SetPlayerInterior(playerid, 0);
    }
   
   
    // Sets a player's skin to his last used skin on spawn.
    if(fexist(file)) return SetPlayerSkin(playerid, dini_Int(file, "SkinID"));
   
    // Faction player colors.
    if(PlayerInfo[playerid][Faction] > 0)
    {
        if(PlayerInfo[playerid][Tier] == 0)
        {
            SetPlayerColor(playerid, COLOR_PLAYER_TIER_ZERO);
        }
        if(PlayerInfo[playerid][Faction] == 1 && PlayerInfo[playerid][Tier] != 0)
        {
            SetPlayerColor(playerid, COLOR_PLAYER_SINDACCO);
        }
    }
    else
    {
        SetPlayerColor(playerid, 0xFFFFFFFF);
    }
    SetPlayerColor(playerid, 0xFFFFFFFF);
   
    // The end.
    return 1;
}
I've set my account's faction value to 0, therefore everything may be ignored, the rent may be ignored aswell, as it has nothing to do with it, I just wanted to provide the full code.

What am I doing wrong? :/
Reply


Messages In This Thread
SetPlayerColor is not working. - by Denying - 16.03.2013, 13:55
Re: SetPlayerColor is not working. - by [ABK]Antonio - 16.03.2013, 13:57
Re: SetPlayerColor is not working. - by Vince - 16.03.2013, 13:57
Re: SetPlayerColor is not working. - by Denying - 16.03.2013, 13:58
Re: SetPlayerColor is not working. - by [ABK]Antonio - 16.03.2013, 13:59

Forum Jump:


Users browsing this thread: 1 Guest(s)