View Single Post
heroicpower7613
Member
Join Date: Nov 2016
Old 01-06-2017 , 17:21   Re: Ham_Touch spam issue
Reply With Quote #6

Quote:
Originally Posted by Craxor View Post
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(PLUGINVERSIONAUTHOR)
    
RegisterHam(Ham_Touch"player""PlayerTouch");
    
// Add your code here...
}

public 
PlayerTouch(idplayer) {
    
    if( 
is_user_aliveid ) && is_user_aliveplayer ) && cs_get_user_teamid ) ==CS_TEAM_T && cs_get_user_teamplayer ) == CS_TEAM_CT ) { //you are CT and touch T
        
        
new iCurrentTime floatroundget_gametime() );
        if( 
iCurrentTime >= g_Time[player] ) 
        {
        
            new 
touch_target[32]
            
get_user_name(idtouch_target31);
            
client_print(playerprint_chat"touching: %s [t]"touch_target);
            
g_Time[player] = iCurrentTime 10;

        } else {

            return 
PLUGIN_HANDLED;
        }
        
    }
    return 
PLUGIN_HANDLED;


Last edited by heroicpower7613; 04-18-2017 at 06:59.
heroicpower7613 is offline