Hello can anyone make the command "/me" to be automatically executed when you die and if you don't die this round and you are alive to be executed at the round end, when the server says "Terrorist's/Ct's Win!" I have two plugins maybe they will be of some help. And i'm using Statsx_shell not the normal statsx plugin for CS if you can edit that too.
This plugin will execute "/me" at the end of the round:
Code:
#include <amxmodx>
#define CALLFUNC_SUCCESS 1
public plugin_init()
{
register_plugin("Auto /me on round end","1.0","<VeCo>")
register_logevent("LogEvent_RoundEnd",2,"1=Round_End")
}
public LogEvent_RoundEnd()
{
static i_players[32],i_num, i,id
get_players(i_players,i_num,"a")
for(i=0;i<i_num;i++)
{
id = i_players[i]
if(callfunc_begin("cmdMe","statsx.amxx") != CALLFUNC_SUCCESS)
{
set_fail_state("StatsX isn't loaded! Plugin paused.")
break
}
callfunc_push_int(id)
callfunc_end()
}
}
This plugin will execute the "/me" plugin at death:
Code:
#include <amxmodx>
#define CALLFUNC_SUCCESS 1
public plugin_init()
{
register_plugin("Auto /me on death","1.0","<VeCo>")
register_event("DeathMsg","Event_DeathMsg","a")
}
public Event_DeathMsg()
{
static id
id = read_data(2)
if(callfunc_begin("cmdMe","statsx.amxx") != CALLFUNC_SUCCESS)
{
set_fail_state("StatsX isn't loaded! Plugin paused.")
return
}
callfunc_push_int(id)
callfunc_end()
}