Raised This Month: $ Target: $400
 0% 

Blocking Defuse


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
The Specialist
BANNED
Join Date: Nov 2006
Old 11-26-2006 , 14:55   Re: Blocking Defuse
Reply With Quote #5

Force them to execute ~IN_USE ?? can you explaine what you meen by this please ?

EDIT : heres my code so far but it crahsed my server .
Code:
#include <amxmodx> #include <fakemeta> new keys = MENU_KEY_0|MENU_KEY_1|MENU_KEY_2|MENU_KEY_3; new g_Switch; public plugin_init() {  register_plugin("Cut The Right Wire","0.1","The Speicialist");  g_Switch = register_cvar("ctrw_switch","1");  register_menucmd(register_menuid("menu_show"),1023,"menu_choose");  register_logevent("bomb_defuse_no_kit", 3, "2=Begin_Bomb_Defuse_Without_Kit");  register_logevent("bomb_defuse_kit", 3, "2=Begin_Bomb_Defuse_With_Kit");  register_forward(FM_PlayerPreThink,"menu_choose"); } // detect defusing public bomb_defuse_no_kit() {  new id = get_loguser_index();    if(get_pcvar_num(g_Switch)==0)  {   return PLUGIN_HANDLED;  }else{   new menu[192];   format(menu,191,"Choose The Right Wire Or Die!^n1. Red^n2. Blue^n3. Green^n^n0. Die");   show_menu(id,keys,menu,-1,"menu_show");  }  return 0; } // detect defusing public bomb_defuse_kit() {  new id = get_loguser_index();    if(get_pcvar_num(g_Switch)==0)  {   return PLUGIN_HANDLED;  }else{   new menu[192];   format(menu,191,"Choose The Right Wire Or Die!^n1. Red^n2. Blue^n3. Green^n^n0. Die");   show_menu(id,keys,menu,-1,"menu_show");  }  return 0; } // remove use button and show menu public menu_choose(id,key) {  set_pev( id, pev_button, pev(id,pev_button) & ~IN_USE);  new const Time = get_cvar_num("mp_c4timer")  new wire = random(2);  switch(key)  {   case 0 :   {    if( wire == 0 )    {     set_cvar_num("mp_c4timer",(Time + 10));     return PLUGIN_HANDLED;    }else{     set_cvar_string("mp_c4timer","0");     return PLUGIN_HANDLED;    }   }   case 1:   {    if( wire == 1)    {     set_cvar_num("mp_c4timer",(Time + 10 ));     return PLUGIN_HANDLED;    }else{     set_cvar_string("mp_c4timer","0");     return PLUGIN_HANDLED;    }   }   case 2 :   {    if( wire == 2 )    {     set_cvar_num("mp_c4timer",(Time + 10 ));     return PLUGIN_HANDLED;    }else{     set_cvar_string("mp_c4timer","0");     return PLUGIN_HANDLED;    }   }  }  set_cvar_num("mp_c4timer",Time);  return PLUGIN_HANDLED; } // function to get index from log events stock get_loguser_index() {  new loguser[80], name[32];  read_logargv(0, loguser, 79);  parse_loguser(loguser, name, 31);  return get_user_index(name); }

Last edited by The Specialist; 11-26-2006 at 14:58.
The Specialist is offline
Send a message via AIM to The Specialist
 



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:56.


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