new string[256];
new Menu:language;
language = CreateMenu("[Language]", 1, 50.0, 180.0, 200.0, 200.0);
AddMenuItem(language, 0, "English");
AddMenuItem(language, 0, "Deutsch");
AddMenuItem(language, 0, "Le francais");
AddMenuItem(language, 0, "Espanol");
public OnPlayerConnect(playerid)
{
ShowMenuForPlayer(language, playerid);
}
return 1;
}
public OnPlayerSelectedMenuRow(playerid, row)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
new eng[50],ger[50],esp[50],fr[50];
new Menu:current;
current = GetPlayerMenu(playerid);
if(current == language)
{
switch(row)
{
case 0:
{
new string[100];
format(string, sizeof(string), "%s can speak English",PlayerName(playerid));
SendClientMessageToAll(COLOR_BLUE,string);
printf(string);
format(eng, 50, "[ENG]%s",name);
SetPlayerName(playerid,eng);
SendClientMessage(playerid, COLOR_WHITE, "You choose the english language");
}
case 1:
{
new string[100];
format(string, sizeof(string), "%s kann Deutsch",(playerid));
SendClientMessageToAll(COLOR_ORANGE,string);
printf(string);
format(ger, 50, "[GER]%s",name);
SetPlayerName(playerid,ger);
SendClientMessage(playerid, COLOR_WHITE, "Du hast die Deutsche Sprache gewählt");
}
case 2:
{
new string[100];
format(string, sizeof(string), "Le francais sait %s",(playerid)); // Öh Öh "%s peut parler français" wird sonst peinlich ;-) (google überetzter is meistens dreck)
SendClientMessageToAll(COLOR_YELLOW,string);
printf(string);
format(fr, 50, "[FR]%s",name);
SetPlayerName(playerid,ger);
SendClientMessage(playerid, COLOR_WHITE, "Tu as choisi français");
}
case 3:
{
new string[100];
format(string, sizeof(string), "%s sabe el espanol",PlayerName(playerid));
SendClientMessageToAll(COLOR_GREEN,string);
printf(string);
format(ger, 50, "[ESP]%s",name);
SetPlayerName(playerid,esp);
SendClientMessage(playerid, COLOR_WHITE, "KA^^");
}
}
}
return 1;
}
Kuddelmuddel müsste so stimmen MFG Chriss
#edit AAA Ich krieg die kriese wie oft sagte ich dir du sollst 1 Variable nicht für tausend verschiedene dinge verwenden!!! Änder das!