Teste mal bitte, ob Fehler auftreten.
#include <a_samp>
ocmd:f(playerid, params[])
{
if(sscanf(params,"s",Chat)) return SendClientMessage(playerid,COLOR_GREY,"FEHLER: /f [chat]");
if(SpielerInfo[playerid][pFraktion] == 1)
{
new string[128], Chat[128], tmpRank[50], playerName[MAX_PLAYER_NAME];
GetPlayerName(playerid, playerName, sizeof(playerName));
switch(SpielerInfo[playerid][pRank])
{
case 0: tmpRank[] = "Cadet I";
case 1: tmpRank[] = "Cadet II";
case 2: tmpRank[] = "Officer I";
case 3: tmpRank[] = "Officer II";
case 4: tmpRank[] = "Officer III";
case 5: tmpRank[] = "Stv. Ausbildungsleitung";
case 6: tmpRank[] = "Ausbildungsleitung";
case 7: tmpRank[] = "Stv. Dienstaufsichtsleitung";
case 8: tmpRank[] = "Dienstaufsichtsleitung";
case 9: tmpRank[] = "Presseleitung";
case 10: tmpRank[] = "Sheriff Los Santos";
case 11: tmpRank[] = "Polizei Vice President";
case 12: tmpRank[] = "Polizei President";
}
format(string, sizeof(string), "[%s] %s: %s", tmpRank, playerName, Chat);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(SpielerInfo[i][pFraktion] == 1) SendClientMessage(playerid,COLOR_SPECIALBLUE,string);
}
return 1;
}
else return SendClientMessage(playerid, COLOR_GREY, "Du bist in keiner Fraktion.");
}