Admin verification
#4

PHP код:
#define Admin_Code "Yellow"
new bool:ALogged[MAX_PLAYERS] = false;

public 
OnPlayerConnect(playerid)
{
    
ShowPlayerDialog(playerid424DIALOG_STYLE_INTPUT"Administrator Login""Please input the administration's password in order to proceed.""Login""Disconnect");
    return 
1;
}

public 
OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    if(
dialogid == 424)
    {
        if(!
response) return SendClientMessage(playerid, -1"You have failed to input your password and therefore, you have been kicked.");
        if(!
strcmp(Admin_Codeinputtexttrue)) return ALogged[playerid] = true;
    }
    return 
1;
}

public 
OnPlayerCommandText(playeridcmdtext[])
{
    if(!
ALogged[playerid]) return SendClientMessage(playerid, -1"You must be logged in to use any command."), 0;
    return 
1;

Reply


Messages In This Thread
Admin verification - by xdarren - 28.09.2013, 20:37
Re: Admin verification - by NinjahZ - 28.09.2013, 22:16
Re: Admin verification - by xdarren - 28.09.2013, 22:23
Re: Admin verification - by Accord - 28.09.2013, 22:28
Re: Admin verification - by xdarren - 28.09.2013, 22:42

Forum Jump:


Users browsing this thread: 1 Guest(s)