07.04.2013, 23:06
pawn Код:
SalvarArmas(playerid) {
new i, path[50], string[80], weaponid, ammo;
path = GetPlayerFormattedName(playerid);
if (!DOF2_FileExists(path)) DOF2_CreateFile(path);
for (i=0; i<13; i++) {
GetPlayerWeaponData(playerid,i,weaponid,ammo);
format(string,sizeof(string),"Arma - %d",i);
DOF2_SetInt(path,string,weaponid);
format(string,sizeof(string),"Municao - %d",i);
DOF2_SetInt(path,string,ammo == 65535 ? 0 : ammo);
DOF2_SaveFile();// Tava faltando
}
}