Hi zusammen,
habe hier 2 Teams gescriptet, die eig Unterschiedliche Farben haben sollten.
habe es auch im Script geändert, sogar mit SetPlayerToTeamColor, aber es funktioniert nicht.
Hier mein Code :
forward SetPlayerTeamFromClass(i);
public SetPlayerTeamFromClass(i)
{
new classid = GetPlayerSkin(i);
if (classid == 124 || classid == 112 || classid == 111 || classid == 114 || classid == 125) { //MAFIA
SetPlayerTeam(i, TEAM_MAFIA);
SetPlayerColor(i, 0x9ACD32AA);
}
else if (classid == 280 || classid == 281 || classid == 283 || classid == 285 || classid == 286) { //COPS
SetPlayerTeam(i, TEAM_COPS);
SetPlayerColor(i, 0x33CCFFAA);
}
}
Hier wird ihnen nochmal der Farbwert gegeben.
public OnPlayerRequestClass(playerid, classid)
{
new TEAM_MAFIA;
new TEAM_POLICE;
if(classid == 0)
{
GameTextForPlayer(playerid, "~r~Mafia", 2000, 5);
SetPlayerColor(playerid, 0x9ACD32AA);
gTeam[playerid] = TEAM_MAFIA;
}
else if(classid == 1)
{
GameTextForPlayer(playerid, "~r~Mafia", 2000, 5);
SetPlayerColor(playerid, 0x9ACD32AA);
gTeam[playerid] = TEAM_MAFIA;
}
else if(classid == 2)
{
GameTextForPlayer(playerid, "~r~Mafia", 2000, 5);
SetPlayerColor(playerid, 0x9ACD32AA);
gTeam[playerid] = TEAM_MAFIA;
}
else if(classid == 3)
{
GameTextForPlayer(playerid, "~r~Mafia", 2000, 5);
SetPlayerColor(playerid, 0x9ACD32AA);
gTeam[playerid] = TEAM_MAFIA;
}
else if(classid == 4)
{
GameTextForPlayer(playerid, "~r~Mafia", 2000, 5);
SetPlayerColor(playerid, 0x9ACD32AA);
gTeam[playerid] = TEAM_MAFIA;
}
else if(classid == 5)
{
GameTextForPlayer(playerid, "~b~Police", 2000, 5);
SetPlayerColor(playerid, 0x33CCFFAA);
gTeam[playerid] = TEAM_POLICE;
}
else if(classid == 6)
{
GameTextForPlayer(playerid, "~b~Police", 2000, 5);
SetPlayerColor(playerid,0x33CCFFAA);
gTeam[playerid] = TEAM_POLICE;
}
else if(classid == 7)
{
GameTextForPlayer(playerid, "~b~Police", 2000, 5);
SetPlayerColor(playerid,0x33CCFFAA);
gTeam[playerid] = TEAM_POLICE;
}
else if(classid == 8)
{
GameTextForPlayer(playerid, "~b~Police", 2000, 5);
SetPlayerColor(playerid, 0x33CCFFAA);
gTeam[playerid] = TEAM_POLICE;
}
else if(classid == 9)
{
GameTextForPlayer(playerid, "~b~Police", 2000, 5);
SetPlayerColor(playerid, 0x33CCFFAA);
gTeam[playerid] = TEAM_POLICE;
}
Habe geschaut, es ist kein SetPlayerColor bei OnPlayerSpawn bzw bei OnPlayerConnect drine.
Hoffe auf Hilfe.
Edit : Fehler gefunden -- CLOSED