06.08.2013, 11:34
Radio it's a FilterScript:
And styles is a FilterScript:
When i Press Button from keyboard ESC or "Cancel" i get kicked : server closed connection.
Can u help me? Thanx.
Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if(dialogid == 4590) { if(response) { switch(listitem) { case 0: return cmd_sr(playerid); case 16: return cmd_r16(playerid); case 1: return cmd_r1(playerid); case 17: return cmd_r17(playerid); case 2: return cmd_r2(playerid); case 18: return cmd_r18(playerid); case 3: return cmd_r3(playerid); case 19: return cmd_r19(playerid); case 4: return cmd_r4(playerid); case 20: return cmd_r20(playerid); case 5: return cmd_r5(playerid); case 21: return cmd_r21(playerid); case 6: return cmd_r6(playerid); case 22: return cmd_r22(playerid); case 7: return cmd_r7(playerid); case 23: return cmd_r23(playerid); case 8: return cmd_r8(playerid); case 24: return cmd_r24(playerid); case 9: return cmd_r9(playerid); case 25: return cmd_r25(playerid); case 10: return cmd_r10(playerid); case 26: return cmd_r26(playerid); case 11: return cmd_r11(playerid); case 27: return cmd_r27(playerid); case 12: return cmd_r12(playerid); case 28: return cmd_r28(playerid); case 13: return cmd_r13(playerid); case 29: return cmd_r29(playerid); case 14: return cmd_r14(playerid); case 30: return cmd_r30(playerid); case 15: return cmd_r15(playerid); case 31: return cmd_cr(playerid); } } return 1; } if(dialogid == 4591) { if(response) { new string1[128], string2[200]; format(string1, sizeof string1, "%s", inputtext); //------------------------------------------------------------------ format(string2, sizeof string2, ">> {FF9900}Ai selectat sa asculti: {FFFFFF}%s <<", string1); //------------------------------------------------------------------ SendClientMessage(playerid, 0xFF9900AA, string2); PlayAudioStreamForPlayer(playerid, string1); } return 1; } return 0; }
Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if(dialogid == DIALOGID) { if(response) { if(listitem == 0) { ShowPlayerDialog(playerid, DIALOGID+1, DIALOG_STYLE_LIST, "Fighting Styles", "Elbow\nBoxing\nGrabkick\nKneehead\nKungfu\nNormal", "Select", "Nu Apasa"); } } else { SendClientMessage(playerid, 0x00000000, "Ai inchis sistemul fighting !"); } return 1; } if(dialogid == DIALOGID+1) { if(response) { if(listitem == 0) { SetPlayerFightingStyle (playerid, FIGHT_STYLE_ELBOW); } if(listitem == 1) { SetPlayerFightingStyle (playerid, FIGHT_STYLE_BOXING); } if(listitem == 2) { SetPlayerFightingStyle (playerid, FIGHT_STYLE_GRABKICK); } if(listitem == 3) { SetPlayerFightingStyle (playerid, FIGHT_STYLE_KNEEHEAD); } if(listitem == 4) { SetPlayerFightingStyle (playerid, FIGHT_STYLE_KUNGFU); } if(listitem == 5) { SetPlayerFightingStyle (playerid, FIGHT_STYLE_NORMAL); } } else { SendClientMessage(playerid, 0x00000000, "Ai inchis sistemul fighting !"); } return 1; } return 0; }
Can u help me? Thanx.