SA-MP Forums Archive
[FilterScript] [USEFULL] Weapon Saving/Loading + AutoSave - 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: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [FilterScript] [USEFULL] Weapon Saving/Loading + AutoSave (/showthread.php?tid=315262)



[USEFULL] Weapon Saving/Loading + AutoSave - milanosie - 02.02.2012

Really simple, but pretty usefull.
Anyway, here it is.
It saves weapons using dini so u must have the dini.inc

http://pastebin.com/TaD5miwQ

It autosaves every 3 seconds,
The saving is starting AFTER player spawn cause otherwise it would save it when the player has no weapons,

make a folder called weapons in ur scriptfiles


Re: [USEFULL] Weapon Saving/Loading + AutoSave - milanosie - 02.02.2012

Comments?


Re: [USEFULL] Weapon Saving/Loading + AutoSave - Da' J' - 03.02.2012

AWESOME!! Nice work!


Re: [USEFULL] Weapon Saving/Loading + AutoSave - Maylay_Young - 03.02.2012

Cool


Re: [USEFULL] Weapon Saving/Loading + AutoSave - milanosie - 03.02.2012

Thanks


Re: [USEFULL] Weapon Saving/Loading + AutoSave - Universal - 03.02.2012

So this will save your weapons every 2 seconds NON STOP. Even if player disconnects, the timer will still run. In my opinion, this would cause lag for servers with more than 20 players or so...


Re: [USEFULL] Weapon Saving/Loading + AutoSave - milanosie - 03.02.2012

Quote:
Originally Posted by Universal
View Post
So this will save your weapons every 2 seconds NON STOP. Even if player disconnects, the timer will still run. In my opinion, this would cause lag for servers with more than 20 players or so...
no, It does not run if the player disconnects, And I am using it for 50 players and its not lagging at all.
I don't use it as a FS tough, have it implemented in my saving system.


Re: [USEFULL] Weapon Saving/Loading + AutoSave - Universal - 03.02.2012

Quote:
Originally Posted by milanosie
View Post
no, It does not run if the player disconnects, And I am using it for 50 players and its not lagging at all.
I don't use it as a FS tough, have it implemented in my saving system.
It does, because you are not checking wether the player is connected or not in the public, and you're not killing the timer after player disconnects.
Basically, it just keeps running all the time until you shut down your server.


Re: [USEFULL] Weapon Saving/Loading + AutoSave - BoyDenker - 03.02.2012

it gives me Error 100:fatal error 100: cannot read from file: "dudb"

help?


Re: [USEFULL] Weapon Saving/Loading + AutoSave - Da' J' - 03.02.2012

Quote:
Originally Posted by BoyDenker
View Post
it gives me Error 100:fatal error 100: cannot read from file: "dudb"

help?
Download this and put it in your PAWNO's includes foulder.


Re: [USEFULL] Weapon Saving/Loading + AutoSave - oFLu - 04.02.2012

Nice Work Thanks


Re : [USEFULL] Weapon Saving/Loading + AutoSave - Amine_Mejrhirrou - 30.09.2012

maybe with djson will be better no ?


Re: [USEFULL] Weapon Saving/Loading + AutoSave - player94 - 28.06.2014

Thx so much, i added it on my server. I will test and the rep you if works.


Re: [USEFULL] Weapon Saving/Loading + AutoSave - GeekSiMo - 28.06.2014

To avoid Lagging with that timer! What About saving weapons at death and giving them at spawn. that's what i'm doing in my server


Re: [USEFULL] Weapon Saving/Loading + AutoSave - OuDayas - 06.02.2019

It's possible to make the same script, but in mysql? Im trying but I didn't have success