04.10.2012, 07:27
Hello,
So I've encountered a error which I was not even able to fix it .. tried many ways but can't get it working..
So the problem is that I'm using the progressbar and everything works fine.. My hunger system works good.. then as soon as I log off.. and log in back, it doesnt saves
Here, I'll give you some codes : If you need more codes, Please do tell.
So I've encountered a error which I was not even able to fix it .. tried many ways but can't get it working..
So the problem is that I'm using the progressbar and everything works fine.. My hunger system works good.. then as soon as I log off.. and log in back, it doesnt saves
Here, I'll give you some codes : If you need more codes, Please do tell.
pawn Код:
public OnPlayerConnect(playerid)
{
Player[playerid][PlayerHunger] = 0;
return 1;
}
pawn Код:
OnPlayerDisconnect(playerid)
{
Player[playerid][PlayerHunger] = floatround(GetProgressBarValue(Hunger[playerid]));
dini_IntSet(string,"PlayerHunger",floatround(GetProgressBarValue(Hunger[playerid])));
return 1;
}
pawn Код:
OnPlayerSpawn(playerid)
{
SetProgressBarValue(Hunger[playerid], dini_Int(file,"PlayerHunger"));
return 1;
}