My Reg/Log system is not working fine
#3

Oh so when player it kicked that is like OnPlayerDisconnect.. So what should I do about that should I save it somewhere else?


EDIT:

Yes that line exists
Код:
OnPlayerConnect if(fexist(UserPath(playerid)))
	{
	    new logstring[326];
	    new logname[64];
	    GetPlayerName(playerid,logname,sizeof(logname));
	    format(logstring,sizeof(logstring),""COL_ZLATNA"__________________________________________________\n\n"COL_BIJELA"Dobrodosao nazad"COL_ZLATNA" %s\n\n"COL_BIJELA"Ti imas: "COL_ZELENA"Account\n\n"COL_BIJELA"Upisi sifru za "COL_ZLATNA"Nastavak\n\n"COL_BIJELA"Ugodan ostatak dana zeli vam "COL_ZLATNA"Godfather Communnity!\n\n__________________________________________________",logname);
		INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
  		ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD,""COL_BIJELA"Balkan Godfather-"COL_ZLATNA"Login", logstring, "Login", "Odustani");
	}
Код:
public OnPlayerDisconnect(playerid, reason)
{
    //Info-TextDraws------------------------------------------------------------
	TextDrawHideForPlayer(playerid, InfoTextDraw);
	//--------------------------------------------------------------------------
	//Login/Reg-Sistem----------------------------------------------------------
	new INI:File = INI_Open(UserPath(playerid));
	INI_SetTag(File,"data");
	INI_WriteInt(File,"Novac",GetPlayerMoney(playerid));
	INI_WriteInt(File,"Admin",PlayerInfo[playerid][pAdmin]);
	INI_WriteInt(File,"Ubistva",PlayerInfo[playerid][pUbistva]);
	INI_WriteInt(File,"Smrti",PlayerInfo[playerid][pSmrti]);
	INI_WriteInt(File,"Level",PlayerInfo[playerid][pLevel]);
	INI_Close(File);
	return 1;
}
case DIALOG_REGISTER:
        {
            if(!response) return Kick(playerid);
            if(response)
            {
                if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, ""COL_BIJELA"Balkan Godfather-"COL_ZLATNA"Registracija",""COL_ZLATNA"_______________________\n\n"COL_BIJELA"Unijeli ste pogresan format "COL_CRVENA"sifre!\n\n"COL_BIJELA"Pokusaj "COL_ZLATNA"Ponovo!\n"COL_ZLATNA"_______________________","Register","Odustani");
                new INI:File = INI_Open(UserPath(playerid));
                INI_SetTag(File,"data");
                INI_WriteInt(File,"Password",udb_hash(inputtext));
                INI_WriteInt(File,"Novac",0);
                INI_WriteInt(File,"Admin",0);
                INI_WriteInt(File,"Ubistva",0);
                INI_WriteInt(File,"Smrti",0);
                INI_WriteInt(File,"Level",0);
                INI_WriteInt(File,"Godine",0);
                INI_WriteInt(File,"Porijeklo",0);
                INI_WriteInt(File,"Spol",0);
                INI_Close(File);
				TogglePlayerSpectating(playerid, 0);
				SetSpawnInfo( playerid, 0, 0, 1714.8339, -1912.6870, 13.5666, 359.9943, 26, 36, 28, 150, 0, 0 );
				SpawnPlayer(playerid);
                GivePlayerMoney(playerid, 1000);
    		}
Reply


Messages In This Thread
My Reg/Log system is not working fine - by baba1234 - 17.05.2015, 12:12
Re: My Reg/Log system is not working fine - by Konstantinos - 17.05.2015, 12:16
Re: My Reg/Log system is not working fine - by baba1234 - 17.05.2015, 12:18
Re: My Reg/Log system is not working fine - by Konstantinos - 17.05.2015, 12:22
Re: My Reg/Log system is not working fine - by baba1234 - 17.05.2015, 12:24

Forum Jump:


Users browsing this thread: 2 Guest(s)