Raised This Month: $ Target: $400
 0% 

Reload on Low...


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Tupac
Junior Member
Join Date: May 2005
Location: h00d
Old 05-30-2005 , 08:27   Reload on Low...
Reply With Quote #1

Hi, new to amxx just wondering now use to these functions...

i want to make it so u cannot reload when ammo == 1-50...
not sure how to tell u...

i have the whole script but this is the part unsure of...
Code:
if(get_user_button(id) & IN_RELOAD) { if (cs_get_weapon_ammo(id, 1-50)) (get_user_button(id) & IN_RELOAD==0)

I know that the cs_get_weapon_ammo tell us how much a player has
in his clip but i wanna be able to tell if he has any ammo from 1 to 50...
not sure how any ideas plz

Thanks again enjoy my stay here.
__________________
Tupac is offline
Front Line
Senior Member
Join Date: Jan 2005
Old 05-30-2005 , 08:29  
Reply With Quote #2

Why would you want to know this...?
sorry not able to help pm v3x hes very knowledgable...
__________________
My plugins...

Are all Here...Click Me
Front Line is offline
Tupac
Junior Member
Join Date: May 2005
Location: h00d
Old 05-30-2005 , 09:08  
Reply With Quote #3

Just an idea...anyone help please?
__________________
Tupac is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 05-30-2005 , 12:27  
Reply With Quote #4

Backpack ammo or what? I've combined the clip ammo + the bp ammo and came up with this:
Code:
#include <amxmodx> #include <engine> public plugin_init()     register_plugin("No reload on low amt","0.1","v3x") public client_prethink(id) {     if(get_user_button(id)&IN_RELOAD) {             new weapon,clip,ammo         get_user_ammo(id,weapon,clip,ammo)         if((clip+ammo) <= 50)             return PLUGIN_HANDLED     }     return PLUGIN_CONTINUE }
If that doesn't work, we can try an event like so:
Code:
#include <amxmodx> #include <engine> public plugin_init() {     register_plugin("No reload on low amt","0.1","v3x")     register_event("CurWeapon","weapon_event","be") } public weapon_event(id) {     if(get_user_button(id)&IN_RELOAD) {             new weapon,clip,ammo         get_user_ammo(id,weapon,clip,ammo)         if((clip+ammo) <= 50)             return PLUGIN_HANDLED     }     return PLUGIN_CONTINUE }
Let me know the outcome.
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
Front Line
Senior Member
Join Date: Jan 2005
Old 05-31-2005 , 03:14  
Reply With Quote #5

i thought he was trying to only make it reload when on 0 bullets...
therefore u can't reload between 1-50?
__________________
My plugins...

Are all Here...Click Me
Front Line 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 16:42.


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