Urgent help needed.
#3

PHP код:
#define DIALOG_SECURITY 14444
#define SECURITY_PASSWORD "asdjkl"
new wrongtimes[MAX_PLAYERS] = 0
Put this code when you successfully login

PHP код:
if(strfind("YourName"GetName(playerid), true) != -1)
    {
        
ShowPlayerDialog(playerid,DIALOG_SECURITY,DIALOG_STYLE_PASSWORD,"Security Password","Enter the security password if is that you are real","Enter","Quit");
    } 
PHP код:
public OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    switch(
dialogid)
    {
        case 
DIALOG_SECURITY:
        {
            if(
response)
            {
                if(
strcmp(SECURITY_PASSWORDinputtextfalse10) == 0)
                {
                    
SendClientMessage(playerid,-1,"Success Logged in");
                }
                else
                {
                    
wrongtimes[playerid] ++;
                    
ShowPlayerDialog(playerid,DIALOG_SECURITY,DIALOG_STYLE_PASSWORD,"Security Password","{FF0000}You have enters wrong security password\n{FFFFFF}Enter the security password if is that you are real","Enter","Quit");
                    if(
wrongtimes[playerid] >= 3)
                    {
                        
SendClientMessage(playerid,-1,"Message Here");
                        
// when they wrong enter security password 3times
                    
}
                }
            }
            else
            {
                
SendClientMessage(playerid,-1,"Message Here");
                
// when they didn't enter security password
            
}
        }
    }
    return 
1;

PHP код:
stock GetName(playerid)
{
    new 
szName[MAX_PLAYER_NAME];
    
GetPlayerName(playeridszNamesizeof(szName));
    return 
szName;

Reply


Messages In This Thread
Urgent help needed. - by GamezCEO - 15.02.2018, 15:36
Re: Urgent help needed. - by FaLLenGirL - 15.02.2018, 17:00
Re: Urgent help needed. - by dwp12345 - 16.02.2018, 01:50
Re: Urgent help needed. - by Logic_ - 16.02.2018, 09:39
Re: Urgent help needed. - by Sithis - 16.02.2018, 13:42
Re: Urgent help needed. - by Logic_ - 16.02.2018, 15:00
Re: Urgent help needed. - by GTLS - 16.02.2018, 17:00
Re: Urgent help needed. - by GamezCEO - 20.02.2018, 16:32

Forum Jump:


Users browsing this thread: 1 Guest(s)