Need some help regarding some register stuffs
#1

http://pastebin.com/r9iEK7Fk

Код:
 case DIALOG_REGISTER:
        {
            if (!response) return Kick(playerid);
            if(response)
            {
                if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, ""COL_WHITE"Registering...",""COL_RED"You have entered an invalid password.\n"COL_WHITE"Type 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);
                SpawnPlayer(playerid);
                ShowPlayerDialog(playerid, DIALOG_SUCCESS_1, DIALOG_STYLE_MSGBOX,""COL_WHITE"Success!",""COL_GREEN"Great! Your Y_INI system works perfectly. Relog to save your stats!","Ok","");
So, I want to remove the quit, to prevent players getting quitted. also, I want players to save the stats without having to relog, how to do so ?

some helps are very highly appriciated
Reply
#2

To remove the getting kicked part, simply remove
pawn Код:
if (!response) return Kick(playerid);
Assuming you already have saving somewhere in the gamemode/filterscript, make it into a function, for example
pawn Код:
forward SavePlayer(playerid);
public SavePlayer(playerid)
{
    //code..
}
and then make a timer executing it every .. seconds/minutes
Reply
#3

I still don't understand at 2nd part, what do you mean function of it ?

I don't need timer executing, it's ok.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)