Raised This Month: $ Target: $400
 0% 

Adding show activity with Admin name , very simple


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ngEAr
Member
Join Date: Jun 2009
Old 01-24-2010 , 10:36   Adding show activity with Admin name , very simple
Reply With Quote #1

PHP Code:
#include <amxmisc>
#include <cstrike>
 
#define DECREASE_FRAG; // Comment if you don't want to decrease player's frags
 
#if defined DECREASE_FRAG
        #define KILL_FLAG 0
#else
        #define KILL_FLAG 1
#endif
 
new g_iMaxPlrs;
 
public 
plugin_init()
{
        
register_plugin("Slay Team""1.0""hleV");
 
        
register_concmd("amx_slayt""cmdSlayT"ADMIN_SLAY"- slays Ts");
        
register_concmd("amx_slayct""cmdSlayCT"ADMIN_SLAY"- slays CTs");
 
        
g_iMaxPlrs get_maxplayers();
}
 
public 
cmdSlayT(iCliLvliCmd)
{
        if (!
cmd_access(iCliLvliCmd1))
                return 
PLUGIN_HANDLED;
 
        for (new 
iCl 1iCl <= g_iMaxPlrsiCl++)
                if (
is_user_alive(iCl) && cs_get_user_team(iCl) == CS_TEAM_T)
                        
user_kill(iClKILL_FLAG);
 
        return 
PLUGIN_HANDLED;
}
 
public 
cmdSlayCT(iCliLvliCmd)
{
        if (!
cmd_access(iCliLvliCmd1))
                return 
PLUGIN_HANDLED;
 
        for (new 
iCl 1iCl <= g_iMaxPlrsiCl++)
                if (
is_user_alive(iCl) && cs_get_user_team(iCl) == CS_TEAM_CT)
                        
user_kill(iClKILL_FLAG);
 
        return 
PLUGIN_HANDLED;

This is the plugin of the one guy , how to add activity and where it should be added to show.

Admin nick:slay team CT/T
Better if someone can simply reply with edited code for both ct and t.
ngEAr is offline
Doc-Holiday
AlliedModders Donor
Join Date: Jul 2007
Old 01-24-2010 , 21:46   Re: Adding show activity with Admin name , very simple
Reply With Quote #2

Quote:
Originally Posted by ngEAr View Post
PHP Code:
#include <amxmisc>
#include <cstrike>
 
#define DECREASE_FRAG; // Comment if you don't want to decrease player's frags
 
#if defined DECREASE_FRAG
        #define KILL_FLAG 0
#else
        #define KILL_FLAG 1
#endif
 
new g_iMaxPlrs;
 
public 
plugin_init()
{
        
register_plugin("Slay Team""1.0""hleV");
 
        
register_concmd("amx_slayt""cmdSlayT"ADMIN_SLAY"- slays Ts");
        
register_concmd("amx_slayct""cmdSlayCT"ADMIN_SLAY"- slays CTs");
 
        
g_iMaxPlrs get_maxplayers();
}
 
public 
cmdSlayT(iCliLvliCmd)
{
        if (!
cmd_access(iCliLvliCmd1))
                return 
PLUGIN_HANDLED;
 
        for (new 
iCl 1iCl <= g_iMaxPlrsiCl++)
                if (
is_user_alive(iCl) && cs_get_user_team(iCl) == CS_TEAM_T)
                        
user_kill(iClKILL_FLAG);
 
        return 
PLUGIN_HANDLED;
}
 
public 
cmdSlayCT(iCliLvliCmd)
{
        if (!
cmd_access(iCliLvliCmd1))
                return 
PLUGIN_HANDLED;
 
        for (new 
iCl 1iCl <= g_iMaxPlrsiCl++)
                if (
is_user_alive(iCl) && cs_get_user_team(iCl) == CS_TEAM_CT)
                        
user_kill(iClKILL_FLAG);
 
        return 
PLUGIN_HANDLED;

This is the plugin of the one guy , how to add activity and where it should be added to show.

Admin nick:slay team CT/T
Better if someone can simply reply with edited code for both ct and t.

Here is one from xray cat with my xp plugin

PHP Code:
public cmd_take_expidlevel,cid 
{
    if( ! 
cmd_access idlevelcid) )
        return 
PLUGIN_HANDLED;
    
    new 
target[32], amount[21], reason[21];
    
    
read_argv1target31 );
    
read_argv2amount20 );
    
read_argv3reason20 );
    
    new 
player cmd_targetidtarget);
    
    if( ! 
player )
        return 
PLUGIN_HANDLED;
    
    new 
admin_name[32], player_name[32];
    
get_user_nameidadmin_name31 );
    
get_user_nameplayerplayer_name31 );
    
    new 
expnum str_to_numamount );
    
    
g_XP[player][XP][g_XP[player][Class]] -= expnum;
    
    switch(
get_cvar_num("amx_show_activity")){
        case 
1client_print0print_chat"ADMIN: took %i points from %s."expnumplayer_name );
        case 
2client_print0print_chat"ADMIN %s: took %i points from %s."admin_nameexpnumplayer_name );
    }    
    return 
PLUGIN_HANDLED;

Doc-Holiday 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 07:22.


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