Newbie chat ranks
#7

Here, try this:

Top of script:

pawn Код:
enum pInfo {
    helper[64],
}
Then:
pawn Код:
public OnPlayerConnect(playerid)
{
    new file[128], Name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, Name, sizeof(Name));
    format(file, sizeof(file), UserFile, Name);
    if(!fexist(file))
    {
        ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT, "Register", "Please fill in a password:", "Register", "Cancel");
    }
    else
    {
        ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "Login", "Please fill in your password:", "Login", "Cancel");
    }
    return 1;
}
pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
    new file[128], Name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, Name, sizeof(Name));
    format(file, sizeof(file), UserFile, Name);
    dini_IntSet(file, "helper", gPlayerInfo[playerid][Level]);
    gPlayerLogged[playerid] = 0;
    return 1;
}
Got them from here.

Hope it works!
Reply


Messages In This Thread
Newbie chat ranks - by NotoriousMOB - 11.04.2011, 18:52
Re: Newbie chat ranks - by Dudits - 11.04.2011, 18:57
Re: Newbie chat ranks - by Rivera - 11.04.2011, 19:01
Re: Newbie chat ranks - by NotoriousMOB - 11.04.2011, 19:12
Re: Newbie chat ranks - by Rivera - 11.04.2011, 19:51
Re: Newbie chat ranks - by NotoriousMOB - 11.04.2011, 20:02
Re: Newbie chat ranks - by Rivera - 11.04.2011, 20:03
Re: Newbie chat ranks - by NotoriousMOB - 11.04.2011, 20:20

Forum Jump:


Users browsing this thread: 1 Guest(s)