Raised This Month: $32 Target: $400
 8% 

ZP Reset ammo after change name ?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
bakir123
Senior Member
Join Date: Jan 2015
Location: Palestine, Hebron
Old 09-15-2017 , 04:34   ZP Reset ammo after change name ?
Reply With Quote #1

hello guys

i noticed a problem in ZP 4.3 fix5a mod

for example, if you have 20 ammo on your name
and you changed your name to other name from server console while you playing, your new name will have same ammo (20) else old name have 20 ammo, so many players if they will save their ammo, they just change their name from Server . and when new name ammo = 0
they back to old name. lol

so i need, when you changed your name, i want old name = get_cvar_num("zp_starting_ammo_packs")

and new name get your ammo. and old one reset to cvar of starting ammo

i hope anyone understand me
bakir123 is offline
Send a message via Skype™ to bakir123
bakir123
Senior Member
Join Date: Jan 2015
Location: Palestine, Hebron
Old 09-20-2017 , 16:43   Re: ZP Reset ammo after change name ?
Reply With Quote #2

Any help ?
bakir123 is offline
Send a message via Skype™ to bakir123
georgik57
Veteran Member
Join Date: Oct 2008
Location: 🎧Music World
Old 09-22-2017 , 16:32   Re: ZP Reset ammo after change name ?
Reply With Quote #3

Zp saves the temporary ammo packs and classes based on ip not name. Its only flaw is that it doesnt include the port as far as i can remember so players playing from the same ip can abuse it. I corrected that in zpnm. See its code
__________________
georgik57 is offline
Send a message via MSN to georgik57 Send a message via Yahoo to georgik57 Send a message via Skype™ to georgik57
bakir123
Senior Member
Join Date: Jan 2015
Location: Palestine, Hebron
Old 09-22-2017 , 16:38   Re: ZP Reset ammo after change name ?
Reply With Quote #4

Quote:
Originally Posted by georgik57 View Post
Zp saves the temporary ammo packs and classes based on ip not name. Its only flaw is that it doesnt include the port as far as i can remember so players playing from the same ip can abuse it. I corrected that in zpnm. See its code


So I don’t need to add code in client_infochanged ?

And what is the code that I should it ? And turn it save with name not ip ?
bakir123 is offline
Send a message via Skype™ to bakir123
georgik57
Veteran Member
Join Date: Oct 2008
Location: 🎧Music World
Old 09-22-2017 , 16:50   Re: ZP Reset ammo after change name ?
Reply With Quote #5

Depends on what youre talking about. Im talking about zp's default temporary data save system. If thats also what youre talking about, search for get_user_ip and remove the third parameter(without_port) or set it to 0.

Edit: make sure u also increase the ip string length to at least 25.
__________________

Last edited by georgik57; 09-22-2017 at 16:51.
georgik57 is offline
Send a message via MSN to georgik57 Send a message via Yahoo to georgik57 Send a message via Skype™ to georgik57
bakir123
Senior Member
Join Date: Jan 2015
Location: Palestine, Hebron
Old 09-22-2017 , 16:59   Re: ZP Reset ammo after change name ?
Reply With Quote #6

Quote:
Originally Posted by georgik57 View Post
Depends on what youre talking about. Im talking about zp's default temporary data save system. If thats also what youre talking about, search for get_user_ip and remove the third parameter(without_port) or set it to 0.

Edit: make sure u also increase the ip string length to at least 25.
I will explain more
Look to this example
You Are now playing with geo name , well?
You have 60 ammo, you just changed your name to bakir (in game using console “name bakir”)
Well
Now , bakir will have 60 ammo else geo has 60
So when bakir spend his ammo, he will disconnect and back to old name (geo) cuz it’s have 60 ammo
So I want one thing
If you changed your name in game, old name will reset ammo to cvar zp starting ammonia ,
And new name will get the real ammo

Understand me?
bakir123 is offline
Send a message via Skype™ to bakir123
arvEL.
Senior Member
Join Date: Dec 2014
Location: Iraq
Old 02-20-2018 , 04:05   Re: ZP Reset ammo after change name ?
Reply With Quote #7

easy request when i back to home i will solve your problem
__________________
arvEL. is offline
Send a message via Skype™ to arvEL.
Reply


Thread Tools
Display Modes

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 17:04.


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