Raised This Month: $51 Target: $400
 12% 

Ham_Touch spam issue


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
heroicpower7613
Member
Join Date: Nov 2016
Old 01-06-2017 , 14:20   Ham_Touch spam issue
Reply With Quote #1

im new to scripting
i have a simple code that prints a message when you're touching player.
problem is its spamming the message like crazy when touching.
how can i get it to print only one message and not lag the server?

code:
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"

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 ) { //if you are CT and touch T
        
        
new touch_target[32]
        
get_user_name(idtouch_target31);
        
client_printplayerprint_chat"touching: %s [terrorist]"touch_target );
    }
    return 
PLUGIN_CONTINUE;

heroicpower7613 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 08:23.


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