10.03.2014, 18:32
(
Последний раз редактировалось AnonScripter; 12.03.2014 в 18:23.
)
Isn't this allowed in yini save data system or what ?
i was saving player's data in 1 folder, but since the data is so much to read, i made 3 folders (paths) in scriptfiles folder
1. UsersGeneralData
2. MedicStats
3. CopStats
these are the 3 folders, each one of them is saving some data instead of saving all data in UsersGeneralData.
What's wrong in this script ?
i was saving player's data in 1 folder, but since the data is so much to read, i made 3 folders (paths) in scriptfiles folder
1. UsersGeneralData
2. MedicStats
3. CopStats
these are the 3 folders, each one of them is saving some data instead of saving all data in UsersGeneralData.
What's wrong in this script ?
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch(dialogid)
{
case DIALOG_REGISTER:
{
if (!response) return Kick(playerid);
if(response)
{
if(strlen(inputtext))
{
new INI:File = INI_Open(UserPath(playerid));
new INI:MedicFile = INI_Open(MedicPath(playerid));
new INI:CopFile = INI_Open(CopPath(playerid));
INI_SetTag(File,"data");
INI_WriteInt(File,"Password",udb_hash(inputtext));
INI_WriteInt(File,"Cash",25000);
INI_WriteInt(File,"Score",10);
INI_WriteInt(File,"Deaths",0);
INI_WriteInt(File,"Jailed",0);
INI_WriteInt(File,"JailTime",0);
INI_Close(File);
// ============================================
INI_SetTag(MedicFile,"data");
INI_WriteInt(MedicFile,"MedicRank",0);
INI_WriteInt(MedicFile,"PlayersHealed",0);
INI_WriteInt(MedicFile,"PlayersCured",0);
INI_WriteInt(MedicFile,"HealedCash",0);
INI_WriteInt(MedicFile,"CuredCash",0);
INI_WriteInt(MedicFile,"TimesBeenHealed",0);
INI_WriteInt(MedicFile,"TimesBeenCured",0);
INI_Close(MedicFile);
// ============================================
INI_SetTag(CopFile,"data");
INI_WriteInt(CopFile,"CopRank",0);
INI_WriteInt(CopFile,"Arrests",0);
INI_WriteInt(CopFile,"TicketIssued",0);
INI_WriteInt(CopFile,"TicketCollected",0);
INI_WriteInt(CopFile,"PlayerSearched",0);
INI_WriteInt(CopFile,"TimesArrested",0);
INI_WriteInt(CopFile,"TimesTakendowned",0);
INI_WriteInt(CopFile,"TicketReceived",0);
INI_WriteInt(CopFile,"TicketPaid",0);
INI_Close(CopFile);
// ============================================
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
INI_ParseFile(MedicPath(playerid), "LoadMedic_%s", .bExtra = true, .extra = playerid);
INI_ParseFile(CopPath(playerid), "LoadCop_%s", .bExtra = true, .extra = playerid);
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD,"Cops And Robbers","Account Has Been Registered Successflly\n\nType Your Password Below To Login.","Login","Quit");
}
else
{
ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD,"Cops And Robbers","{FF0000}You Must Enter A Password To Register\n\n{FFFFFF}Type A Password Below To Register.","Register","Quit");
}
}
}
return 1;
}