public OnPlayerConnect(playerid){ ShowPlayerDialog(playerid, 1234, DIALOG_STYLE_MSGBOX,\"Nyelv választás\", \"Select your language\\n\\nVálassz nyelvet\",\"English\",\"Magyar\"); return 1;}public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]){ new str[128]; if(dialogid == 1234) { if(response) { format(str, 128,\"%s Joined!\",GetPlayerNameEx(playerid)); SendClientMessageToAll(-1,str);}else{ format(str, 128,\"%s Csatlakozott!\",GetPlayerNameEx(playerid)); SendClientMessageToAll(-1,str);}return 1; } return 0;}stock GetPlayerNameEx(playerid){new name[MAX_PLAYER_NAME];GetPlayerName(playerid, name, MAX_PLAYER_NAME);return name;}
és azt meglehet csinálni h amikor killép akkor is ugy irja ki amiylen nyelvet választot ?
public OnPlayerConnect(playerid){ ShowPlayerDialog(playerid, 1234, DIALOG_STYLE_MSGBOX,\"Nyelv választás\", \"Select your language\\n\\nVálassz nyelvet\",\"English\",\"Magyar\"); return 1;}public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]){ new str[128]; if(dialogid == 1234) { if(response) { format(str, 128,\"%s Joined!\",GetPlayerNameEx(playerid)); SendClientMessageToAll(-1,str); SetPVarInt(playerid, \"Lang\", 1);}else{ format(str, 128,\"%s Csatlakozott!\",GetPlayerNameEx(playerid)); SendClientMessageToAll(-1,str); SetPVarInt(playerid, \"Lang\" ,2);}return 1; } return 0;}public OnPlayerDisconnect(playerid, reason){ new str[128]; if(GetPVarInt(playerid, \"Lang\") == 1) {switch(reason){ case 0: format(str, 128,\"%s has left the server [Timeout]\",GetPlayerNameEx(playerid)); case 1: format(str, 128,\"%s has left the server\",GetPlayerNameEx(playerid)); case 2: format(str, 128,\"%s has left the server [Kick/Ban]\",GetPlayerNameEx(playerid));} } else if(GetPVarInt(playerid, \"Lang\") == 2) { switch(reason){ case 0: format(str, 128,\"%s elhagyta a szervert [idõtullépés]\",GetPlayerNameEx(playerid)); case 1: format(str, 128,\"%s elhagyta a szervert\",GetPlayerNameEx(playerid)); case 2: format(str, 128,\"%s elhagyta a szervert [Kick/Ban]\",GetPlayerNameEx(playerid));} } SendClientMessageToAll(COLOR,str); return 1;}stock GetPlayerNameEx(playerid){new name[MAX_PLAYER_NAME];GetPlayerName(playerid, name, MAX_PLAYER_NAME);return name;}
ez egy kicsit \"bõvebb\" mint Antonyo-é.http://sampforum.hu/index.php?topic=16551.0