[Help] Saving weapons for next spawns
#1

Hello, I have created a shop menu but when player buys a gun and i gets death. He lost his all bought weapons. Is there any way to save bought weapons for next spawn.
Thank You.
Reply
#2

Of course there is a way to do that, check the following topic:
https://sampforum.blast.hk/showthread.php?tid=315262

Here is the pastebin link:
http://pastebin.com/TaD5miwQ


EDIT: The trick is you need to save weapons onto a file and then load from that file, so edit it to your OnPlayerDeath etc..
Reply
#3

Is there any way without saving weapons in a file. Because i want to reset weapons after 5 mins. Just for 5 mins the weapons should be same.
Reply
#4

Maybe you can do OnPlayerDeath to save the weapons data with GetPlayerWeaponData(playerid, slot, &weapons, &ammo) then OnPlayerSpawn like GivePlayerWeapon, but you need to save them as slots then give them as slots, I hope you understand what I mean..
Reply
#5

Thanks for giving idea. System created.

pawn Код:
Rep ++;
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)