AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Defuse Trigger Or Event (https://forums.alliedmods.net/showthread.php?t=5688)

WDUK 09-09-2004 17:04

Defuse Trigger Or Event
 
What event would it be when a CT is about to defuse? Because i'm writing a plugin which would do something when a CT attempts to defuse. When a CT starts to defuse I want to check if they are using a defuse kit.
I suppose it would involve 'register_event' for the defuse part then 'cs_get_user_defuse'.

johnjg75 09-10-2004 00:49

is there such an event? :?

Freecode 09-10-2004 08:17

yep ur on the right track. Now to get the eactual even why not print out all data that is getting called when the player is defusing so u can learn how to find out information and ull now what even it is.

WDUK 09-10-2004 10:34

How would you get that data?

Votorx 09-10-2004 12:48

read_data(1) for the first argument send then read_data(2) for the second and so on.

WDUK 09-10-2004 14:12

I'm sorry I don't get what you mean? :?

WDUK 09-10-2004 16:26

I know WC3FT checks if someone is defusing because it gives them XP, but I can't find the event or trigger,

KRoT@L 09-10-2004 17:23

Found in wc3.sma:

register_event("BarTime", "bomb_defusing", "be", "1=10", "1=5")

WDUK 09-10-2004 17:56

Help Needed!
Code:
#include <amxmodx> #include <cstrike> public plugin_init()     register_plugin("Evil Defuse","0.01b","WDUK")     register_event("BarTime", "bomb_defusing","be", "1=10", "1=5")     public bomb_defusing(id){     if(cs_get_user_defuse(id) == 1) {     client_print(0,print_chat,"test") } }

I get an error while compiling:
Code:

Error 021: Symbol already defined 'register_event'
Grr how do I fix it, the plugin atm is just displaying 'Test' when defusing with a kit just to see if it works.

FeuerSturm 09-10-2004 18:20

you just forgot 2 brackets :wink:

Code:
#include <amxmodx> #include <cstrike> public plugin_init(){     register_plugin("Evil Defuse","0.01b","WDUK")     register_event("BarTime", "bomb_defusing","be", "1=10", "1=5") }       public bomb_defusing(id){     if(cs_get_user_defuse(id) == 1){         client_print(0,print_chat,"test")         } }


All times are GMT -4. The time now is 17:12.

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