Raised This Month: $ Target: $400
 0% 

Drop C4 In Site=kill


Post New Thread Reply   
 
Thread Tools Display Modes
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
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 01-25-2007 , 09:30   Re: Drop C4=Slay
Reply With Quote #2

*bump* can enyone help me pls..
Alka is offline
Dutchie
Junior Member
Join Date: Jan 2007
Location: Canada!!!
Old 01-25-2007 , 09:37   Re: Drop C4 In Site=kill
Reply With Quote #3

Code:
#include <cstrike>
#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; 
 
}
Try that
__________________

Dutchie is offline
Dutchie
Junior Member
Join Date: Jan 2007
Location: Canada!!!
Old 01-25-2007 , 09:39   Re: Drop C4 In Site=kill
Reply With Quote #4

SCRATCH THAT

Code:
#include <cstrike>
#include <amxmodx>


#define PLUGIN_NAME "New plugin" 
#define PLUGIN_VERSION "0.1" 
#define PLUGIN_AUTHOR "Name" 
 
 
public plugin_init() 
{ 
    register_plugin("C4 Drop","1.0","Alka"); 
    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; 
 
}
__________________

Dutchie is offline
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 01-25-2007 , 09:48   Re: Drop C4 In Site=kill
Reply With Quote #5

Last one is not working.. ERROR "/home/groups/amxmodx/compiler3/include/cstrike.inc(13) : error 017: undefined symbol "AMXX_VERSION_NUM"
" But you modify nothing ....enyone else..

Last edited by Alka; 01-25-2007 at 09:58.
Alka is offline
dutchmeat
Senior Member
Join Date: Sep 2006
Old 01-25-2007 , 10:37   Re: Drop C4 In Site=kill
Reply With Quote #6

This plugin doesn't kill anyone, because it checks who spawned with the bomb, and if they didn't have the bomb, they get killed...
Which is nonsense, because you get the id of the one who got spawned with the bomb, so he ALWAYS have the bomb...
You should think of something else
__________________
before you criticize someone, you should walk a mile in their shoes. that way, when you criticize them, you're a mile away and you have their shoes.
dutchmeat is offline
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 01-25-2007 , 12:56   Re: Drop C4 In Site=kill
Reply With Quote #7

oooo sorry.. my bad! but u can help me to do this plugin! If someone drop the C4 on Bombsite he will be slayd?!Btw thanks
Alka is offline
Dutchie
Junior Member
Join Date: Jan 2007
Location: Canada!!!
Old 01-25-2007 , 16:36   Re: Drop C4 In Site=kill
Reply With Quote #8

Eh, I modified alot of things... Jesus, you forgot the #include <cstrike> you didn't have enough spaces I fixed that, there was 4 spelling errors.. Don't tell me I didnt modify anything..
__________________

Dutchie is offline
Reply


Thread Tools
Display Modes

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