ssgm pistol ammo fix [message #446304] |
Thu, 28 April 2011 06:50 ![Go to next message Go to next message](/theme/Renegade_Forums/images/down.png) |
iRANian
Messages: 4311 Registered: April 2011
Karma: 0
|
General (4 Stars) |
|
|
http://pastebin.ca/2051548
This fixes the pistol starting empty when you spawn with a character, it also fixes the pistol' ammo not being refilled when you refill.
Because BHS.dll's PT purchase hooks are broken in that they don't hook refills, i use a timer to fix refilling (without this, the pistol behavior will change to no-reload when you refill).
thanks to z310 and Leprosy for helping me test this. This is NOT tested on a big server, so test it yourself and report any bugs if you can find them.
Long time and well respected Renegade community member, programmer, modder and tester.
Scripts 4.0 private beta tester since May 2011.
My Renegade server plugins releases
[Updated on: Thu, 28 April 2011 06:54] Report message to a moderator
|
|
|
Re: ssgm pistol ammo fix [message #446343 is a reply to message #446304] |
Fri, 29 April 2011 00:37 ![Go to previous message Go to previous message](/theme/Renegade_Forums/images/up.png) ![Go to next message Go to next message](/theme/Renegade_Forums/images/down.png) |
![](http://renegadeforums.com/images/avatars/Viseroid.jpg) |
Gen_Blacky
Messages: 3250 Registered: September 2006
Karma: 1
|
General (3 Stars) |
|
|
iRANian wrote on Thu, 28 April 2011 06:50 |
fixes the pistol ammo not being refilled when you refill.
i use a timer to fix refilling (without this, the pistol behavior will change to no-reload when you refill).
|
I have never seen this problem.
![index.php?t=getfile&id=13296&private=0](index.php?t=getfile&id=13296&private=0)
This is the default ammo settings for the pistol.
Maxinventory = -1 meaning unlimited ammo 999.
I don't see why you have to set the ammo. Doesn't matter if the player refills.
-
Attachment: pistol.jpg
(Size: 16.36KB, Downloaded 452 times)
![http://s18.postimage.org/jc6qbn4k9/bricks3.png](http://s18.postimage.org/jc6qbn4k9/bricks3.png)
[Updated on: Fri, 29 April 2011 00:38] Report message to a moderator
|
|
|
Re: ssgm pistol ammo fix [message #446350 is a reply to message #446304] |
Fri, 29 April 2011 04:30 ![Go to previous message Go to previous message](/theme/Renegade_Forums/images/up.png) ![Go to next message Go to next message](/theme/Renegade_Forums/images/down.png) |
iRANian
Messages: 4311 Registered: April 2011
Karma: 0
|
General (4 Stars) |
|
|
The sentences you quoted refer to two different things, without the loop the ammo gets set to the no-reload behavior you normally see on sniper servers. the "ammo not refilling when you refill" is a bug with the normal code that makes refilling not do aynthing for the pistol.
I honestly have no idea what the refill code is doing, but with all the settings I tried (this includes setting MaxInventory, either ammo is set to no-reload on spawn, on refill, or both). There was also a bug that made the current clip ammo get set to 0 after reloading thus it was endlessly looping. Are you saying you got it working without the timer loop? If not, try running the code without the loop, dunno if something else is affecting it.
I can see why you would logically think setting the ammo isn't required, but the engine/server behavior for weapons like the pistol is incredibly buggy and I made this fix after trying out four variables for a few hours.
this code should work on all weapons like the pistol (ClipSize not -1, MaxInventory -1). It could be optimized by triggering the refill specific code by detecting refills, but I haven't found a way to detect refills yet.
Long time and well respected Renegade community member, programmer, modder and tester.
Scripts 4.0 private beta tester since May 2011.
My Renegade server plugins releases
[Updated on: Fri, 29 April 2011 04:41] Report message to a moderator
|
|
|
Re: ssgm pistol ammo fix [message #446363 is a reply to message #446350] |
Fri, 29 April 2011 14:15 ![Go to previous message Go to previous message](/theme/Renegade_Forums/images/up.png) ![Go to next message Go to next message](/theme/Renegade_Forums/images/down.png) |
![](http://renegadeforums.com/images/avatars/Viseroid.jpg) |
Gen_Blacky
Messages: 3250 Registered: September 2006
Karma: 1
|
General (3 Stars) |
|
|
The reason your getting the no reload bug is because your changing the pistol ammo. You shouldn't be editing the actual weapon you need to edit the powerup that the players are given.
![index.php?t=getfile&id=13297&private=0](index.php?t=getfile&id=13297&private=0)
Change GrantWeaponClips via code. "fixes the pistol starting empty"
It also fixed in scripts 4.0
-
Attachment: pistol2.jpg
(Size: 66.98KB, Downloaded 420 times)
![http://s18.postimage.org/jc6qbn4k9/bricks3.png](http://s18.postimage.org/jc6qbn4k9/bricks3.png)
[Updated on: Fri, 29 April 2011 14:26] Report message to a moderator
|
|
|
Re: ssgm pistol ammo fix [message #446706 is a reply to message #446304] |
Sun, 08 May 2011 11:19 ![Go to previous message Go to previous message](/theme/Renegade_Forums/images/up.png) |
robbyke
Messages: 348 Registered: September 2010 Location: Belgium
Karma: 0
|
Recruit |
|
|
I have a script that freezes a person if it gets hit with a railgun.
i didnt adjust the railgun its a script thats attached to the player now a railgun has alot of ammo i wanted to limit it so he actually had only 10 clips in his bag how can i do this server side?
ive tried modding objects.ddb but it wont work
Owner of kambot TT server
kambot.freeforums.org
|
|
|