Raised This Month: $51 Target: $400
 12% 

amx_bury


Post New Thread Reply   
 
Thread Tools Display Modes
ThomasNguyen
Senior Member
Join Date: May 2006
Old 08-03-2006 , 12:47   Re: amx_bury
Reply With Quote #11

Quote:
Originally Posted by SweatyBanana
More like this:

PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <fun>
#define PLUGIN "Bury"
#define VERSION "1.0"
#define AUTHOR "[-=DaW=-]"

public plugin_init()
{
    
register_plugin(PLUGIN,VERSION,AUTHOR)
    
register_concmd("amx_bury","admin_bury",ADMIN_LEVEL_B,"<authid, nick, @team or #userid>")
    
register_concmd("amx_unbury","admin_unbury",ADMIN_LEVEL_B,"<authid, nick, @team or #userid>")
}
//=======================================================================================================

bury_player(id,victim)
{
    new 
name[32], iwpns[32], nwpn[32], iwpn
    get_user_name
(victim,name,31)
    
get_user_weapons(victim,iwpns,iwpn)
    for(new 
a=0;a<iwpn;++a)
    {
        
get_weaponname(iwpns[a],nwpn,31)
        
engclient_cmd(victim,"drop",nwpn)
    }
    
engclient_cmd(victim,"weapon_knife")
    new 
origin[3]
    
get_user_origin(victimorigin)
    
origin[2] -= 30
    set_user_origin
(victimorigin)
    
console_print(id,"[AMXX] Client ^"%s^" has been burried",name)
}


public 
admin_bury(id,level,cid)
{
    if (!
cmd_access(id,level,cid,2))
        return 
PLUGIN_HANDLED
    
new arg[32], admin_name[32], player_name[32]
    
read_argv(1,arg,31)
    
get_user_name(id,admin_name,31)
    if (
arg[0]=='@')
    {
        new 
players[32], inum
        get_players
(players,inum,"ae",arg[1])
        if (
inum==0)
        {
            
console_print(id,"[AMXX] No clients in such team")
            return    
PLUGIN_HANDLED
        
}
        for(new 
a=0;a<inum;++a)
        {
            if (
get_user_flags(players[a])&ADMIN_IMMUNITY)
            {
                
get_user_name(players[a],player_name,31)
                
console_print(id,"[AMXX] Skipping ^"%s^" because client has immunity",player_name)
                continue
            }
            
bury_player(id,players[a])
        }
        switch(
get_cvar_num("amx_show_activity"))
        {
            case 
2:    client_print(0,print_chat,"[AMXX] ADMIN %s: has buried    all %s",admin_name,arg[1])
            case 
1:    client_print(0,print_chat,"[AMXX] ADMIN: has buried all %s",arg[1])
        }
        
log_amx("ADMIN BURY - this command was issued by %s. Admin buried all of the %s",admin_name,arg[1])
    }
    else
    {
        new 
player cmd_target(id,arg,7)
        if (!
player) return PLUGIN_HANDLED
        bury_player
(id,player)
        
get_user_name(player,player_name,31)
        switch(
get_cvar_num("amx_show_activity"))
        {
            case 
2:    client_print(0,print_chat,"[AMXX] ADMIN %s: has buried    %s",admin_name,player_name)
            case 
1:    client_print(0,print_chat,"[AMXX] ADMIN: has buried %s",player_name)
        }
        
log_amx("ADMIN BURY - this command was issued by %s. Admin has buried %s",admin_name,player_name)
    }
    return 
PLUGIN_HANDLED
}

unbury_player(id,victim)
{
    new 
name[32], origin[3]
    
get_user_name(victim,name,31)
    
get_user_origin(victimorigin)
    
origin[2] += 35
    set_user_origin
(victimorigin)
    
console_print(id,"[AMXX] Client ^"%s^" has been unburried",name)
}

public 
admin_unbury(id,level,cid)
{
    if (!
cmd_access(id,level,cid,2))
        return 
PLUGIN_HANDLED
    
new arg[32], player_name[32], name2[32]
    
read_argv(1,arg,31)
    
get_user_name(id,name2,31)
    if (
arg[0]=='@')
    {
        new 
players[32], inum name[32]
        
get_players(players,inum,"ae",arg[1])
        if (
inum==0)
        {
            
console_print(id,"[AMXX] No clients in such team")
            return    
PLUGIN_HANDLED
        
}
        for(new    
a=0;a<inum;++a)
        {
            if (
get_user_flags(players[a])&ADMIN_IMMUNITY)
            {
                
get_user_name(players[a],name,31)
                
console_print(id,"[AMXX] Skipping ^"%s^" because client has immunity",name)
                continue
            }
            
unbury_player(id,players[a])
        }
        switch(
get_cvar_num("amx_show_activity"))
        {
            case 
2:    client_print(0,print_chat,"[AMXX] ADMIN %s: has unburied all %s",name2,arg[1])
            case 
1:    client_print(0,print_chat,"[AMXX] ADMIN: has unburied all %s",arg[1])
        }
        
log_amx("ADMIN BURY - this command was issued by %s. Admin has buried %s",name2,arg[1])
    }
    else
    {
        new 
player cmd_target(id,arg,7)
        if (!
player) return PLUGIN_HANDLED
        unbury_player
(id,player)
        
get_user_name(player,player_name,31)
        switch(
get_cvar_num("amx_show_activity"))
        {
            case 
2:    client_print(0,print_chat,"[AMXX] ADMIN %s: has unburied %s",name2,player_name)
            case 
1:    client_print(0,print_chat,"[AMXX] ADMIN: has unburied %s",player_name)
        }
        
log_amx("ADMIN UNBURY - this command was issued by %s. Admin has unburied %s",name2,player_name)
    }
    return 
PLUGIN_HANDLED

but would mine work? it compiled right and ive seen it in other plugins. ?
__________________
ThomasNguyen is offline
-=[DaW]=-
Senior Member
Join Date: Jun 2006
Location: Canada
Old 08-03-2006 , 13:01   Re: amx_bury
Reply With Quote #12

Sweaty banana yours didnt complie. Thomas did complie with no errorrs

I think it was because of the space
__________________
-=[DaW]=- is offline
Send a message via MSN to -=[DaW]=-
Guenhwyvar
AMX Mod X Beta Tester
Join Date: Jul 2005
Location: Berlin / Germany
Old 08-03-2006 , 13:03   Re: amx_bury
Reply With Quote #13

Nice . Can I use it with "#%userid%" in the "configs/clcmds.ini"?
Guenhwyvar is offline
-=[DaW]=-
Senior Member
Join Date: Jun 2006
Location: Canada
Old 08-03-2006 , 13:13   Re: amx_bury
Reply With Quote #14

Yes man do what ever you want with it.But if you change the code or something please give my name.
__________________
-=[DaW]=- is offline
Send a message via MSN to -=[DaW]=-
Lord_Destros
Veteran Member
Join Date: Jul 2004
Location: With stupid.
Old 08-03-2006 , 14:35   Re: amx_bury
Reply With Quote #15

Quote:
Originally Posted by ThomasNguyen
but would mine work? it compiled right and ive seen it in other plugins. ?

Code:
#define PLUGIN "Bury" 
#define VERSION "1.0" 
#define AUTHOR "[-=DaW=-]"
yes, it would work, but he already had them in defines (as shown above) so he figured he might as well use that method (unless he wanted to delete the above).
__________________
Quote:
Originally Posted by Twilight Suzuka
Don't worry m'lord. The turtles day will come.
Lord_Destros is offline
Send a message via AIM to Lord_Destros
ThomasNguyen
Senior Member
Join Date: May 2006
Old 08-03-2006 , 15:28   Re: amx_bury
Reply With Quote #16

oh ok, thats what i figured.
__________________
ThomasNguyen is offline
-=[DaW]=-
Senior Member
Join Date: Jun 2006
Location: Canada
Old 08-03-2006 , 19:23   Re: amx_bury
Reply With Quote #17

Is this going to get approved or unapproved?

If unapproved back to the scripting board again
-=[DaW]=- is offline
Send a message via MSN to -=[DaW]=-
ThomasNguyen
Senior Member
Join Date: May 2006
Old 08-03-2006 , 21:14   Re: amx_bury
Reply With Quote #18

hmm, im not going to be mean or anything but i think this might go to unapproved. ive seen many amx bury's before and i think there are still some on the forums? a suggestion is something never made before and new that you thought of. good luck.
__________________
ThomasNguyen is offline
GHW_Chronic
SourceMod Donor
Join Date: Sep 2004
Location: Texas
Old 08-08-2006 , 22:25   Re: amx_bury
Reply With Quote #19

http://forums.alliedmods.net/showthread.php?p=177261

Redundant/not unique enough. Moved to unnapproved.
GHW_Chronic is offline
Send a message via AIM to GHW_Chronic
Reply



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 11:48.


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