14.08.2010, 20:10
@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:
@Vince: Yeah, youre right, it look like a bit stupid now
@MrDeath: Im sure the files exist, i always check the files before testing
@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;
}
@MrDeath: Im sure the files exist, i always check the files before testing

