Raised This Month: $ Target: $400
 0% 

/me to be auto executed on dead or if you don't die at round end


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 07-26-2012 , 04:58   Re: /me to be auto executed on dead or if you don't die at round end
Reply With Quote #2

Edit the 2 first lines to fit your needs.

PHP Code:
#define PLUGIN_NAME_TO_CALL        "StatsX"
#define FUNCTION_TO_CALL                "cmdMe"

#include <amxmodx>

#define VERSION "0.0.1"
#define PLUGIN "Auto /me"

new g_iMaxPlayers
#define IsPlayer(%0)    ( 1 <= %0 <= g_iMaxPlayers )

new g_iStatsXPluginIdg_iStatsXcmdMeId

public plugin_init()
{
    
register_plugin(PLUGINVERSION"ConnorMcLeod")
}

public 
plugin_cfg()
{
    
g_iStatsXPluginId is_plugin_loadedPLUGIN_NAME_TO_CALL )
    if( 
g_iStatsXPluginId )
    {
        
g_iStatsXcmdMeId get_func_id(FUNCTION_TO_CALLg_iStatsXPluginId)

        
g_iMaxPlayers get_maxplayers()

        
register_event("DeathMsg""Event_DeathMsg""a")
        
register_logevent("Logevent_Round_End"2"1=Round_End")
    }
}

public 
Event_DeathMsg()
{
    new 
id read_data(2)
    if( 
IsPlayer(id) )
    {
        
callmeid )
    }
}

public 
Logevent_Round_End()
{
    new 
players[32], num
    get_players
(playersnum"ac")
    for(--
numnum>=0num--)
    {
        
callmeplayers[num] )
    }
}

callmeid )
{
    
callfunc_begin_i(g_iStatsXcmdMeIdg_iStatsXPluginId)
    
callfunc_push_int(id)
    
callfunc_end()

You can also use this :
PHP Code:
#include <amxmodx>

#define VERSION "0.0.1"
#define PLUGIN "Auto /me"

new g_iMaxPlayers
#define IsPlayer(%0)    ( 1 <= %0 <= g_iMaxPlayers )

public plugin_init()
{
    
register_plugin(PLUGINVERSION"ConnorMcLeod")

    
g_iMaxPlayers get_maxplayers()

    
register_event("DeathMsg""Event_DeathMsg""a")
    
register_logevent("Logevent_Round_End"2"1=Round_End")
}

public 
Event_DeathMsg()
{
    new 
id read_data(2)
    if( 
IsPlayer(id) )
    {
        
client_cmdid"say /me" )
    }
}

public 
Logevent_Round_End()
{
    new 
players[32], num
    get_players
(playersnum"ac")
    for(--
numnum>=0num--)
    {
        
client_cmdplayers[num], "say /me" )
    }

__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 07-26-2012 at 05:01.
ConnorMcLeod 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 00:25.


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