My 'OnPlayerLogin' doesn't execute ?
#1

It just doesn't execute on my host(Volt-Host), but does on my homehost.
Here's the code where is needs to be executed :
pawn Код:
if(dialogid == DIALOG_LOGIN) {
        if(response) {
            if(!strlen(inputtext)) {
                ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Welcome Back!\nEnter your password below.", "This account is registered.\n\nEnter your password below to login.", "Login", "Cancel");
                return 1;
            }
            else {
                new string[258];
                new name[MAX_PLAYER_NAME];
                GetPlayerName(playerid, name, sizeof(name));
                format(string, sizeof(string), "users/%s.ini", name);
                new File: hFile = fopen(string, io_read);
                if (hFile) {
                    fclose(hFile);
                    OnPlayerLogin(playerid,inputtext);
                }
            }
        }
        else {
            SendClientMessage(playerid, COLOR_LIGHTRED, "You chose not to login! (kicked).");
            Kick(playerid);
        }
    }
And here's the function:
pawn Код:
public OnPlayerLogin(playerid,password[])
{
    new string2[128], keystring[256], string[256];
    format(string2, sizeof(string2), "users/%s.ini", PlayerName(playerid));
    keystring = dini_Get(string2, "Key");
    new playername2[MAX_PLAYER_NAME];
    GetPlayerName(playerid, playername2, sizeof(playername2));
    if(strcmp(keystring, password, true) == 0)
    {
....
I debugged the function and it stopped here
pawn Код:
keystring = dini_Get(string2, "Key");
Reply


Messages In This Thread
My 'OnPlayerLogin' doesn't execute ? - by The__ - 21.07.2012, 07:34
Re: My 'OnPlayerLogin' doesn't execute ? - by The__ - 21.07.2012, 09:12
Re: My 'OnPlayerLogin' doesn't execute ? - by MadeMan - 21.07.2012, 10:29
Re: My 'OnPlayerLogin' doesn't execute ? - by The__ - 21.07.2012, 10:48
Re: My 'OnPlayerLogin' doesn't execute ? - by Vince - 21.07.2012, 10:53
Re: My 'OnPlayerLogin' doesn't execute ? - by The__ - 21.07.2012, 11:08
Re: My 'OnPlayerLogin' doesn't execute ? - by Vince - 21.07.2012, 11:21
Re: My 'OnPlayerLogin' doesn't execute ? - by The__ - 21.07.2012, 12:17

Forum Jump:


Users browsing this thread: 1 Guest(s)