gTeam Problem

Wichtiger Hinweis: Bitte ändert nicht manuell die Schriftfarbe auf schwarz sondern belasst es bei der Standardeinstellung. Somit tragt ihr dazu bei dass euer Text auch bei Verwendung unseren dunklen Forenstils noch lesbar ist!

Tipp: Ihr wollt längere Codeausschnitte oder Logfiles bereitstellen? Benutzt unseren eigenen PasteBin-Dienst Link
  • SetPlayerTeamFromClass(playerid,classid)
    {
    if(classid == 269 || classid == 270 || classid == 271 || classid == 105 || classid == 106 || classid == 107 )
    {
    gTeam[playerid] = TEAM_GROVE;
    }
    if(classid == 102 || classid == 103 || classid == 104)
    {
    gTeam[playerid] = TEAM_BALLAS;
    }
    if(classid == 108 || classid == 109 || classid == 110)
    {
    gTeam[playerid] = TEAM_VAGOS;
    }
    if(classid == 114 || classid == 115 || classid == 116)
    {
    gTeam[playerid] = TEAM_VATOSLOCOS;
    }
    if(classid == 117 || classid == 118 || classid == 120)
    {
    gTeam[playerid] = TEAM_TRIADEN;
    }
    if(classid == 167)
    {
    gTeam[playerid] = TEAM_ADMINS;
    }
    if(classid == 247 || classid == 248 || classid == 254 )
    {
    gTeam[playerid] = TEAM_BIKER;
    }
    if(classid == 280 || classid == 281 || classid == 282 || classid == 283 || classid == 284 || classid == 288 )
    {
    gTeam[playerid] = TEAM_COPS;
    }
    if(classid == 117 || classid == 118 || classid == 120)
    }


    SetPlayerToTeamColor(playerid)
    {
    if (gTeam[playerid] == TEAM_GROVE)
    {
    SetPlayerColor(playerid, TEAM_GROVE_COLOR);
    }
    else if (gTeam[playerid] == TEAM_BALLA)
    {
    SetPlayerColor(playerid, TEAM_BALLA_COLOR);
    }
    else if(gTeam[playerid] == TEAM_VAGOS)
    {
    SetPlayerColor(playerid, TEAM_VAGOS_COLOR);
    }
    else if(gTeam[playerid] == TEAM_VATOSLOCOS)
    {
    SetplayerColor(playerid, TEAM_VATOSLOCOS_COLOR);
    }
    else if(gTeam[playerid] == TEAM_TRIADEN)
    {
    SetPlayerColor(playerid, TEAM_TRIADEN_COLOR);
    }
    else if(gTeam[playerid] == TEAM_BIKER)
    {
    SetPlayerColor(playerid, TEAM_BIKER);
    }
    else if(gTeam[playerid] == TEAM_COPS)
    {
    SetPlayerColor(playerid, TEAM_COPS_COLOR);
    }
    else if(gTeam[playerid] == TEAM_ADMINS)
    {
    SetPlayerColor(playerid, TEAM_ADMINS_COLOR);
    }
    }


    Da habe ich 1 Error und 1 Warning :
    (383) : error 017: undefined symbol "SetPlayerToTeamColor"
    (655) : warning 203: symbol is never used: "SetPlayerTeamFromClass"


    Zeile 383 ::: public OnPlayerSpawn(playerid)
    {
    SetPVarInt(playerid, "FirstAid", 0);
    SendClientMessage(playerid,0x33CCFFAA,"*** Du hast einen Verbandskasten erhalten. Um ihn zu benutzen tippte /firstaid ein.");
    SendClientMessage(playerid,0xFFFFFFAA,"*** Tippe /help ein, um eine Liste der Commandos zu bekommen.");
    SetPlayerToTeamColor(playerid);
    return 1;


    Zeile 655 ::: SetPlayerToTeamColor(playerid)
    {
    if (gTeam[playerid] == TEAM_GROVE)
    {
    SetPlayerColor(playerid, TEAM_GROVE_COLOR);
    }
    else if (gTeam[playerid] == TEAM_BALLA)
    {
    SetPlayerColor(playerid, TEAM_BALLA_COLOR);
    }
    else if(gTeam[playerid] == TEAM_VAGOS)
    {
    SetPlayerColor(playerid, TEAM_VAGOS_COLOR);
    }
    else if(gTeam[playerid] == TEAM_VATOSLOCOS)
    {
    SetplayerColor(playerid, TEAM_VATOSLOCOS_COLOR);
    }
    else if(gTeam[playerid] == TEAM_TRIADEN)
    {
    SetPlayerColor(playerid, TEAM_TRIADEN_COLOR);
    }
    else if(gTeam[playerid] == TEAM_BIKER)
    {
    SetPlayerColor(playerid, TEAM_BIKER);
    }
    else if(gTeam[playerid] == TEAM_COPS)
    {
    SetPlayerColor(playerid, TEAM_COPS_COLOR);
    }
    else if(gTeam[playerid] == TEAM_ADMINS)
    {
    SetPlayerColor(playerid, TEAM_ADMINS_COLOR);
    }
    }


    Ich hoffe, ihr könnt mir weiterhelfen sitze jetzt schon ziemlich lange an dieser Gangsache...
    MfG EazyE

  • Danke einen Warning habe ich noch


    (655) : warning 203: symbol is never used: "SetPlayerTeamFromClass"


    Funktion der Zeile 655 :::
    SetPlayerToTeamColor(playerid)
    {
    if (gTeam[playerid] == TEAM_GROVE)
    {
    SetPlayerColor(playerid, TEAM_GROVE_COLOR);
    }
    else if (gTeam[playerid] == TEAM_BALLA)
    {
    SetPlayerColor(playerid, TEAM_BALLA_COLOR);
    }
    else if(gTeam[playerid] == TEAM_VAGOS)
    {
    SetPlayerColor(playerid, TEAM_VAGOS_COLOR);
    }
    else if(gTeam[playerid] == TEAM_VATOSLOCOS)
    {
    SetplayerColor(playerid, TEAM_VATOSLOCOS_COLOR);
    }
    else if(gTeam[playerid] == TEAM_TRIADEN)
    {
    SetPlayerColor(playerid, TEAM_TRIADEN_COLOR);
    }
    else if(gTeam[playerid] == TEAM_BIKER)
    {
    SetPlayerColor(playerid, TEAM_BIKER);
    }
    else if(gTeam[playerid] == TEAM_COPS)
    {
    SetPlayerColor(playerid, TEAM_COPS_COLOR);
    }
    else if(gTeam[playerid] == TEAM_ADMINS)
    {
    SetPlayerColor(playerid, TEAM_ADMINS_COLOR);
    }
    }

  • probiers mal so:


    public OnPlayerConnect(playerid)
    {
    if (gTeam[playerid] == TEAM_GROVE)
    {
    SetPlayerColor(playerid, TEAM_GROVE_COLOR);
    }
    else if (gTeam[playerid] == TEAM_BALLA)
    {
    SetPlayerColor(playerid, TEAM_BALLA_COLOR);
    }
    else if(gTeam[playerid] == TEAM_VAGOS)
    {
    SetPlayerColor(playerid, TEAM_VAGOS_COLOR);
    }
    else if(gTeam[playerid] == TEAM_VATOSLOCOS)
    {
    SetplayerColor(playerid, TEAM_VATOSLOCOS_COLOR);
    }
    else if(gTeam[playerid] == TEAM_TRIADEN)
    {
    SetPlayerColor(playerid, TEAM_TRIADEN_COLOR);
    }
    else if(gTeam[playerid] == TEAM_BIKER)
    {
    SetPlayerColor(playerid, TEAM_BIKER);
    }
    else if(gTeam[playerid] == TEAM_COPS)
    {
    SetPlayerColor(playerid, TEAM_COPS_COLOR);
    }
    else if(gTeam[playerid] == TEAM_ADMINS)
    {
    SetPlayerColor(playerid, TEAM_ADMINS_COLOR);
    }
    return 1;
    }