SA-MP Forums Archive
Help - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help (/showthread.php?tid=542787)



Help - Edw - 22.10.2014

Fixed.


Re: Help - Ryz - 22.10.2014

pawn Code:
enum PlayerData
{
 pPass,
    pLevel,
    pMoney,
    pAdmin,
    pHelper,
    pMember,
    pLeader,
    pSex,
    pAge,
    pEmail,
    pSkin,
    pLanguage
};
new PInfo[MAX_PLAYERS][PlayerData];



Re: Help - Edw - 22.10.2014

Fixed.


Re: Help - Edw - 22.10.2014

upp!!


Re: Help - Ryz - 23.10.2014

Quote:
Originally Posted by Edw
View Post
upp!!
pawn Code:
public OnPlayerDisconnect(playerid, reason)
{
    // ===== Login and Register =====
    new INI:File = INI_Open(UserPath(playerid));
    INI_SetTag(File,"data");
    INI_WriteInt(File,"pLevel",PlayerInfo[playerid][pLevel]);
    INI_WriteInt(File,"pMoney",GetPlayerMoney(playerid));
    INI_WriteInt(File,"pAdmin",PlayerInfo[playerid][pAdmin]);
     INI_WriteInt(File,"pHelper",PlayerInfo[playerid][pHelper]);
    INI_WriteInt(File,"pMember",PlayerInfo[playerid][pMember]);
     INI_WriteInt(File,"pLeader",PlayerInfo[playerid][pLeader]);
    INI_WriteInt(File,"pSex",PlayerInfo[playerid][pSex]);
     INI_WriteInt(File,"pAge",PlayerInfo[playerid][pAge]);
    INI_WriteInt(File,"pEmail",PlayerInfo[playerid][pEmail]);
     INI_WriteInt(File,"pSkin",PlayerInfo[playerid][pSkin]);
     INI_WriteInt(File,"pLanguage",PlayerInfo[playerid][pLanguage]);
    INI_Close(File);


//
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    switch( dialogid )
    {
        case DIALOG_REGISTER:
        {
            if (!response) return Kick(playerid);
            if(response)
            {
                 new INI:File = INI_Open(UserPath(playerid));
                INI_SetTag(File,"data");
                INI_WriteInt(File,"pPass",udb_hash(inputtext));
                INI_WriteInt(File,"pLevel",0);
                INI_WriteInt(File,"pMoney",0);
                INI_WriteInt(File,"pAdmin",0);
                INI_WriteInt(File,"pHelper",0);
                INI_WriteInt(File,"pMember",0);
                INI_WriteInt(File,"pLeader",0);
                INI_WriteInt(File,"pSex",0);
                INI_WriteInt(File,"pAge",0);
                INI_WriteInt(File,"pEmail",0);
                INI_WriteInt(File,"pSkin",0);
                INI_WriteInt(File,"pLanguage",0);

forward LoadUser_data(playerid,name[],value[]);
public LoadUser_data(playerid,name[],value[])
{
    INI_Int("pPass",PlayerInfo[playerid][pPass]);
    INI_Int("pLevel",PlayerInfo[playerid][pLevel]);
    INI_Int("pMoney",PlayerInfo[playerid][pMoney]);
    INI_Int("pAdmin",PlayerInfo[playerid][pAdmin]);
    INI_Int("pHelper",PlayerInfo[playerid][pHelper]);
    INI_Int("pMember",PlayerInfo[playerid][pMember]);
    INI_Int("pLeader",PlayerInfo[playerid][pLeader]);
    INI_Int("pSex",PlayerInfo[playerid][pSex]);
    INI_Int("pAge",PlayerInfo[playerid][pAge]);
    INI_Int("pEmail",PlayerInfo[playerid][pEmail]);
    INI_Int("pSkin",PlayerInfo[playerid][pSkin]);
    INI_Int("pLanguage",PlayerInfo[playerid][pLanguage]);
    return 1;
}



Re: Help - TakeiT - 23.10.2014

The order of the code in there doesn't matter.


Re: Help - Ryz - 23.10.2014

Quote:
Originally Posted by TakeiT
View Post
The order of the code in there doesn't matter.
But he want that so...


Re: Help - Edw - 23.10.2014

Fixed.


Re: Help - Edw - 23.10.2014

Fixed.