Forum
Search
Members
Help
Hello There, Guest!
Login
Username:
Password:
Lost Password?
Remember me
SA-MP Forums Archive
SA-MP Scripting and Plugins
Scripting Help
Threaded Mode
[Help] Saving weapons for next spawns
Champ
Gangsta
Posts: 765
Threads: 183
Joined: Sep 2011
Reputation:
0
#1
25.07.2013, 07:43
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.
Find
Reply
JimmyCh
Gangsta
Posts: 658
Threads: 32
Joined: Mar 2013
Reputation:
0
#2
25.07.2013, 07:51
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..
Find
Reply
Champ
Gangsta
Posts: 765
Threads: 183
Joined: Sep 2011
Reputation:
0
#3
25.07.2013, 08:07
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.
Find
Reply
JimmyCh
Gangsta
Posts: 658
Threads: 32
Joined: Mar 2013
Reputation:
0
#4
25.07.2013, 08:24
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..
Find
Reply
Champ
Gangsta
Posts: 765
Threads: 183
Joined: Sep 2011
Reputation:
0
#5
25.07.2013, 08:59
Thanks for giving idea. System created.
pawn Код:
Rep
++
;
Find
Reply
«
Next Oldest
|
Next Newest
»
View a Printable Version
Forum Jump:
Private Messages
User Control Panel
Who's Online
Search
Forum Home
SA-MP
-- News and Updates
-- General
-- Client Support
-- Bug Reports
-- Screenshots and Videos
SA-MP Server
-- Server Support
-- Server Advertisements
SA-MP Scripting and Plugins
-- Scripting Help
---- Tutorials
---- Discussion
---- Help Archive
-- Gamemode Scripts
-- Filterscripts
---- Includes
---- Tools and Files
---- Maps
-- Plugin Development
SA-MP DL Edition
-- SA-MP 0.3.DL
---- Model Releases
Other
-- Everything and Nothing
Non-English
-- Languages
---- Nederlands/Dutch
------ Scripting Showroom en Discussie
------ Off topic
---- Español/Spanish
------ Lanzamientos/Releases
---- Français/French
------ Showroom
---- Русский/Russian
------ Релизы/Releases
---- Português/Portuguese
------ Lançamentos/Releases
---- Română/Romanian
------ Salonul Scripturilor
---- Archive
Users browsing this thread: 1 Guest(s)
SA-MP Forums Archive
SA-MP Scripting and Plugins
Scripting Help