Raised This Month: $ Target: $400
 0% 

ClipInfo - Infinite ammo - XxAvalanchexX saved the day


Post New Thread Reply   
 
Thread Tools Display Modes
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 11-05-2006 , 15:16   Re: ClipInfo - Infinite ammo - I think it can't be done...
Reply With Quote #11

Quote:
Originally Posted by stupok69 View Post
XxAvalanchexX, I don't know where you got the information to make that...
I was up last night using the amx_dumppvdata plugin (missing author, I think PM) to find the offsets for each and every weapon.

Quote:
Originally Posted by stupok69 View Post
Just to clarify: Is ava_ts.inc called a module? or do you just call that an include file? Does a module necessarily use a .dll?
It's an include file. You put it in your scripting/include directory, and include it like any other include file (ie: amxmodx, fun). It doesn't require its own module, but it does use the fakemeta module.

Quote:
Originally Posted by stupok69 View Post
The ts_set_weapon_clip does the same thing as sending a ClipInfo message with whatever integer you want for the clip. It doesn't actually modify the gun's clip, just the HUD display.
I did some testing with it myself earlier today (about an hours worth), and it was working fine for me. It was actually really fun. Wooh 200 grenades!! Here is how I call it:

Code:
 public clip(id)  {     new dummy, weapon = ts_getuserwpn(id,dummy,dummy,dummy,dummy);     new result = ts_set_weapon_clip(id,weapon,200);     client_print(id,print_chat,"* Result: %i",result);     return PLUGIN_HANDLED;  }

Is that similar to what you used?

Quote:
Originally Posted by stupok69 View Post
The ts_set_weapon_ammo works beautifully, with no problem. I call the function on WeaponInfo and the backpack ammo is set just fine.
Glad to hear it!

Anyway, I refined the include a bunch, and added ts_set_weapon_ready, which uses offset data I got from last night but I forgot to put in.

Try the new include and let me know how it goes for you.

EDIT: file moved to http://forums.alliedmods.net/showthread.php?p=400113
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS

Last edited by XxAvalanchexX; 11-05-2006 at 16:34.
XxAvalanchexX is offline
stupok
Veteran Member
Join Date: Feb 2006
Old 11-05-2006 , 15:50   Re: ClipInfo - Infinite ammo - I think it can't be done...
Reply With Quote #12

YES!!!!!!
BAILOPAN needs to change the karma system, you deserve at least an extra 1000 karma points.

I just tested the ts_set_weapon_clip() function, and it worked! I think it may even be excessive... you NEVER have to reload, just hold down the trigger. I think it's too much fun, might just alter the clip size to 200 and have the clients reload every 200 shots.

Here is the code I used to call it:
Code:
#include <amxmodx> #include <amxmisc> #include <tsfun> #include <ava_ts> #define PLUGIN "Infinite Ammo" #define VERSION "1.0" #define AUTHOR "stupok69" public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)     register_event("ClipInfo", "clip_info", "b") } public clip_info(id) {     new clip = read_data(1)     if(clip < 5) add_ammo(id) } public add_ammo(id) {     new clip, blah     new weapon = ts_getuserwpn(id, clip, blah, blah, blah)     ts_set_weapon_clip(id, weapon, 200) }

And of course a screenshot of the plugin in action.
Attached Thumbnails
Click image for larger version

Name:	mecklenburg_b50002.JPG
Views:	116
Size:	94.1 KB
ID:	11790  
stupok is offline
VEN
Veteran Member
Join Date: Jan 2005
Old 11-05-2006 , 16:15   Re: ClipInfo - Infinite ammo - I think it can't be done...
Reply With Quote #13

Quote:
Originally Posted by XxAvalanchexX View Post
I was up last night using the amx_dumppvdata plugin
Can you please attach it here, because i can't find it.
VEN is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 11-05-2006 , 16:24   Re: ClipInfo - Infinite ammo - XxAvalanchexX saved the day
Reply With Quote #14

stupok69: note that you can go higher or lower than 200 if you want to. The ammo display can only show up to 216 (I think) bullets in clip at a time, though, but you can actually have more than that.

VEN: sure. I don't remember the filename originally used, but I modified it ever since I first got it to put it in amxmodx/data/pdatadump.log

This is the script I use to compare changes: http://avalanche.epherion.com/pdata/

Ignore the time interval thing, it was for something else. Also, it's rather unforgiving as to the format. The file must be named pdatadump.log, and each pdata set must be from the exact same entity.
Attached Files
File Type: sma Get Plugin or Get Source (dump.sma - 365 views - 1.7 KB)
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS

Last edited by XxAvalanchexX; 11-05-2006 at 16:26.
XxAvalanchexX is offline
VEN
Veteran Member
Join Date: Jan 2005
Old 11-06-2006 , 13:50   Re: ClipInfo - Infinite ammo - XxAvalanchexX saved the day
Reply With Quote #15

Just wanted to see the source in hope that this one is quite better than mine pdata plugin, but actually the techique is quite similar, thanks!
VEN is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 11-06-2006 , 18:07   Re: ClipInfo - Infinite ammo - XxAvalanchexX saved the day
Reply With Quote #16

I edited the PHP source so that you can upload other file names and the entities don't have to be exactly the same, in case you were interested in using it.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX 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 04:50.


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