Raised This Month: $ Target: $400
 0% 

[HELP] Better way for Unlimited Clip?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 12-26-2015 , 05:49   Re: [HELP] Better way for Unlimited Clip?
Reply With Quote #1

Quote:
Originally Posted by Depresie View Post
Bugsy. could you please create an api for it? like set_user_uclip(id, true/false) ?
An API would be bad in this case.
__________________
HamletEagle is offline
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 12-26-2015 , 00:35   Re: [HELP] Better way for Unlimited Clip?
Reply With Quote #2

Just review my code for the unlimited clip native:

https://forums.alliedmods.net/showthread.php?t=245805
zmd94 is offline
Depresie
Veteran Member
Join Date: Nov 2013
Old 12-26-2015 , 09:13   Re: [HELP] Better way for Unlimited Clip?
Reply With Quote #3

why would an api be bad in this case?
i want to add to the game several weapons, and i think its better to create an api and set it in ham deploy, than hooking cur weapon for each weapon to set it unlimited clip
__________________
Depresie is offline
siriusmd99
Veteran Member
Join Date: Oct 2013
Location: Republic of Moldova
Old 12-28-2015 , 05:37   Re: [HELP] Better way for Unlimited Clip?
Reply With Quote #4

Why you dont use script given in previous posts?Just Add 32000 ammo to player's weapon and done. Set a task or two tasks to set 32k bullets to players and hook weapon reload and ham player spawn to reset ammo.It will be efficient.

https://forums.alliedmods.net/showpo...32&postcount=8
Is your server respawn mode?

Last edited by siriusmd99; 12-28-2015 at 05:44.
siriusmd99 is offline
FromTheFuture
Senior Member
Join Date: Jan 2013
Old 12-28-2015 , 18:21   Re: [HELP] Better way for Unlimited Clip?
Reply With Quote #5

What about this?
https://forums.alliedmods.net/showpo...53&postcount=8
FromTheFuture is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 12-28-2015 , 22:02   Re: [HELP] Better way for Unlimited Clip?
Reply With Quote #6

CurWeapon can handle this. Set all of the weapons you want affected in the conditions.

CurWeapon
  1. byte IsActive
  2. byte WeaponID
  3. byte ClipAmmo

So with this set
Code:
#define CSW_ELITE		10

#define CSW_FAMAS		15
#define CSW_USP			16
#define CSW_GLOCK18		17
#define CSW_AWP			18
You would do:
PHP Code:
register_event"CurWeapon" "EvCurWeapon" "be" "1=1" "2=10" "2=15" "2=16" "2=17" "2=18" "3=0" ); 
__________________
Bugsy is offline
Depresie
Veteran Member
Join Date: Nov 2013
Old 12-30-2015 , 10:08   Re: [HELP] Better way for Unlimited Clip?
Reply With Quote #7

Actualy, i was thinking either to set the clip of the user at ham deploy to 99999 but the hud would look messed up, also was thinking to set a task every 3.0 to set the clip, but then i tought thinking that the following would be better...

Make an API for it, but by the following method, create a special flag for Unlimited clip in the API, for example g_has_unclip.. then set it via a native to set or unset it to the players, then in cur weapon event, just check if the user has the g_has_uclip set

@From the future, well, the thing is that i need this for a zombie plague server where the zombies has 10k hp... from what i've seen in that code it is setting the full clip for the player when he kills someone, so that is not an option...

sorry for the late answers, i was sick these days and i couldnt enter..
__________________
Depresie 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 18:16.


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