function zoneTrigger::onEnterTrigger(%this,%trigger,%obj) { if(%trigger.Active == 1) { if(%obj.getClassName() $= "Player") { if(%brick.isTeamed_1 && %obj.client.tdmteam == 1) { commandToClient(%obj.client,'ShowWBuyHUD'); %obj.CanWeaponBuy = 1; } if(%brick.isTeamed_2 && %obj.client.tdmteam == 2) { commandToClient(%obj.client,'ShowWBuyHUD'); %obj.CanWeaponBuy = 1; } if(%brick.isAll_1) { commandToClient(%obj.client,'ShowWBuyHUD'); %obj.CanWeaponBuy = 1; } } } }
Make so when the zone is created, that it does %zone.brick = %brick or something similar.Then do %trigger.brick in that code above.