Guten Morgen,
ich habe folgendes Problem. Ingame wird von keine Spieler aus keiner Fraktion der Name nicht farbig angezeigt und der Spieler selber erscheint auch nicht auf der Karte. Ich weis langsam nicht mehr weiter, nach so vielen Versuchen dies zu beheben. Jede Fraktion sollte Normalerweise eine Farbe haben und auch mit dieser auf der Map angezeigt werden. Hier mal die Versuche es zu beheben im Script:
public OnGameModeInit()
blablabla
ShowPlayerMarkers(2);
blablabla
weiter unten in OnGameModeInit:
SetTimer("SmallPlayerUpdate",2000,1);
blablabla
public SmallPlayerUpdate(playerid)
{
if(IsPlayerConnected(playerid))
{
if(gPlayerLogged[playerid])
{
SetPlayerToTeamColor(playerid);
if(PlayerInfo[playerid][pLeader] == 3 || PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 8 || PlayerInfo[playerid][pMember] == 8)
{
if(GetPlayerWeapon(playerid) == 34)
{
SetPlayerAttachedObject(playerid,3 , 18643, 6, 0.158249, 0.010233, 0.128052, 6.868255, 351.962524, 356.884216);
}
else
{
RemovePlayerAttachedObject(playerid,3);
}
}
}
}
}
public SetPlayerToTeamColor(playerid)
{
for(new i = 0; i <MAX_PLAYERS; i++)
if(PlayerInfo[playerid][pRank] >= 0)
{
if(PlayerInfo[playerid][pMember] == 0 || PlayerInfo[playerid][pLeader] == 0)
{
SetPlayerColor(playerid,ZIVIFARBE);
SetPlayerMarkerForPlayer(i,playerid,ZIVIFARBE);
}
if (PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
{
SetPlayerColor(playerid,SAPDFARBE);
SetPlayerMarkerForPlayer(i,playerid,SAPDFARBE);
}
if (PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2)
{
SetPlayerColor(playerid,ZIVIFARBE);
SetPlayerMarkerForPlayer(i,playerid,ZIVIFARBE);
}
if (PlayerInfo[playerid][pMember] == 13 || PlayerInfo[playerid][pLeader] == 13)
{
SetPlayerColor(playerid,GROVEFARBE);
SetPlayerMarkerForPlayer(i,playerid,GROVEFARBE);
}
if (PlayerInfo[playerid][pMember] == 12 || PlayerInfo[playerid][pLeader] == 12)
{
SetPlayerColor(playerid,ZIVIFARBE);
SetPlayerMarkerForPlayer(i,playerid,ZIVIFARBE);
}
if (PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3)
{
SetPlayerColor(playerid,ARMYFARBE);
SetPlayerMarkerForPlayer(i,playerid,ARMYFARBE);
}
if (PlayerInfo[playerid][pMember] == 4 || PlayerInfo[playerid][pLeader] == 4)
{
SetPlayerColor(playerid,SANIFARBE);
SetPlayerMarkerForPlayer(i,playerid,SANIFARBE);
}
if (PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pLeader] == 5)
{
SetPlayerColor(playerid,ZIVIFARBE);
SetPlayerMarkerForPlayer(i,playerid,ZIVIFARBE);
}
if (PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pLeader] == 6)
{
SetPlayerColor(playerid,ZIVIFARBE);
SetPlayerMarkerForPlayer(i,playerid,ZIVIFARBE);
}
if (PlayerInfo[playerid][pLeader] == 7)
{
SetPlayerColor(playerid,PRAESIFARBE);
SetPlayerMarkerForPlayer(i,playerid,PRAESIFARBE);
}
if (PlayerInfo[playerid][pMember] == 7)
{
SetPlayerColor(playerid,BODYFARBE);
SetPlayerMarkerForPlayer(i,playerid,BODYFARBE);
}
if (PlayerInfo[playerid][pMember] == 16 || PlayerInfo[playerid][pLeader] == 16)
{
SetPlayerColor(playerid,ZIVIFARBE);
SetPlayerMarkerForPlayer(i,playerid,ZIVIFARBE);
}
if (PlayerInfo[playerid][pMember] == 17 || PlayerInfo[playerid][pLeader] == 17)
{
SetPlayerColor(playerid,ZIVIFARBE);
SetPlayerMarkerForPlayer(i,playerid,ZIVIFARBE);
}
if (PlayerInfo[playerid][pMember] == 18 || PlayerInfo[playerid][pLeader] == 18)
{
SetPlayerColor(playerid,ZIVIFARBE);
SetPlayerMarkerForPlayer(i,playerid,ZIVIFARBE);
}
if (PlayerInfo[playerid][pMember] == 19 || PlayerInfo[playerid][pLeader] == 19)
{
SetPlayerColor(playerid,ZIVIFARBE);
SetPlayerMarkerForPlayer(i,playerid,ZIVIFARBE);
}
if (PlayerInfo[playerid][pMember] == 20 || PlayerInfo[playerid][pLeader] == 20)
{
SetPlayerColor(playerid,TERRORFARBE);
SetPlayerMarkerForPlayer(i,playerid,TERRORFARBE);
}
if (PlayerInfo[playerid][pMember] == 21 || PlayerInfo[playerid][pLeader] == 21)
{
SetPlayerColor(playerid,ZIVIFARBE);
SetPlayerMarkerForPlayer(i,playerid,ZIVIFARBE);
}
if (PlayerInfo[playerid][pMember] == 22 || PlayerInfo[playerid][pLeader] == 22)
{
SetPlayerColor(playerid,ZIVIFARBE);
SetPlayerMarkerForPlayer(i,playerid,ZIVIFARBE);
}
if (PlayerInfo[playerid][pMember] == 23 || PlayerInfo[playerid][pLeader] == 23)
{
SetPlayerColor(playerid,ZIVIFARBE);
SetPlayerMarkerForPlayer(i,playerid,ZIVIFARBE);
}
if (PlayerInfo[playerid][pMember] == 24 || PlayerInfo[playerid][pLeader] == 24)
{
SetPlayerColor(playerid,OAMTFARBE);
SetPlayerMarkerForPlayer(i,playerid,OAMTFARBE);
}
if (PlayerInfo[playerid][pMember] == 8 || PlayerInfo[playerid][pLeader] == 8)
{
SetPlayerColor(playerid,HITMANFARBE);
SetPlayerMarkerForPlayer(i,playerid,HITMANFARBE);
}
if (PlayerInfo[playerid][pMember] == 9 || PlayerInfo[playerid][pLeader] == 9)
{
SetPlayerColor(playerid,REPORTERFARBE);
SetPlayerMarkerForPlayer(i,playerid,REPORTERFARBE);
}
}
}
Achso: Die Farben sind oben schon alle definiert ;)
hab mal unnötiges weggelassen hier hin zu schreiben
Also noch was: das mit dem Laser Update an der Sniper Klappt ja, nur die Namensfarbe flackert manchmal für ein paar millisekunden auf aber man sieht auch keinen auf der karte. wäre dankbar für hilfe
Mfg FishToast