AlliedModders

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

wTf. 10-25-2013 12:21

help
 
i use this command

PHP Code:

register_concmd("+kill","KillCommand"); 

public 
KillCommand(id) {
    new 
targetbody;
    
get_user_aiming(idtargetbody);

    if(
is_user_alive(target)) {
        
client_cmd(id"bind e ^"+kill^"");
        
user_kill(target1);
        
client_print(target,"You are DEAD")
        
client_print(id"You are KILLER")
    }
    return 
PLUGIN_HANDLED;


but, i want to use this command
Code:

IN_USE

alan_el_more 10-25-2013 12:29

Re: help
 
Search FM_CmdStart or Ham_Use

DWIGHTpN 10-25-2013 12:34

Re: help
 
I'm not sure, but...
PHP Code:

public plugin_init() {
       
register_forward(FM_CmdStart"fwd_CmdStart");
}

public 
fwd_CmdStart(iduc_handleseed) {
    if(!
is_user_alive(id)) return FMRES_IGNORED
    
    
new buttons get_uc(uc_handle,UC_Buttons)
    if(
buttons IN_USE) {
          new 
targetbody
          get_user_aiming
(idtargetbody)
          if( 
is_user_alivetarget ) ) {
               
user_kill(target1)
               
client_print(targetprint_center"You are DEAD"
               
client_print(idprint_center,  "You are KILLER")
          }
   }
   return 
FMRES_IGNORED




All times are GMT -4. The time now is 23:15.

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