what the f*ck is wrong here!?!?
#1

So i save some stats with Y_Ini, it all works except for health saving, ( it saves some idiotic numbers like Health = 1112276992) ... here's that part in the script...


under #include <samp>

Код:
new Float:SaveHealth[MAX_PLAYERS];
under OnPlayerDisconnect
Код:
GetPlayerHealth(playerid, SaveHealth[playerid]);
INI_WriteFloat(File,"Health",GetPlayerHealth(playerid));
and under OnPlayerSpawn

Код:
SetPlayerHealth(playerid, PlayerInfo[playerid][pHealth]);
what am i doing wrong here ?!?! maybe im doing something wrong with the float or something ?
heres my "enum"


Код:
enum pInfo
{
    pPass,
    pCash,
    pAdmin,
    pHealth,
    pDead,
   	pSkin,
   	pTeam,
	pPosx,
	pPosy,
	pPosz
}
also see:

Код:
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_Float("Health",PlayerInfo[playerid][pHealth]);
    INI_Int("Skin",PlayerInfo[playerid][pSkin]);
    INI_Int("Team",PlayerInfo[playerid][pTeam]);
    INI_Int("X",PlayerInfo[playerid][pPosx]);
    INI_Int("Y",PlayerInfo[playerid][pPosy]);
    INI_Int("Z",PlayerInfo[playerid][pPosz]);


    return 1;
}
Reply


Messages In This Thread
what the f*ck is wrong here!?!? - by [JnA]DukeNukem - 09.08.2011, 21:17
Re : what the f*ck is wrong here!?!? - by Soumi - 09.08.2011, 21:22
Re: what the f*ck is wrong here!?!? - by MadeMan - 09.08.2011, 21:31
Re: Re : what the f*ck is wrong here!?!? - by [JnA]DukeNukem - 09.08.2011, 21:32
Re : Re: what the f*ck is wrong here!?!? - by Soumi - 09.08.2011, 21:33
Re: what the f*ck is wrong here!?!? - by MadeMan - 09.08.2011, 21:35
Re : what the f*ck is wrong here!?!? - by Soumi - 09.08.2011, 21:40

Forum Jump:


Users browsing this thread: 1 Guest(s)