View Single Post
Root_
Veteran Member
Join Date: Jan 2012
Location: ryssland
Old 01-13-2014 , 06:20   Re: Create "Dueling Box"
Reply With Quote #9

Or this
Set 'no shoot' punishment and edit it within OnTouch callback, set booleans for both players that 'InZone[activator] = true' and set InZone[activator] = false appropriately when players enters/leaves zone and check those booleans in TraceAttack/OnTakeDamage like this
Code:
public OnClientPutInServer(client) {     SDKHook(client, SDKHook_TraceAttack, TraceAttack);     SDKHook(client, SDKHook_OnTakeDamage, TakeDamage); } public Action:TraceAttack(victim, &attacker, &inflictor, &Float:damage, &damagetype, &ammotype, hitbox, hitgroup) {     return (InZone[attacker] && InZone[victim]) ? Plugin_Continue : Plugin_Handled; } public Action:TakeDamage(victim, &attacker, &inflictor, &Float:damage, &damagetype) {     return (InZone[attacker] && InZone[victim]) ? Plugin_Continue : Plugin_Handled; }
__________________


dodsplugins.com - Plugins and Resources for Day of Defeat
http://twitch.tv/zadroot
Root_ is offline