Code falsch

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
  • Erledigt^^Danke.

    Einmal editiert, zuletzt von Cardoso ()

  • if(strcmp(cmd, "/checkstops", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    if(IsACop(playerid) || IsAPoliceLeader(playerid))
    {
    if(PlayerInfo[playerid][pRank] < 2)
    {
    SendClientMessage(playerid, COLOR_GRAD2, " Your Rank is to low !");
    return 1;
    }
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
    if(IsPlayerConnected(i))
    {
    if(PlayerInfo[i][pDriversStop] == 1)
    {
    GetPlayerName(i, giveplayer, sizeof(giveplayer));
    SendClientMessage(playerid, COLOR_WHITE, "Players with DrivingStop:");
    format(string, 256, "%s, DriversStop since: %d.%d",giveplayer,PlayerInfo[i][pDriversDate], PlayerInfo[i][pDriversMonth]);
    SendClientMessage(playerid, COLOR_GRAD2,string);
    return 1;
    }
    else if(PlayerInfo[i][pFlyingStop] == 1)
    {
    GetPlayerName(i, giveplayer, sizeof(giveplayer));
    SendClientMessage(playerid, COLOR_WHITE, "Players with FlyingStop:");
    format(string, 256, "%s, FlyingStop since: %d.%d",giveplayer,PlayerInfo[i][pFlyingDate], PlayerInfo[i][pFlyingMonth]);
    SendClientMessage(playerid, COLOR_GRAD2,string);
    return 1;
    }
    else if(PlayerInfo[i][pSailingStop] == 1)
    {
    GetPlayerName(i, giveplayer, sizeof(giveplayer));
    SendClientMessage(playerid, COLOR_WHITE, "Players with SailingStop:");
    format(string, 256, "%s, SailingStop since: %d.%d",giveplayer,PlayerInfo[i][pSailingDate], PlayerInfo[i][pSailingMonth]);
    SendClientMessage(playerid, COLOR_GRAD2,string);
    return 1;
    }
    else if(PlayerInfo[i][pFishingStop] == 1)
    {
    GetPlayerName(i, giveplayer, sizeof(giveplayer));
    SendClientMessage(playerid, COLOR_WHITE, "Players with FishingStop:");
    format(string, 256, "%s, FishingStop since: %d.%d",giveplayer,PlayerInfo[i][pFishingDate], PlayerInfo[i][pFishingMonth]);
    SendClientMessage(playerid, COLOR_GRAD2,string);
    return 1;
    }
    else if(PlayerInfo[i][pWeaponStop] == 1)
    {
    GetPlayerName(i, giveplayer, sizeof(giveplayer));
    SendClientMessage(playerid, COLOR_WHITE, "Players with WeaponStop:");
    format(string, 256, "%s, WeaponStop since: %d.%d",giveplayer,PlayerInfo[i][pWeaponDate], PlayerInfo[i][pWeaponMonth]);
    SendClientMessage(playerid, COLOR_GRAD2,string);
    return 1;
    }
    }
    return 1;
    }
    }
    else
    {
    SendClientMessage(playerid, COLOR_GRAD2, " You are not a Cop / FBI / N.Guard !");
    return 1;
    }
    }//not connected
    return 1;
    }


    Also musst else if nutzen sry wegen formatierung habs im forum geschrieben

    Ich wurde angesteckt:


    o.o
    o-o
    8|
    ^^


    So nun steckt euch auch an::

  • if(strcmp(cmd, "/checkstops", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    if(IsACop(playerid) || IsAPoliceLeader(playerid))
    {
    if(PlayerInfo[playerid][pRank] < 2)
    {
    SendClientMessage(playerid, COLOR_GRAD2, " Your Rank is to low !");
    }
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
    if(IsPlayerConnected(i))
    {
    if(PlayerInfo[pDriversStop] == 1)
    {
    GetPlayerName(i, giveplayer, sizeof(giveplayer));
    SendClientMessage(playerid, COLOR_WHITE, "Players with DrivingStop:");
    format(string, 256, "%s, DriversStop since: %d.%d",giveplayer,PlayerInfo[pDriversDate], PlayerInfo[pDriversMonth]);
    SendClientMessage(playerid, COLOR_GRAD2,string);
    }
    if(PlayerInfo[pFlyingStop] == 1)
    {
    GetPlayerName(i, giveplayer, sizeof(giveplayer));
    SendClientMessage(playerid, COLOR_WHITE, "Players with FlyingStop:");
    format(string, 256, "%s, FlyingStop since: %d.%d",giveplayer,PlayerInfo[pFlyingDate], PlayerInfo[pFlyingMonth]);
    SendClientMessage(playerid, COLOR_GRAD2,string);
    }
    if(PlayerInfo[pSailingStop] == 1)
    {
    GetPlayerName(i, giveplayer, sizeof(giveplayer));
    SendClientMessage(playerid, COLOR_WHITE, "Players with SailingStop:");
    format(string, 256, "%s, SailingStop since: %d.%d",giveplayer,PlayerInfo[pSailingDate], PlayerInfo[pSailingMonth]);
    SendClientMessage(playerid, COLOR_GRAD2,string);
    }
    if(PlayerInfo[pFishingStop] == 1)
    {
    GetPlayerName(i, giveplayer, sizeof(giveplayer));
    SendClientMessage(playerid, COLOR_WHITE, "Players with FishingStop:");
    format(string, 256, "%s, FishingStop since: %d.%d",giveplayer,PlayerInfo[pFishingDate], PlayerInfo[pFishingMonth]);
    SendClientMessage(playerid, COLOR_GRAD2,string);
    }
    if(PlayerInfo[pWeaponStop] == 1)
    {
    GetPlayerName(i, giveplayer, sizeof(giveplayer));
    SendClientMessage(playerid, COLOR_WHITE, "Players with WeaponStop:");
    format(string, 256, "%s, WeaponStop since: %d.%d",giveplayer,PlayerInfo[pWeaponDate], PlayerInfo[pWeaponMonth]);
    SendClientMessage(playerid, COLOR_GRAD2,string);
    }
    }
    }
    }
    else
    {
    SendClientMessage(playerid, COLOR_GRAD2, " You are not a Cop / FBI / N.Guard !");
    }
    }//not connected
    return 1;
    }

    Ich wurde angesteckt:


    o.o
    o-o
    8|
    ^^


    So nun steckt euch auch an::