Eu tinha tentado fazer assim.
Código:
enum pInfo
{
pVida
}
public OnPlayerSpawn(playerid)
{
SetPlayerHealth(playerid, PlayerInfo[playerid][pVida]);
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
case DIALOG_POS:
{
SetPlayerHealth(playerid, PlayerInfo[playerid][pVida]);
}
stock CriarD(playerid)
{
PlayerInfo[playerid][pVida] = 100;
}
stock ZerarD(playerid)
{
PlayerInfo[playerid][pVida] = 0;
}
stock CarregarD(playerid)
{
PlayerInfo[playerid][pVida] = DOF2_GetInt(File, "pVida");
}
stock SalvarD(playerid)
{
DOF2_SetInt(File, "pVida", GetPlayerHealth(playerid));
}