AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Multiple C4s (https://forums.alliedmods.net/showthread.php?t=30052)

Cheap_Suit 06-21-2006 08:11

Multiple C4s
 
IF there were multiple c4's how would you get which c4 is defused?

GHW_Chronic 06-21-2006 08:12

what do u mean which c4 is defused? the one that doesn't exist anymore.

Cheap_Suit 06-21-2006 08:15

Yup


Edit:

Yea the one that doesn't exist anymore..

GHW_Chronic 06-21-2006 08:22

yup.. what? I think someone is misunderstanding someone else here...

Cheap_Suit 06-25-2006 20:48

Re: Multiple C4s
 
Sorry. Yea the one that doesn't exist anymore or the only that is getting defuse.

v3x 06-26-2006 02:21

Re: Multiple C4s
 
You could catch the bomb defused sound ( if it's emitted from the C4 entity ) and then use the entity id for that.

If you want to get the entid for the first bomb planted this *should* work:
Code:
#include <amxmodx> #include <fakemeta> public plugin_init() {     register_event("HLTV" , "event_HLTV" , "a" , "1=0" , "2=0");     register_forward(FM_SetModel , "forward_SetModel"); } new g_FirstC4ID; public event_HLTV()     g_FirstC4ID = 0; public forward_SetModel(ent , const model[]) {     if(equal(model , "models/w_c4.mdl") && !g_FirstC4ID)         g_FirstC4ID = ent; }

Cheap_Suit 06-27-2006 03:05

Re: Multiple C4s
 
I fould my answer on csx. Thanks everyone

VEN 06-27-2006 12:53

Re: Multiple C4s
 
Why would you need csx for bomb events? All events can be easily handled with the register_[log]event's: CS Bomb Scripting FAQ/Tutorial


All times are GMT -4. The time now is 08:01.

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