[Ayuda] Guardado de score
#1

Hola.Quisiera que se guarde el score.Utilizo YSI_INI.
Reply
#2

Dejanos algo de codigo , sino sera imposible ayudarte , adjunta el registro y el guardado al desconectarse de datos.
Reply
#3

PHP код:
enum sas
{
    
pScore
}
new 
Informacion[MAX_PLAYERS][sas]

INI_WriteInt(VariableArchivo"Score"Informacion[playerid][pScore]);

INI_Int("Score",Informacion[playerid][pScore]); 
Reply
#4

Код:
/*El sistema de registro
case DIALOG_REGISTER:
        {
            if (!response) return Kick(playerid);
            if(response)
            {
                if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, ""COL_WHITE"Registrando...",""COL_RED"Has escrito una clave invalida.\n"COL_WHITE"Escribe tu clave para registrar una nueva cuenta","Registrar","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);
            }
        }
/*Cuando se desconecta/*
public OnPlayerDisconnect(playerid, reason)
{
    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,"Score",PlayerInfo[playerid][pScore]);
    INI_WriteInt(File,"Deaths",PlayerInfo[playerid][pDeaths]);
    INI_Close(File);
    return 1;
}
/* Fordward de el sistema de Logeo*/
forward LoadUser_data(playerid,name[],value[]);
public LoadUser_data(playerid,name[],value[])
{
    INI_Int("Password",PlayerInfo[playerid][pPass]);
    INI_Int("Dinero",PlayerInfo[playerid][pCash]);
    INI_Int("Admin",PlayerInfo[playerid][pAdmin]);
    INI_Int("Score",PlayerInfo[playerid][pScore]);
    INI_Int("Premiun",PlayerInfo[playerid][pPremiun]);
    INI_Int("Ropa",PlayerInfo[playerid][pRopa]);
    INI_Int("Muertes en contra",PlayerInfo[playerid][pDeaths]);
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)