Hallo, ich probiere hier die Betreten/Verlassen Nachricht 2-Sprachig zu machen.
Was mache ich falsch?
new pName[MAX_PLAYER_NAME];
new pname[MAX_PLAYER_NAME];
new string[100],string1[100];
GetPlayerName(playerid, pname, sizeof(pname));
format(string, sizeof(string), "%s hat den Server betreten!", pname);
format(string1, sizeof(string1), "%s has joined the server!", pname);
SendLanguageTextToAll(0xAFAFAFAA, string, string1);
public OnPlayerDisconnect(playerid, reason)
{
new string[100],string1[100], pname[MAX_PLAYERS];
GetPlayerName(playerid, pname, sizeof(pname));
switch(reason)
{
case 0: format(string, sizeof(string), "%s hat den Server verlassen. (Timeout)",pname);
case 1: format(string1, sizeof(string1), "%s has left the server. (Timeout)", pname);
case 2: format(string, sizeof(string), "%s hat den Server verlassen.",pname);
case 3: format(string1, sizeof(string1), "%s has left the server.", pname);
case 4: format(string, sizeof(string), "%s hat den Server verlassen. (Kick/Ban)",pname);
case 5: format(string1, sizeof(string1), "%s has left the server. (Kick/Ban)", pname);
}
SendLanguageTextToAll(0xAFAFAFAA, string, string1);
return 1;
}