HeyHoo,
Ich habe ein Problem mit meinem Fraktionschat.
Immer wenn ich InGame /f HALLO eintippe, kommt, Benutze: /f(raktion) [Text]!
Hier der ganze Befehl:
ocmd:f(playerid,params[])
{
new result[128];
if(sscanf(params,"s[128]",result))return SendClientMessage(playerid,Grau, "Benutze: /f(raktion) [Text]");
{
new resultstring[256];
new Name[MAX_PLAYER_NAME];
GetPlayerName(playerid, Name, sizeof(Name));
new member = SpielerInfo[playerid][pFraktion];
if(SpielerInfo[playerid][pFraktion]!=0)
{
if(member==1)
{
if(SpielerInfo[playerid][pFrakrang] == 7) { format(resultstring, sizeof(resultstring), "Captain %s: %s", Name, result); }
else if(SpielerInfo[playerid][pFrakrang] == 6) { format(resultstring, sizeof(resultstring), "Lieutnant %s: %s", Name, result); }
else if(SpielerInfo[playerid][pFrakrang] == 5) { format(resultstring, sizeof(resultstring), "Oberkommissar %s: %s", Name, result); }
else if(SpielerInfo[playerid][pFrakrang] == 4) { format(resultstring, sizeof(resultstring), "Kommissar %s: %s", Name, result); }
else if(SpielerInfo[playerid][pFrakrang] == 3) { format(resultstring, sizeof(resultstring), "Bewährungshelfer %s: %s", Name, result); }
else if(SpielerInfo[playerid][pFrakrang] == 2) { format(resultstring, sizeof(resultstring), "Officer %s: %s", Name, result); }
else if(SpielerInfo[playerid][pFrakrang] == 1) { format(resultstring, sizeof(resultstring), "Cadet %s: %s", Name, result); }
}
else if(member==2)
{
if(SpielerInfo[playerid][pFrakrang] == 7) { format(resultstring, sizeof(resultstring), "Director %s: %s", Name, result); }
else if(SpielerInfo[playerid][pFrakrang] == 6) { format(resultstring, sizeof(resultstring), "Deputy Director %s: %s", Name, result); }
else if(SpielerInfo[playerid][pFrakrang] == 5) { format(resultstring, sizeof(resultstring), "Supervisor %s: %s", Name, result); }
else if(SpielerInfo[playerid][pFrakrang] == 4) { format(resultstring, sizeof(resultstring), "Elite Agent %s: %s", Name, result); }
else if(SpielerInfo[playerid][pFrakrang] == 3) { format(resultstring, sizeof(resultstring), "Special Agent %s: %s", Name, result); }
else if(SpielerInfo[playerid][pFrakrang] == 2) { format(resultstring, sizeof(resultstring), "Professional Agent %s: %s", Name, result); }
else if(SpielerInfo[playerid][pFrakrang] == 1) { format(resultstring, sizeof(resultstring), "Agent %s: %s", Name, result); }
}
for(new i; i<MAX_PLAYERS; i++)
{
if(SpielerInfo[i][pFraktion])
{
SendClientMessage(i, ChatGreen, resultstring);
}
}
}
}
return 1;
}
Was ist falsch?
lg
Deagle