Huhu,
Also ich hab folgende Probleme:
- Wie Kann ich den Team Chat nur für Mitglieder des Teames 1 und 2 anzeugen lassen?
(nicht das alle SPieer den Chat lesen)
- Der Command funtioniert nicht:
d.h.: Wenn ich /d eingebe omt: Unknown Command
Code
dcmd_Tchat(playerid, params[])
{
new text[256],string[256];
if(sscanf(params,"d",text)) return SendClientMessage(playerid,WEIS, "Verwendung: /d(epartment) [Chat]");
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
if(P_Team[playerid][Team] == 1 || P_Team[playerid][Team] == 2)
{
if(P_Team[playerid][Rang] == 1)
{
format(string, sizeof string," |> Azubi %s: %s <|",name,text);
}
else if(P_Team[playerid][Rang] == 2) { format(string, sizeof string," |> Polizei Meister %s: %s <|",name,text); SendClientMessageToAll(FCHAT,string); }
else if(P_Team[playerid][Rang] == 3) { format(string, sizeof string," |> Polizei Obermeister %s: %s <|",name,text); SendClientMessageToAll(FCHAT,string); }
else if(P_Team[playerid][Rang] == 4) { format(string, sizeof string," |> Polizei Hauptmeister %s: %s <|",name,text); SendClientMessageToAll(FCHAT,string); }
else if(P_Team[playerid][Rang] == 5) { format(string, sizeof string," |> Polizei Kommissar: %s <|",name,text); SendClientMessageToAll(FCHAT,string); }
else if(P_Team[playerid][Rang] == 6) { format(string, sizeof string," |> Polizei Oberkommissar %s: %s <|",name,text); SendClientMessageToAll(FCHAT,string); }
else if(P_Team[playerid][Rang] == 7) { format(string, sizeof string," |> Polizei Hauptkomissar %s: %s <|",name,text); SendClientMessageToAll(FCHAT,string); }
else if(P_Team[playerid][Rang] == 8) { format(string, sizeof string," |> Ausbilder %s: %s <|",name,text); SendClientMessageToAll(FCHAT,string); }
else if(P_Team[playerid][Rang] == 9) { format(string, sizeof string," |> Teamleiter %s: %s <|",name,text); SendClientMessageToAll(FCHAT,string); }
else if(P_Team[playerid][Rang] == 10 && P_Team[playerid][Leader] == 1) { format(string, sizeof string," |> SAPD Leader %s: %s <|",name,text); SendClientMessageToAll(FCHAT,string); }
return 1;
}
return 1;
}
Alles anzeigen
Danke im Vorraus
mfG,