Raised This Month: $ Target: $400
 0% 

Drop C4 In Site=kill


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 01-24-2007 , 15:58   Drop C4 In Site=kill
Reply With Quote #1

Hi.I want that this plugin "slay" that player who drop the [c4] on C4 AREA after 5 seconds!Here is the Code!But it's not working why? =>>

Code:
 
#include <amxmodx> 
 
#define PLUGIN_NAME "New plugin" 
#define PLUGIN_VERSION "0.1" 
#define PLUGIN_AUTHOR "Name" 
 
 
public plugin_init() 
{ 
    register_plugin(PLUGIN_NAME,PLUGIN_VERSION,PLUGIN_AUTHOR); 
    register_logevent("f_spawned", 3, "2=Spawned_With_The_Bomb"); 
} 
 
 
public f_killuser(id) 
    user_kill(id,0); 
 
stock get_loguser_index() 
{ 
    new loguser[80],name[32] 
 
    read_logargv(0,loguser,79) 
 
    parse_loguser(loguser,name,31) 
 
    return get_user_index(name) 
 
} 
 
public f_spawned() 
{ 
 
    new id = get_loguser_index(); 
 
    set_task(5.0,"f_hasbomb",id); 
 
} 
 
public f_hasbomb(id) 
{ 
 
    if(user_has_weapon(id, CSW_C4)) 
        return PLUGIN_HANDLED; 
    else 
    {  
 
        set_task(5.0,"f_killuser",id); 
 
    } 
 
    return PLUGIN_HANDLED; 
 
}
Thanks in Advanced!

Last edited by Alka; 01-25-2007 at 09:33.
Alka is offline
 



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 22:24.


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