Easy Question
#5

Quote:
Originally Posted by † мąүқоҳ™
Quote:
Originally Posted by † мąүқоҳ™
Here is mistake : GivePlayerWeapon(playerid,weaponid,100); You need to make it that it saves an ammo too...
anyway here is code :

Quote:

SaveWeaponsToFile(playerid)
{
new i, path[50], 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),"AmmoID - %d",i);
dini_IntSet(path,string,ammo == 65535 ? 0 : ammo);
}
}

EDIT : WOPS I PUSHED QUOTE !!! FAIL
Maykox what do i need to put under LoadWeaponsToFile or keep it as it is??
Reply


Messages In This Thread
Easy Question - by playbox12 - 19.03.2010, 14:32
Re: Easy Question - by MaykoX - 19.03.2010, 14:34
Re: Easy Question - by MaykoX - 19.03.2010, 14:38
Re: Easy Question - by playbox12 - 19.03.2010, 14:43
Re: Easy Question - by playbox12 - 19.03.2010, 14:57
Re: Easy Question - by dice7 - 19.03.2010, 15:26
Re: Easy Question - by playbox12 - 19.03.2010, 18:27

Forum Jump:


Users browsing this thread: 1 Guest(s)