I want to execute respawn only for different team can someone help me?
For example : if toucheR team tero touch toucheD team tero get a toucheR respawn
This code respawn all touchers
Code:
#include < amxmodx >
#include < engine >
#include <hamsandwich>
new gOldTouch[33][33]
new 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(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
}
return PLUGIN_CONTINUE
}