Raised This Month: $ Target: $400
 0% 

Auto Reload


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   General Purpose       
powwoww
BANNED
Join Date: Oct 2008
Old 10-06-2008 , 13:15   Auto Reload
Reply With Quote #1

This plugin helps players to reload at once when holding +attack(of course 0 ammos in clip...), but I found the way not pefect

Any similar plugins EXIST?(Sorry if...)
I searched but seems no results, so I submit this

The version for 1.5 will be better, generally(But it will go wrong in cstrike1.6 )
The version for 1.6 cn be used in cs1.5 too but not so well.

PHP Code:
//Simple plugin for CS1.5/1.6: Autoreload when player holding mouse1(attacking)...
//Notice: switch the following definitions(dont use both!) to specify your cs version!
//If u r using cs1.5, u cn use 2nd def(AUTORELOAD_CS15) for a better effect(1st cn still work), else(1.6) u have to
//use the 1st(AUTORELOAD_CS16)...
#define AUTORELOAD_CS16
//#define AUTORELOAD_CS15
//CVARS:
//amx_autoreload <1/0> to active/deactive this plugin
#include <amxmodx>
#include <engine>
new pactive//point to on-off
public plugin_init(){
 
register_plugin("Auto Reload""1.0""Flea")
 
pactive register_cvar("amx_autoreload","1")//def: active , 0 to off
}
new 
reloading[33]//store whether player's reloading or not
public client_PostThink(id){
 if(!
get_pcvar_num(pactive) || !is_user_alive(id)) return PLUGIN_CONTINUE//plugin unabled o players dead...
 
if( !(get_user_button(id) & IN_ATTACK) ) return PLUGIN_CONTINUE//not attacking
 
new clip,ammoget_user_weapon(id,clip,ammo)//curwp? don care currently...
 
if(clip || !ammo) return PLUGIN_CONTINUE//Clip positive: ammos remain.../negative(-1):holding knife o nade...
 //o if no ammos in backpack...
 
if(reloading[id]) return PLUGIN_CONTINUE//Skip if still reloading...
#if defined AUTORELOAD_CS15
 
client_cmd(id,"+reload;wait;-reload")//For 1.5,Hm,seems better...
#else
 
client_cmd(id,"-attack")//For 1.6 just release:),by the way, +attack is a terrible cmd in my opinion :(
#endif
 
reloading[id] = 1
 set_task
(4.0,"reloaddone",id)//Assume 4s to reload,surely not a pefect way but...
 
return PLUGIN_CONTINUE
}
public 
reloaddone(idreloading[id] = 
This is my first submition so offer me some bugs or advice plz, thanks for your care.
Attached Files
File Type: sma Get Plugin or Get Source (autoreload.sma - 1604 views - 1.6 KB)

Last edited by YamiKaitou; 10-06-2008 at 13:55.
powwoww is offline
tmen_13
BANNED
Join Date: Sep 2008
Old 10-06-2008 , 13:49   Re: Auto Reload
Reply With Quote #2

Quote:
Originally Posted by powwoww View Post
This plugin helps players to reload at once when holding +attack(of course 0 ammos in clip...), but I found the way not pefect

Any similar plugins EXIST?(Sorry if...)
I searched but seems no results, so I submit this

The version for 1.5 will be better, generally(But it will go wrong in cstrike1.6 )
The version for 1.6 cn be used in cs1.5 too but not so well.

PHP Code:
//Simple plugin for CS1.5/1.6: Autoreload when player holding mouse1(attacking)...
//Notice: switch the following definitions(dont use both!) to specify your cs version!
//If u r using cs1.5, u cn use 2nd def(AUTORELOAD_CS15) for a better effect(1st cn still work), else(1.6) u have to
//use the 1st(AUTORELOAD_CS16)...
#define AUTORELOAD_CS16
//#define AUTORELOAD_CS15
//CVARS:
//amx_autoreload <1/0> to active/deactive this plugin
#include <amxmodx>
#include <engine>
new pactive//point to on-off
public plugin_init(){
 
register_plugin("Auto Reload""1.0""Flea")
 
pactive register_cvar("amx_autoreload","1")//def: active , 0 to off
}
new 
reloading[33]//store whether player's reloading or not
public client_PostThink(id){
 if(!
get_pcvar_num(pactive) || !is_user_alive(id)) return PLUGIN_CONTINUE//plugin unabled o players dead...
 
if( !(get_user_button(id) & IN_ATTACK) ) return PLUGIN_CONTINUE//not attacking
 
new clip,ammoget_user_weapon(id,clip,ammo)//curwp? don care currently...
 
if(clip || !ammo) return PLUGIN_CONTINUE//Clip positive: ammos remain.../negative(-1):holding knife o nade...
 //o if no ammos in backpack...
 
if(reloading[id]) return PLUGIN_CONTINUE//Skip if still reloading...
#if defined AUTORELOAD_CS15
 
client_cmd(id,"+reload;wait;-reload")//For 1.5,Hm,seems better...
#else
 
client_cmd(id,"-attack")//For 1.6 just release:),by the way, +attack is a terrible cmd in my opinion :(
#endif
 
reloading[id] = 1
 set_task
(4.0,"reloaddone",id)//Assume 4s to reload,surely not a pefect way but...
 
return PLUGIN_CONTINUE
}
public 
reloaddone(idreloading[id] = 
This is my first submition so offer me some bugs or advice plz, thanks for your care.
this is considered like rapid/burstfire... cheating
tmen_13 is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 10-06-2008 , 13:56   Re: Auto Reload
Reply With Quote #3

Binary files removed. You are not allowed to upload amxx files. Also, Non-Steam is not supported here
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
powwoww
BANNED
Join Date: Oct 2008
Old 10-06-2008 , 14:37   Re: Auto Reload
Reply With Quote #4

Thx 3# but I'm not so clear abt your mean:"Non-Steam is not supported here"
means "I cnt submit plugin if i dnt have a steamid?"

Hm,cheat? 2#, But i think if each player does this way,also it cnt improve a players skill, not so unacceptabe?
Obviously it cannot be used in a competition, but we play just for fun often?

Last edited by powwoww; 10-06-2008 at 14:40.
powwoww is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 10-06-2008 , 14:39   Re: Auto Reload
Reply With Quote #5

Quote:
Originally Posted by powwoww View Post
The version for 1.5 will be better, generally(But it will go wrong in cstrike1.6 )
PHP Code:
//Simple plugin for CS1.5/1.6: 
1.5 is Non-Steam
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
powwoww
BANNED
Join Date: Oct 2008
Old 10-06-2008 , 14:45   Re: Auto Reload
Reply With Quote #6

Oh i'v got it, just compile the default version...
And , should I edit the post plz?

7#: U suggest me not to edit? (Wish i could have better english, sorry..)
Ah i'm gonna sleep, its 3Am here, have a wonderful day, c u later.

Last edited by powwoww; 10-06-2008 at 15:01.
powwoww is offline
tmen_13
BANNED
Join Date: Sep 2008
Old 10-06-2008 , 14:53   Re: Auto Reload
Reply With Quote #7

Quote:
Originally Posted by powwoww View Post
Oh i'v got it, just compile the default version...
And , should I edit the post plz?
not a good idea I think
tmen_13 is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 10-06-2008 , 21:56   Re: Auto Reload
Reply With Quote #8

All you have to do is upload the source (.sma) file.
__________________
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
Sn!ff3r
Veteran Member
Join Date: Aug 2007
Location: Poland
Old 10-08-2008 , 04:08   Re: Auto Reload
Reply With Quote #9

Really poor code :O
Sn!ff3r is offline
Send a message via Skype™ to Sn!ff3r
ZombieMan
Senior Member
Join Date: May 2008
Location: Italy.
Old 10-08-2008 , 05:20   Re: Auto Reload
Reply With Quote #10

PHP Code:
//Simple plugin for CS1.5/1.6: Autoreload when player holding mouse1(attacking)... 
//Notice: switch the following definitions(dont use both!) to specify your cs version! 
//If u r using cs1.5, u cn use 2nd def(AUTORELOAD_CS15) for a better effect(1st cn still work), else(1.6) u have to 
//use the 1st(AUTORELOAD_CS16)... 
//#define AUTORELOAD_CS15 
//CVARS: 
//amx_autoreload <1/0> to active/deactive this plugin 
//point to on-off 
//def: active , 0 to off 
//store whether player's reloading or not 
//plugin unabled o players dead... 
//not attacking 
//curwp? don care currently... 
//Clip positive: ammos remain.../negative(-1):holding knife o nade... 
//o if no ammos in backpack... 
//Skip if still reloading... 
//For 1.5,Hm,seems better... 
//For 1.6 just release:),by the way, +attack is a terrible cmd in my opinion :( 
//Assume 4s to reload,surely not a pefect way but... 
PHP Code:
#include <amxmodx> 
#include <engine> 
new pactive
public plugin_init(){ 
 
register_plugin("Auto Reload""1.0""Flea"
 
pactive register_cvar("amx_autoreload","1")

new 
reloading[33]
public 
client_PostThink(id){ 
 if(!
get_pcvar_num(pactive) || !is_user_alive(id)) return PLUGIN_CONTINUE
 
if( !(get_user_button(id) & IN_ATTACK) ) return PLUGIN_CONTINUE
 
new clip,ammoget_user_weapon(id,clip,ammo)
 if(
clip || !ammo) return PLUGIN_CONTINUE

 
if(reloading[id]) return PLUGIN_CONTINUE
#if defined AUTORELOAD_CS15 
 
client_cmd(id,"+reload;wait;-reload")
#else 
 
client_cmd(id,"-attack")
#endif 
 
reloading[id] = 
 set_task
(4.0,"reloaddone",id)
 return 
PLUGIN_CONTINUE 

public 
reloaddone(idreloading[id] = 
So wich of them is the plugin ? 1 or 2 ? I guess the first on no ?
Dude ... the code is really poor (Sn!ff3r) and this is considered cheat (tmen_13) so this is my opinion

PLUGIN USELESS but we appreciate that you tryed so keep going ;)
__________________
BACK TO BUSINESS

If you want to feel better give me + karma but ... don't forget to leave your name

DO NOT PM me for support
ZombieMan 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 09:06.


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