Erledigt^^Danke.
In 10 Minuten startet der nächtliche Backupvorgang! Es kann währenddessen (ca. 10 Minuten) zu Einschränkungen bei der Nutzung des Forums kommen
Weitere Infos findet ihr im Thema Backup des Forums
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
-
-
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
-
ne fiunzt damit auch nicht.^^
-
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;
} -
was ist der Unterscied zu meinem?
-
nur einmal return 1; nicht hundertmal
-
breadfish.de
Hat das Thema geschlossen.