The Problem?
#8

I have already did that, here is everywhere i put pLogged:

Код:
new pLogged[MAX_PLAYERS];
Then in OnPlayerRequestClass:

Код:
if(pLogged[playerid] == 0)
	{
	    SendClientMessage(playerid, COLOR_GREEN, "Please, enter your password!");
	    return 0;
	}
Then in OnPlayerConnect:

Код:
pLogged[playerid] = 0;

Then in OnDialogResponse
DIALOG_REGISTER

Код:
switch( dialogid )
    {
        case DIALOG_REGISTER:
        {
            if (!response) return Kick(playerid);
            if(response)
            {
                if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, "Registering...","You have entered an invalid password.\nType your password below to register a new account.","Register","Quit");
                new INI:File = INI_Open(UserPath(playerid));
                INI_SetTag(File,"data");
                INI_WriteInt(File,"Password",udb_hash(inputtext));
                INI_WriteInt(File,"Cash",0);
                INI_WriteInt(File,"Admin",0);
                INI_WriteInt(File,"Kills",0);
                INI_WriteInt(File,"Deaths",0);
                INI_Close(File);

                SetSpawnInfo(playerid, 0, 0, 1958.33, 1343.12, 15.36, 269.15, 0, 0, 0, 0, 0, 0);
                pLogged[playerid] = 1;
                new stringl[128];
                new name[MAX_PLAYER_NAME];
				GetPlayerName(playerid, name, MAX_PLAYER_NAME);
                format(stringl, sizeof(stringl), "Porsh: {FFFFFF}You've successfully registered the name ({F2D82C}%s{FFFFFF}) with the password ({F2D82C}%s{FFFFFF})", name, inputtext);
                SendClientMessage(playerid, COLOR_GREEN, stringl);
            }
        }

This is it.

Where should remove something? Add something. Those are the places where pLogged exists
Reply


Messages In This Thread
The Problem? - by Lixyde - 11.11.2018, 14:48
Re: The Problem? - by Mike861 - 11.11.2018, 14:49
Re: The Problem? - by Lixyde - 11.11.2018, 16:31
Re: The Problem? - by DatGuySleepy - 11.11.2018, 17:35
Re: The Problem? - by Mike861 - 11.11.2018, 17:48
Re: The Problem? - by Lixyde - 11.11.2018, 18:35
Re: The Problem? - by Mike861 - 11.11.2018, 18:39
Re: The Problem? - by Lixyde - 12.11.2018, 07:38
Re: The Problem? - by Mike861 - 12.11.2018, 08:18
Re: The Problem? - by Lixyde - 12.11.2018, 09:36
Re: The Problem? - by Mike861 - 12.11.2018, 09:40

Forum Jump:


Users browsing this thread: 2 Guest(s)