No me guarda las armas, Ayuda !
#1

Amigos lo que pasa es que estoy dentro del server y me seteo un arma luego al relogear no me aparece mas, me salgo entro y no esta el arma, alguien puede ayudarme a ver el problema


[pawn=1]SaveWeaponsToFile(playerid) //Fix de municion
{
new i, path[128], string[128], weaponid, ammo;
path = GetPlayerFormattedName(playerid);
if (!dini_Exists(path)) dini_Create(path);
for (i=0; i<13; i++)
{
GetPlayerWeaponData(playerid,i,weaponid,ammo);
format(string,sizeof(string),"Weapon - %d",i);
dini_IntSet(path,string,weaponid);
format(string,sizeof(string),"municion - %d",i);
dini_IntSet(path,string,ammo >= 10000 ? 5000 : ammo);
}
}

public LoadWeaponsToFile(playerid)
{
new i, path[128], string[128], string2[128], weaponid, municion;
path = GetPlayerFormattedName(playerid);
ResetPlayerWeapons2(playerid);
for (i=0; i<13; i++)
{
format(string,sizeof(string),"Weapon - %d",i);
format(string2,sizeof(string2),"municion - %d",i);
weaponid = dini_Int(path,string);
municion = dini_Int(path,string2);
GivePlayerWeapon2(playerid,weaponid,municion);
}
AlreadyGiveWeapons[playerid] = true;
}

public RemoveWeaponsFile(playerid)
{
new path[128];
path = GetPlayerFormattedName(playerid);
dini_Remove(path);
}

GetPlayerFormattedName(playerid)
{
new name[24], full[50];
GetPlayerName(playerid,name,sizeof(name));
format(full,sizeof(full),"%s/%s.txt",PATH,name);
return full;
}

__________________________________________________ ________

Esto esta en onplayerspawn
if(!AlreadyGiveWeapons[playerid]) SetTimerEx("LoadWeaponsToFile",250,false,"i",playe rid);
[/pawn]
Reply


Messages In This Thread
No me guarda las armas, Ayuda ! - by DeannN - 10.06.2016, 21:03
Re: No me guarda las armas, Ayuda ! - by Unrea1 - 10.06.2016, 22:00
Respuesta: No me guarda las armas, Ayuda ! - by DeannN - 11.06.2016, 04:54
Respuesta: No me guarda las armas, Ayuda ! - by REMAK3 - 15.06.2016, 22:57
Re: No me guarda las armas, Ayuda ! - by lucesita - 16.06.2016, 01:27
Respuesta: Re: No me guarda las armas, Ayuda ! - by Revelation - 16.06.2016, 03:53
Re: No me guarda las armas, Ayuda ! - by Unrea1 - 16.06.2016, 03:58
Respuesta: No me guarda las armas, Ayuda ! - by !R1Ch@rD! - 17.06.2016, 04:22
Re: No me guarda las armas, Ayuda ! - by DeannN - 17.06.2016, 14:19
Re: Respuesta: No me guarda las armas, Ayuda ! - by DeannN - 17.06.2016, 14:22

Forum Jump:


Users browsing this thread: 1 Guest(s)