16.03.2013, 13:55
I'm becoming a bit annoyed. :/
A simple command, SetPlayerColor, it is not working for me.
Here's my code:
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? :/
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;
}
What am I doing wrong? :/