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
Author Message
yOou Know Me
BANNED
Join Date: Oct 2009
Old 07-26-2012 , 04:30   /me to be auto executed on dead or if you don't die at round end
Reply With Quote #1

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() 
}
yOou Know Me is offline
 


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 00:25.


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