dini_Float help
#8

@armyoftwo: Sometimes you have no choice, if you want to change something in the script F.E
@Cameltoe: Hmm, maybe i can make a timer that gives the server some time to save the coords.
And here you have the savescript:
Код:
public SavePlayerStats(playerid)
{
    new Float:hp;
    new Float:am;
    new Float:saveX, Float:saveY, Float:saveZ;
    GetPlayerName(playerid, pname, sizeof (pname));
	GetPlayerHealth(playerid,hp);
	GetPlayerArmour(playerid,am);
	GetPlayerPos(playerid, saveX, saveY, saveZ);
	money[playerid] = GetPlayerMoney(playerid);
	SaveWeaponsToFile(playerid);
    dini_IntSet((pname), "money", money[playerid]);
    dini_IntSet((pname), "kills", kills[playerid]);
    dini_IntSet((pname), "deaths", deaths[playerid]);
    dini_IntSet((pname), "bankmoney", bankmoney[playerid]);
    dini_IntSet((pname), "beer", beer[playerid]);
    dini_IntSet((pname), "cigarets", cigarets[playerid]);
    dini_IntSet((pname), "carlocks", carlocks[playerid]);
    dini_IntSet((pname), "sprunk", sprunk[playerid]);
    dini_IntSet((pname), "rope", rope[playerid]);
	dini_FloatSet((pname), "health", floatround(hp));
	dini_FloatSet((pname), "armour", floatround(am));
    dini_FloatSet((pname),"spawnX", saveX);
    dini_FloatSet((pname),"spawnY", saveY);
    dini_FloatSet((pname),"spawnZ", saveZ);
    dini_IntSet((pname), "weed", weed[playerid]);
    dini_IntSet((pname), "seeds", seeds[playerid]);
    dini_IntSet((pname), "prepaid", prepaid[playerid]);
    return 1;
}
@Vince: Yeah, youre right, it look like a bit stupid now
@MrDeath: Im sure the files exist, i always check the files before testing
Reply


Messages In This Thread
dini_Float help - by Danny - 14.08.2010, 12:09
Re: dini_Float help - by Danny - 14.08.2010, 18:37
Re: dini_Float help - by armyoftwo - 14.08.2010, 19:19
Re: dini_Float help - by Cameltoe - 14.08.2010, 19:46
Re: dini_Float help - by Vince - 14.08.2010, 20:02
Re: dini_Float help - by MrDeath537 - 14.08.2010, 20:07
Re: dini_Float help - by Cameltoe - 14.08.2010, 20:08
Re: dini_Float help - by Danny - 14.08.2010, 20:10
Re: dini_Float help - by Cameltoe - 14.08.2010, 20:36
Re: dini_Float help - by Claude - 14.08.2010, 20:41

Forum Jump:


Users browsing this thread: 1 Guest(s)