02.05.2010, 07:57
Anywhere on ur script:
Under onplayerconnect:
Under ondialogresponse:
Now if you want to make a command for a player on either lang:
Basic way but works..
Код:
new English[MAX_PLAYERS]; new Polish[MAX_PLAYERS];
Код:
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_MSGBOX, "LANGUAGE", "Choose a Language", "English", "Polish");
Код:
if(dialogid == 1) { if(response) { English[playerid] = 1; Polish[playerid] = 0; SendClientMessage(playerid, 0xFFFFFFFF, "Your Language has been set to English."); } else { English[playerid] = 0; Polish[playerid] = 1; SendClientMessage(playerid, 0xFFFFFFFF, "Your Language has been set to Polish"); //Translate if you want... } return 1; }
Код:
if (strcmp("/mycommand", cmdtext, true, 10) == 0) // english { if(English[playerid] == 1) { //DO SOMETHING HERE } return 1; } if (strcmp("/mycommand", cmdtext, true, 10) == 0) // polish { if(Polish[playerid] == 1) { //DO SOMETHING HERE } return 1; }