26.08.2014, 12:43
Hello guys
recently i was trying ti make a password system (nothing special)
here is the code
all the dialogs pop up normal , but when i put a password is not print me the messages and this is why i am posting
thanks in advance
recently i was trying ti make a password system (nothing special)
here is the code
all the dialogs pop up normal , but when i put a password is not print me the messages and this is why i am posting
thanks in advance
Код:
#include <a_samp> new menu; public OnFilterScriptInit() { menu = CreatePickup(371, 2, 1061.3151, 1285.5503, 10.8203, -1); } public OnPlayerPickUpPickup(playerid, pickupid) { if(pickupid == menu) { ShowPlayerDialog(playerid, 2, 2, "Gate", "Open the gate", "Select", "Cancel"); } return 1; } public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if(dialogid == 2) { if(response) { switch(listitem) { case 0: { ShowPlayerDialog(playerid, 1, 3, "Gate", "Write the secret password", "Select", "Cancel"); } } } } return 1; if(dialogid == 1) { if(response) { if(!strcmp(inputtext, "1234", true)) { SendClientMessage(playerid, -1, "Password accepted"); } else { SendClientMessage(playerid, -1, "Password is wrong"); } } } return 1; }