Quote:
Originally Posted by Craxor
like that:
|
thanks my man, it works
PHP Code:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <cstrike>
#include <hamsandwich>
#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"
new g_Time[33];
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
RegisterHam(Ham_Touch, "player", "PlayerTouch");
// Add your code here...
}
public PlayerTouch(id, player) {
if( is_user_alive( id ) && is_user_alive( player ) && cs_get_user_team( id ) ==CS_TEAM_T && cs_get_user_team( player ) == CS_TEAM_CT ) { //you are CT and touch T
new iCurrentTime = floatround( get_gametime() );
if( iCurrentTime >= g_Time[player] )
{
new touch_target[32]
get_user_name(id, touch_target, 31);
client_print(player, print_chat, "touching: %s [t]", touch_target);
g_Time[player] = iCurrentTime + 10;
} else {
return PLUGIN_HANDLED;
}
}
return PLUGIN_HANDLED;
}