| Code: |
function TargetEX(mobile, duration:=0, flags := TGTOPT_CHECK_LOS+TGTOPT_NEUTRAL)
if ( duration > 0 )
if ( CInt(TS_GetTimerDuration(mobile, "TargetControl")) > 0 )
// Existing timer... stop it (itll cancel the old target)
TS_LowerDuration(mobile, "TargetControl", -1);
endif
TS_StartTimer(mobile, "TargetControl", duration);
endif
return Target(mobile, flags);
if ( duration > 0 )
if ( CInt(TS_GetTimerDuration(mobile, "TargetControl")) > 0 )
TS_LowerDuration(mobile, "TargetControl", -1);
endif
endif
return 1;
endfunction |