SA-MP Forums Archive
Weapons Saver - 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 Saver (/showthread.php?tid=310571)



Weapons Saver - arham - 12.01.2012

Hello all,
and sorry for asking this(makes me look noob) but I'm a noob in scripting, I tried make a weaponshop filterscript, it worked but i didn't manage to get it save the weapons, and load in on player reconnect, I tried searching, but I've found nothing, please help me D:
Arham. AKA Hunter


Re: Weapons Saver - Richie - 12.01.2012

pawn Код:
new WeaponData[MAX_PLAYERS][13];
new Ammo[MAX_PLAYERS][13];

for( new a; a < 13; a++ )
{
    GetPlayerWeaponData( i, a, WeaponData[i][a], Ammo[i][a] );
}

// Then save this in whatever you store player info with.
// Load your saved files and use this to give weapons back.
for( new a; a < 13; a++ )
{
    GiveWeapon(playerid,WeaponData[playerid][a], Ammo[playerid][a]);
}



Re: Weapons Saver - IceCube! - 12.01.2012

https://sampforum.blast.hk/showthread.php?tid=222266

Ever heard of looking harder? took me 44.000001 seconds.

Edit: If you just want saving use the above.


Re: Weapons Saver - arham - 12.01.2012

Thanks Guys