Raised This Month: $ Target: $400
 0% 

what event keeps regestering


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
kp_uparrow
Penalized Member
Join Date: Jun 2006
Location: 192.168.0.1
Old 11-22-2006 , 18:41   what event keeps regestering
Reply With Quote #1

what event keeps regestering, like a event the keeps calling a function no matter what the player is doing
Attached Files
File Type: sma Get Plugin or Get Source (nonade2.sma - 747 views - 5.6 KB)
__________________
I USED A SECOND ACCOUNT TO DO MORE KARMA UPS AND DOWNS UNTIL GREENTRYST CAUGHT ME

Last edited by kp_uparrow; 11-22-2006 at 20:56.
kp_uparrow is offline
jim_yang
Veteran Member
Join Date: Aug 2006
Old 11-22-2006 , 21:45   Re: what event keeps regestering
Reply With Quote #2

set_task ?
__________________
Project : CSDM all in one - 99%
<team balancer#no round end#entity remover#quake sounds#fake full#maps management menu#players punishment menu#no team flash#colored flashbang#grenade trails#HE effect#spawn protection#weapon arena#weapon upgrade#auto join#no weapon drop#one name>
jim_yang is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 11-22-2006 , 21:46   Re: what event keeps regestering
Reply With Quote #3

server_frame, client_PreThink, client_PostThink, and possibly others. However, there are usually better alternatives, depending on what you are trying to accomplish.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
kp_uparrow
Penalized Member
Join Date: Jun 2006
Location: 192.168.0.1
Old 11-22-2006 , 21:57   Re: what event keeps regestering
Reply With Quote #4

im trying to have the plugin above keep checking players for if they have nade out, what event sould i use?
__________________
I USED A SECOND ACCOUNT TO DO MORE KARMA UPS AND DOWNS UNTIL GREENTRYST CAUGHT ME
kp_uparrow is offline
jim_yang
Veteran Member
Join Date: Aug 2006
Old 11-22-2006 , 22:07   Re: what event keeps regestering
Reply With Quote #5

sorry, but what does "have nade out" mean ?
__________________
Project : CSDM all in one - 99%
<team balancer#no round end#entity remover#quake sounds#fake full#maps management menu#players punishment menu#no team flash#colored flashbang#grenade trails#HE effect#spawn protection#weapon arena#weapon upgrade#auto join#no weapon drop#one name>

Last edited by jim_yang; 11-22-2006 at 22:13.
jim_yang is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 11-22-2006 , 22:12   Re: what event keeps regestering
Reply With Quote #6

I would register the CurWeapon event, since it is called when a player changes weapons (or shoots). The first argument sent with it is 1 if this is the weapon they are currently using, 0 if they are switching from this weapon. The second argument is the weapon in question (weapon they are using if first arg is 1, weapon they are switching from is first arg is 0). The last argument is the ammo in the weapon. So, for example:

Code:
register_event("CurWeapon","event_curweapon","b","1=1"); // ... public event_curweapon(id) {      if(read_data(2) != CSW_KNIFE)      {           // do something      } }
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
jim_yang
Veteran Member
Join Date: Aug 2006
Old 11-22-2006 , 22:20   Re: what event keeps regestering
Reply With Quote #7

here is my no vote version knife arena.
Code:
#include <amxmodx> #include <amxmisc> #define PLUGIN "Knife Arena" #define VERSION "1.0" #define AUTHOR "Jim" new knifeonly = 0 public plugin_init() {         register_plugin(PLUGIN, VERSION, AUTHOR)         register_concmd("knife_arena", "knife_arena", ADMIN_LEVEL_A)         register_event("CurWeapon", "knife", "b", "2!29") } public knife_arena(id, level, cid) {         if(!cmd_access(id, level, cid, 2))                 return PLUGIN_HANDLED         new argv[2]         read_argv(1, argv, 1)         new enable = str_to_num(argv)         if(enable != knifeonly) {                 knifeonly = enable                 if(knifeonly) {                         client_cmd(0, "weapon_knife")                         client_print(0, print_chat, "[AMXX] Knife Only Allowed!")                         set_hudmessage(0, 100, 0, -1.0, 0.65, 2, 0.02, 10.0, 0.01, 0.1, 2)                         show_hudmessage(0, "Knife Only Allowed")                 }                 else {                         client_print(0, print_chat, "[AMXX] All Weapons Allowed!")                         set_hudmessage(0, 100, 0, -1.0, 0.65, 2, 0.02, 10.0, 0.01, 0.1, 2)                         show_hudmessage(0, "All Weapons Allowed")                 }         }         return PLUGIN_HANDLED } public knife(id) {         if (knifeonly)                 engclient_cmd(id, "weapon_knife")         return PLUGIN_CONTINUE }
__________________
Project : CSDM all in one - 99%
<team balancer#no round end#entity remover#quake sounds#fake full#maps management menu#players punishment menu#no team flash#colored flashbang#grenade trails#HE effect#spawn protection#weapon arena#weapon upgrade#auto join#no weapon drop#one name>
jim_yang is offline
kp_uparrow
Penalized Member
Join Date: Jun 2006
Location: 192.168.0.1
Old 11-22-2006 , 22:27   Re: what event keeps regestering
Reply With Quote #8

i currently use curweapon but if client keeps pressing 4 44444 4 4 4 44444 then they can hold the nade and throw it
__________________
I USED A SECOND ACCOUNT TO DO MORE KARMA UPS AND DOWNS UNTIL GREENTRYST CAUGHT ME
kp_uparrow is offline
SweatyBanana
BANNED
Join Date: Sep 2005
Location: LOL
Old 11-24-2006 , 00:57   Re: what event keeps regestering
Reply With Quote #9

use engclient_cmd instead of client_cmd.
SweatyBanana is offline
Send a message via AIM to SweatyBanana Send a message via Yahoo to SweatyBanana
Reply


Thread Tools
Display Modes

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 06:58.


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