Raised This Month: $51 Target: $400
 12% 

Reset Ammo in change name !


Post New Thread Reply   
 
Thread Tools Display Modes
bakir123
Senior Member
Join Date: Jan 2015
Location: Palestine, Hebron
Old 09-17-2017 , 08:38   Re: Reset Ammo in change name !
Reply With Quote #11

Quote:
Originally Posted by KiLLeR. View Post
remove 'public' from save_user_data then....

i compiled it
but there are a bug

it's working fine.
but if you did retry
new name and old name will get ammo = get_cvar_num("zp_starting_ammo_packs")


!!!
bakir123 is offline
Send a message via Skype™ to bakir123
KiLLeR.
Senior Member
Join Date: Jul 2014
Location: Bulgaria
Old 09-17-2017 , 08:48   Re: Reset Ammo in change name !
Reply With Quote #12

No way, because when disconnect, your ammo will be saved with current one and when you connect again it will load last saved for that nickname...
KiLLeR. is offline
bakir123
Senior Member
Join Date: Jan 2015
Location: Palestine, Hebron
Old 09-17-2017 , 09:42   Re: Reset Ammo in change name !
Reply With Quote #13

Quote:
Originally Posted by KiLLeR. View Post
No way, because when disconnect, your ammo will be saved with current one and when you connect again it will load last saved for that nickname...

for me, it's bad code....
not working as i want ...
bakir123 is offline
Send a message via Skype™ to bakir123
KiLLeR.
Senior Member
Join Date: Jul 2014
Location: Bulgaria
Old 09-17-2017 , 11:33   Re: Reset Ammo in change name !
Reply With Quote #14

Man you are asking in "Scripting Help", so you can't wait someone to write for your fully working as you want code. Try to do something by youself probbaly?! Also I can't test because I don't have a ZP server and I don't think to make one only because of your plugin. Your english is terrible(mine is not best, but your...) and I'm not sure if I understand you correctly. Also that you have said, doesn't make sens according to code, because retry is basically disconnect and connect, and if you look at the code I haven't set player's ammo to zp_starting_ammo_pack cvar, but obviously you don't have any knowledge...

Last edited by KiLLeR.; 09-17-2017 at 11:34.
KiLLeR. is offline
DarthMan
Veteran Member
Join Date: Aug 2011
Old 09-17-2017 , 15:14   Re: Reset Ammo in change name !
Reply With Quote #15

Quote:
Originally Posted by KiLLeR. View Post
Man you are asking in "Scripting Help", so you can't wait someone to write for your fully working as you want code. Try to do something by youself probbaly?! Also I can't test because I don't have a ZP server and I don't think to make one only because of your plugin. Your english is terrible(mine is not best, but your...) and I'm not sure if I understand you correctly. Also that you have said, doesn't make sens according to code, because retry is basically disconnect and connect, and if you look at the code I haven't set player's ammo to zp_starting_ammo_pack cvar, but obviously you don't have any knowledge...
Nvault is ok, but opening on init and closing on end for example is a bad idea for servers that are not truly working 24/7 without a single crash since they were opened. If a server crashes then the nvault is fucked up if it is still in-use, and when the server is re-opened everything from the vault will be lost because it was damaged. So sadly, the best thing to do is open the vault, after saving/loading close it. I know it's not a good diea, but for those servers that crash sometimes it's the ebst thing to do.
DarthMan is offline
KiLLeR.
Senior Member
Join Date: Jul 2014
Location: Bulgaria
Old 09-17-2017 , 15:27   Re: Reset Ammo in change name !
Reply With Quote #16

I know about that and on crash only data for the current map will be lost, not the whole vault. And also that doesn't have anything related to the issue that bakir123 talks.
KiLLeR. is offline
bakir123
Senior Member
Join Date: Jan 2015
Location: Palestine, Hebron
Old 09-17-2017 , 15:51   Re: Reset Ammo in change name !
Reply With Quote #17

Quote:
Originally Posted by DarthMan View Post
Nvault is ok, but opening on init and closing on end for example is a bad idea for servers that are not truly working 24/7 without a single crash since they were opened. If a server crashes then the nvault is fucked up if it is still in-use, and when the server is re-opened everything from the vault will be lost because it was damaged. So sadly, the best thing to do is open the vault, after saving/loading close it. I know it's not a good diea, but for those servers that crash sometimes it's the ebst thing to do.

1- my Server (Zombie Plague 4.3 Fix5a) means not crash
2- why we need to use Nvault ?
we can use zp_get_user_ammopacks(oldname) and set it for (newname)
then, oldname will reset to cvar start ammo packs
and that is all
bakir123 is offline
Send a message via Skype™ to bakir123
Depresie
Veteran Member
Join Date: Nov 2013
Old 09-17-2017 , 17:47   Re: Reset Ammo in change name !
Reply With Quote #18

He is not talking about any external ammo packs saving plugin

Zombie Plague 4.3 has a feature that saves the player's ammo pack on disconnect until the map changes, in order to avoid abusing reconnect to receive the starting ammo packs..

Without you posting the source code and explaining better what you want, nobody will be able to help you, because in this section there are not many people that used/edited the zombie plague addons
__________________

Last edited by Depresie; 09-17-2017 at 17:47.
Depresie is offline
bakir123
Senior Member
Join Date: Jan 2015
Location: Palestine, Hebron
Old 09-17-2017 , 22:34   Re: Reset Ammo in change name !
Reply With Quote #19

Quote:
Originally Posted by Depresie View Post
He is not talking about any external ammo packs saving plugin

Zombie Plague 4.3 has a feature that saves the player's ammo pack on disconnect until the map changes, in order to avoid abusing reconnect to receive the starting ammo packs..

Without you posting the source code and explaining better what you want, nobody will be able to help you, because in this section there are not many people that used/edited the zombie plague addons

But I think u understand my problem

What I must do ?
bakir123 is offline
Send a message via Skype™ to bakir123
KiLLeR.
Senior Member
Join Date: Jul 2014
Location: Bulgaria
Old 09-18-2017 , 06:10   Re: Reset Ammo in change name !
Reply With Quote #20

Quote:
Originally Posted by bakir123 View Post
1- my Server (Zombie Plague 4.3 Fix5a) means not crash
2- why we need to use Nvault ?
we can use zp_get_user_ammopacks(oldname) and set it for (newname)
then, oldname will reset to cvar start ammo packs
and that is all
That's what my plugin does.... Ammo for old name is saved with the start ammo pack cvar and new nickname will have your current ammo.
KiLLeR. is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 03:50.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode