Raised This Month: $ Target: $400
 0% 

player touch player with register_touch


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
nea
Junior Member
Join Date: Jan 2017
Old 03-14-2017 , 12:20   Re: player touch player with register_touch
Reply With Quote #1

what about this idea?
u can get 1 touch every 0.5 second between two player
PHP Code:
#include < amxmodx > 
#include < engine >
new gOldTouch[33][33]
new 
Float:gDiff 0.5 // Difference Between two Touches
public plugin_init( ) 

    
register_plugin"One Touch""1.0.0""Nea" ); 
    
register_touch("player","player","fn_PlayerTouchPlayer");

public 
fn_PlayerTouchPlayer(id_er,id_ed)
{
    if(
get_systime() - gOldTouch[id_er][id_ed] > gDiff || (get_systime() - gOldTouch[id_ed][id_er] > gDiff))
    {
        
gOldTouch[id_er][id_ed] = get_systime()
        
gOldTouch[id_ed][id_er] = get_systime()
        
        
// Here is Ur Code
        
return PLUGIN_CONTINUE
    
}
    return 
PLUGIN_CONTINUE


Last edited by nea; 03-14-2017 at 12:27.
nea is offline
Reply



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 17:54.


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