SA-MP Forums Archive
Weapon Saving - 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: Weapon Saving (/showthread.php?tid=559117)



Weapon Saving - TheTerminator - 21.01.2015

I have an enumerator of pWeapon, pAmmo.
On disconnect, the script gets the pWeapon, and pAmmo on slot 0.

PlayerInfo[playerid][pWeapon]
PlayerInfo[playerid][pAmmo]

I made it save in an .ini file as well.

On spawn, I made:

pawn Код:
GivePlayerWeapon(playerid, PlayerInfo[playerid][pWeapon], PlayerInfo[playerid][pAmmo]);
but it won't give the weapon or do anything really.

Anyone know why?

I use Y_INI


AW: Weapon Saving - Saize - 21.01.2015

This usually should work, are you sure that theyґre getting loaded before OnPlayerSpawn?

You should try to print the Output of the Values


Re: Weapon Saving - TheTerminator - 21.01.2015

Works, fixed it.

Had a rookie mistake in the script that wasn't technically an error but yeah...
Thank you for your sincere attempt to help