21.07.2012, 23:56
How can I save the skin they chose after registering?
and when they connect again, the skin they chose will load.
The enum:
Forward:
OnPlayerDisconnect
OnDialogResponse:
I'm learning about this codes.
Thanks.
and when they connect again, the skin they chose will load.
The enum:
pawn Код:
enum pInfo
{
pPass,
pCash,
pAdmin,
pKills,
pWarnings,
pDeaths,
pScores,
pDonator,
}
pawn Код:
forward LoadUser_data(playerid,name[],value[]);
public LoadUser_data(playerid,name[],value[])
{
INI_Int("Password",PlayerInfo[playerid][pPass]);
INI_Int("Cash",PlayerInfo[playerid][pCash]);
INI_Int("Admin",PlayerInfo[playerid][pAdmin]);
INI_Int("Kills",PlayerInfo[playerid][pKills]);
INI_Int("Deaths",PlayerInfo[playerid][pDeaths]);
INI_Int("Scores",PlayerInfo[playerid][pScores]);
INI_Int("Donator",PlayerInfo[playerid][pDonator]);
return 1;
}
pawn Код:
new INI:File = INI_Open(UserPath(playerid));
INI_SetTag(File,"data");
INI_WriteInt(File,"Cash",GetPlayerMoney(playerid));
INI_WriteInt(File,"Admin",PlayerInfo[playerid][pAdmin]);
INI_WriteInt(File,"Kills",PlayerInfo[playerid][pKills]);
INI_WriteInt(File,"Deaths",PlayerInfo[playerid][pDeaths]);
INI_WriteInt(File,"Scores",PlayerInfo[playerid][pScores]);
INI_WriteInt(File,"Deaths",PlayerInfo[playerid][pDeaths]);
INI_WriteInt(File,"Donator",PlayerInfo[playerid][pDonator]);
INI_Close(File);
pawn Код:
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_WriteInt(File,"Scores",0);
INI_WriteInt(File,"Donator",0);
INI_Close(File);
I'm learning about this codes.
Thanks.