Post in requests section
Code:
#include <amxmodx>
#include <engine>
#include <hamsandwich>
#include <cstrike>
new gOldTouch[33][33]
new const Float:gDiff = 0.1
public plugin_init( )
{
register_plugin( "touch team", "1.0", "code" );
register_touch("player","player","fn_PlayerTouchPlayer");
}
public fn_PlayerTouchPlayer(ToucheR_id,ToucheD_id)
{
if(cs_get_user_team(ToucheR_id) != cs_get_user_team(ToucheD_id))
return PLUGIN_CONTINUE;
if(get_systime() - gOldTouch[ToucheR_id][ToucheD_id] > gDiff || (get_systime() - gOldTouch[ToucheD_id][ToucheR_id] > gDiff))
{
gOldTouch[ToucheR_id][ToucheD_id] = get_systime()
gOldTouch[ToucheD_id][ToucheR_id] = get_systime()
ExecuteHamB(Ham_CS_RoundRespawn, ToucheR_id)
}
return PLUGIN_CONTINUE
}