SA-MP Forums Archive
Weapons Saving (dini) - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Weapons Saving (dini) (/showthread.php?tid=547582)



Weapons Saving (dini) - UltraScripter - 23.11.2014

Hi, Guys I Need Weapon Save But Not 1 More Than 1 Weapons
Thx For Helping! .!


Re: Weapons Saving (dini) - OsteeN - 23.11.2014

Have you scripted anything? This section is for help and not for us to create scripts for you.
If you have, post your script.


Re: Weapons Saving (dini) - UltraScripter - 23.11.2014

ohh sorry my bad hare's the code :
pawn Код:
//the save
dini_IntSet(File, "Weapons", GetPlayerWeapon(playerid));
dini_IntSet(File, "Ammo", GetPlayerAmmo(playerid));

new weapon = dini_Int(File, "Weapons");
new ammo = dini_Int(File, "Ammo");
GivePlayerWeapon(playerid, weapon, ammo);
//Giving Player Weapon



Re: Weapons Saving (dini) - OsteeN - 23.11.2014

Quote:
Originally Posted by UltraScripter
Посмотреть сообщение
ohh sorry my bad hare's the code :
pawn Код:
//the save
dini_IntSet(File, "Weapons", GetPlayerWeapon(playerid));
dini_IntSet(File, "Ammo", GetPlayerAmmo(playerid));

new weapon = dini_Int(File, "Weapons");
new ammo = dini_Int(File, "Ammo");
GivePlayerWeapon(playerid, weapon, ammo);
//Giving Player Weapon
Well, I believe you would have to make one 'Weapon' and one 'Ammo' per weapon. (i.e: Weapon1, Weapon2, Ammo1, Ammo2, etc)
Also, using GetPlayerWeapon() will only get the weapon that the player is having in his hands.

Use: https://sampwiki.blast.hk/wiki/GetPlayerWeaponData


Re: Weapons Saving (dini) - UltraScripter - 23.11.2014

Ok thx for helping !.


Re: Weapons Saving (dini) - OsteeN - 23.11.2014

Quote:
Originally Posted by UltraScripter
Посмотреть сообщение
Ok thx for helping !.
Sure thing, post again if you need more help.


Re: Weapons Saving (dini) - UltraScripter - 23.11.2014

Ok .