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

admin plugin !slap !slay...


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
jackdaniel
New Member
Join Date: Sep 2016
Old 09-26-2016 , 05:05   admin plugin !slap !slay...
Reply With Quote #1

Hello
I find in some servers that admin or vip can slap or slay or kick just using
this command in chat he type in chat like !slap player ..!slay player ... !votekick player
can you please gave me the plugin name
and thank you
jackdaniel is offline
ish12321
Veteran Member
Join Date: May 2016
Old 09-26-2016 , 06:58   Re: admin plugin !slap !slay...
Reply With Quote #2

Just you need to assign say !slap also to function of amx_slap

This would do it
ish12321 is offline
jackdaniel
New Member
Join Date: Sep 2016
Old 09-26-2016 , 07:44   Re: admin plugin !slap !slay...
Reply With Quote #3

Quote:
Originally Posted by ish12321 View Post
Just you need to assign say !slap also to function of amx_slap

This would do it
its not work need a plugin for that
jackdaniel is offline
Blizzard_87
Veteran Member
Join Date: Oct 2012
Old 09-26-2016 , 07:22   Re: admin plugin !slap !slay...
Reply With Quote #4

this plugin exist on this forum just need to search.
Blizzard_87 is offline
jackdaniel
New Member
Join Date: Sep 2016
Old 09-26-2016 , 07:46   Re: admin plugin !slap !slay...
Reply With Quote #5

Quote:
Originally Posted by Blizzard_87 View Post
this plugin exist on this forum just need to search.
I tried to search in forum but i didnt find anything in forum theres more than 30 000 plugin its so hard to find it
jackdaniel is offline
Sanjay Singh
Veteran Member
Join Date: Sep 2016
Old 09-26-2016 , 08:39   Re: admin plugin !slap !slay...
Reply With Quote #6

i have this plugin same as u want
Sanjay Singh is offline
Send a message via AIM to Sanjay Singh
Sanjay Singh
Veteran Member
Join Date: Sep 2016
Old 09-26-2016 , 08:43   Re: admin plugin !slap !slay...
Reply With Quote #7

PHP Code:
#include <amxmodx>

#define MAX_NAME_LENGTH 32
#define MAX_TEXT_LENGTH 192
#define MAX_PLAYERS 32

public admin_slash(id)
{
    new 
sName[MAX_NAME_LENGTH+1]
    new 
sArg[MAX_NAME_LENGTH+1]
    
    
read_argv(1,sArg,MAX_NAME_LENGTH)
    
    
// Check for '/' char
    
if ( sArg[0] == '/' ) {
        
        new 
sCommand[MAX_TEXT_LENGTH+1]
        new 
sMessage[MAX_TEXT_LENGTH+1]
        new 
sTemp[MAX_TEXT_LENGTH+1]
        
        
read_args(sMessage,MAX_TEXT_LENGTH)
        
remove_quotes(sMessage)
        
replace(sMessage,MAX_TEXT_LENGTH,"/","")
        
        if ( 
containi(sMessage,"@all") != -) {
            
            new 
iPlayers[MAX_PLAYERS], iNumPlayers
            get_players
(iPlayers,iNumPlayers)
            
            for (new 
0iNumPlayersi++) {
                
                
get_user_name(iPlayers[i],sName,MAX_NAME_LENGTH)
                
                
copy(sTemp,MAX_TEXT_LENGTH,sMessage)
                
replace(sTemp,MAX_TEXT_LENGTH,"@all","^"@name^"")
                
replace(sTemp,MAX_TEXT_LENGTH,"@name",sName)
                
format(sCommand,MAX_TEXT_LENGTH,"amx_%s",sTemp)
                
client_cmd(id,sCommand)
                
            }
            
copyc(sCommand,MAX_NAME_LENGTH,sTemp,' ')
            
client_print(id,print_chat,"[AMXX] Command ^"%s^" executed on all players",sCommand)
        }
        
        else if ( 
containi(sMessage,"@team:") != -) {
            
            new 
sTeam[MAX_NAME_LENGTH+1]
            new 
sRemove[MAX_TEXT_LENGTH+1]
            
            
copy(sTemp,MAX_TEXT_LENGTH,sMessage)
            
copyc(sRemove,MAX_TEXT_LENGTH,sTemp,'@')
            
replace(sTemp,MAX_TEXT_LENGTH,sRemove,"")
            
copyc(sTeam,MAX_TEXT_LENGTH,sTemp,' ')
            
            if ( 
containi(sTeam,"@team:") != -) {
                
                
replace(sMessage,MAX_TEXT_LENGTH,sTeam,"^"@name^"")
                
replace(sTeam,MAX_TEXT_LENGTH,"@team:","")
                
                if ( 
equal(sTeam,"T") ) {
                    
copy(sTeam,MAX_NAME_LENGTH,"TERRORIST")
                }
                else if ( 
equal(sTeam,"S") ) {
                    
copy(sTeam,MAX_NAME_LENGTH,"SPECTATOR")
                }
            }
            else {
                
client_print(id,print_chat,"[AMXX] Team identifier not recognized")
                return 
PLUGIN_HANDLED
            
}
            
            new 
iPlayers[MAX_PLAYERS], iNumPlayers
            get_players
(iPlayers,iNumPlayers,"e",sTeam)
            
            if ( 
iNumPlayers ) {
                
                for (new 
0iNumPlayersi++) {
                    
                    
get_user_name(iPlayers[i],sName,MAX_NAME_LENGTH)
                    
                    
copy(sTemp,MAX_TEXT_LENGTH,sMessage)
                    
replace(sTemp,MAX_TEXT_LENGTH,"@name",sName)
                    
format(sCommand,MAX_TEXT_LENGTH,"amx_%s",sTemp)
                    
client_cmd(id,sCommand)
                }
                
copyc(sCommand,MAX_NAME_LENGTH,sTemp,' ')
                
client_print(id,print_chat,"[AMXX] Command ^"%s^" executed on team ^"%s^"",sCommand,sTeam)
            }
            
            else     {
                
client_print(id,print_chat,"[AMXX] There are no players on team ^"%s^"",sTeam)
            }
        }
        
        else     {
            
format(sCommand,MAX_TEXT_LENGTH,"amx_%s",sMessage)
            
client_cmd(id,sCommand)
        }
        
        return 
PLUGIN_HANDLED
    
}
    return 
PLUGIN_CONTINUE
}

public 
plugin_init()
{
    
register_plugin("Admin Slash","1.2","mike_cao")
    
register_clcmd("say","admin_slash",0,"say /command < params >")
    return 
PLUGIN_CONTINUE

Sanjay Singh is offline
Send a message via AIM to Sanjay Singh
Sanjay Singh
Veteran Member
Join Date: Sep 2016
Old 09-26-2016 , 08:43   Re: admin plugin !slap !slay...
Reply With Quote #8

Just Replace / with ! thatsit
Sanjay Singh is offline
Send a message via AIM to Sanjay Singh
Old 09-26-2016, 08:47
Sanjay Singh
This message has been deleted by Sanjay Singh.
Relaxing
AlliedModders Donor
Join Date: Jun 2016
Location: White Plains
Old 09-26-2016 , 14:12   Re: admin plugin !slap !slay...
Reply With Quote #10

Try this ->

PHP Code:
#include < amxmodx >

#define PLUGIN "CFG"
#define VERSION "1.0"
#define AUTHOR "aNNakin"

new const g_Char[ ] = "!";

new 
g_Commands[ ][ ] =
{
    
"!kick",
    
"!slay",
    
"!ban",
    
"!banip"
};

new 
g_Accesses[ ] =
{
    
ADMIN_KICK,
    
ADMIN_SLAY,
    
ADMIN_BAN,
    
ADMIN_BAN
};

public 
plugin_init ( )
{
    
register_plugin PLUGINVERSIONAUTHOR );
    
register_clcmd "say""hook_say" );
}

public 
hook_say e_Index )
{
    static 
s_Args192 ], s_Command192 ];
    
read_args s_Argscharsmax s_Args ) );
    
    if ( ! 
s_Args] )
        return 
PLUGIN_CONTINUE;
    
remove_quotes s_Args] );
    
    for ( new 
isizeof g_Commandsi++ )
    {
        if ( 
equal s_Argsg_Commands], strlen g_Commands] ) ) )
        {
            if ( 
get_user_flags e_Index ) & g_Accesses] )
            {
                
replace s_Argscharsmax s_Args ), g_Char"" );
                
formatex s_Commandcharsmax s_Command ),"amx_%s"s_Args );
                
client_cmd e_Indexs_Command );
            }
            
            break;
        }
    }
    
    return 
PLUGIN_CONTINUE;

__________________
Relaxing is offline
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 19:07.


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