i think you are just writing over your weapons with slots you have nothing in most of the names are off at the end
Код:
#
PlayerCrashed(playerid) // This function saves the players weapons into a variable. Saves the players stats into the file.
{
new Float:x, Float:y, Float:z, Float:a, Float:HP, Float:AP;
new weapons[12], bullets[12];
GetPlayerPos(playerid,x,y,z);
GetPlayerHealth(playerid, HP);
GetPlayerArmour(playerid, AP);
// format(HP, sizeof(HP), "%0.1", HP);
// format(AP, sizeof(AP), "%0.1", AP);
for(new i = 0; i < 12; i++)
{
GetPlayerWeaponData(playerid, i+1, weapons[i], bullets[i]);
}
if(!dini_Exists(file))
{
dini_Create(file);
dini_FloatSet(file, "PosX", x);
dini_FloatSet(file, "PosY", y);
dini_FloatSet(file, "PosZ", z);
dini_FloatSet(file, "PosA", a);
dini_FloatSet(file, "HP", HP);
dini_FloatSet(file, "AP", AP);
dini_IntSet(file, "Interior", GetPlayerInterior(playerid));
dini_IntSet(file, "World", GetPlayerVirtualWorld(playerid));
dini_IntSet(file, "Score", GetPlayerScore(playerid));
// dini_IntSet(file, "Color", GetPlayerColor(playerid));
dini_IntSet(file, "Skin", GetPlayerSkin(playerid));
dini_IntSet(file, "Weapon1", weapons[0]);
dini_IntSet(file, "Weapon1ammo", bullets[0]);
dini_IntSet(file, "Weapon2", weapons[1]);
dini_IntSet(file, "Weapon2ammo", bullets[1]);
dini_IntSet(file, "Weapon3", weapons[2]);
dini_IntSet(file, "Weapon3ammo", bullets[2]);
dini_IntSet(file, "Weapon4", weapons[3]);
dini_IntSet(file, "Weapon4ammo", bullets[3]);
dini_IntSet(file, "Weapon5", weapons[4]);
dini_IntSet(file, "Weapon5ammo", bullets[4]);
dini_IntSet(file, "Weapon6", weapons[5]);
dini_IntSet(file, "Weapon6ammo", bullets[5]);
dini_IntSet(file, "Weapon7", weapons[6]);
dini_IntSet(file, "Weapon7ammo", bullets[6]);
dini_IntSet(file, "Weapon8", weapons[7]);
dini_IntSet(file, "Weapon8ammo", bullets[7]);
dini_IntSet(file, "Weapon9", weapons[8]);
dini_IntSet(file, "Weapon9ammo", bullets[8]);
dini_IntSet(file, "Weapon10", weapons[9]);
dini_IntSet(file, "Weapon10ammo", bullets[9]);
dini_IntSet(file, "Weapon11", weapons[10]);
dini_IntSet(file, "Weapon11ammo", bullets[10]);
dini_IntSet(file, "Weapon12", weapons[11]);
dini_IntSet(file, "Weapon12ammo", bullets[11]);
}
return 1;
}