how to trigger an entity which has defined targetname ?
how to trigger an entity which has the targetname which defined ?
(or if anyone knows any other way without using amxx , please tell me) Like in de_maps ,when the bomb exploded ,it triggers the entity (without any plugin needed ) Code:
{For example i want to add command to this plugin that when vip escapes , the entity name "targeta" will be triggered Code:
#include <amxmodx> |
Re: how to trigger an entity which has defined targetname ?
register_event("BombExplode", "bombGoBoom")
register_event("HostageRescue", "freeTheSlaves") //that isn't racist, is it? register_event("CT_win", "danceCTdance") etc. i think.....not sure the exact events CSX module also has a function called bomb_explode which is called when the bomb goes off. P.S. I love the code. Anything to make a programming professor weep is good for me. especially the abundant use of #if |
Re: how to trigger an entity which has defined targetname ?
thank you
i only need the command that trigger the defined entity which has defined targetname ,to add to the plugin at the #1 post ,sothat when vip escape , it trigger the entity I 've already made the entity , all i need is a command that call the trigger function |
Re: how to trigger an entity which has defined targetname ?
use a register_event handle.
whichever world event is triggered when a VIP escapes. Watch your HLSW console log when people are playing an as_ map. it'll give you all the world events that get triggered when it happens. |
Re: how to trigger an entity which has defined targetname ?
thank you ,
but the vip escaped event has been made in the plugin all i want is a command that trigger a entity,sothat i can add into the plugin in detail, i want the code that triggers (break) all func_breakable which has the "targetname" field is "bombtargeta" in the map,such as { "model" "*36" "targetname" "bombtargeta" "rendermode" "4" "spawnflags" "1" "renderamt" "255" "rendercolor" "0 0 0" "classname" "func_breakable" } { "model" "*37" "targetname" "bombtargeta" "rendermode" "4" "spawnflags" "1" "renderamt" "255" "rendercolor" "0 0 0" "classname" "func_breakable" } i use this code Code:
public event_vip_safety(id) {Code:
#include <amxmodx>It works but there is a bug Code:
[AMXX] Displaying debug trace (plugin "vipvr200t.amxx")thanks |
Re: how to trigger an entity which has defined targetname ?
PHP Code:
It should be = -1, also don't return anything ever in a loop. |
Re: how to trigger an entity which has defined targetname ?
Quote:
i tried changing new ent2 = -1 but that bugs still happens (stack error) if i dont return PLUGIN_HANDLED in while "loop", it will cause overflow error and crash the game |
| All times are GMT -4. The time now is 00:23. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.