25.08.2012, 03:21
Quote:
Code:
new pass[32] = "36543532"; Code:
public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp("/makemegod", cmdtext, true, 10) == 0) { ShowPlayerDialog(playerid, 334, DIALOG_STYLE_INPUT, "Admin", "Enter the password below:", "Accept", "Cancel"); return 1; } return 0; } Code:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if(dialogid == 334) { if(!response) { return 1; } else { if(strcmp(inputtext, pass, true)) { SendClientMessage(playerid, COLOR_RED, "Wrong password!"); return 1; } PlayerInfo[playerid][Admin] = 9999; // Change this to whatever defines your admin level. } } return 1; } |

