AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   How to create a (custom) target? (https://forums.alliedmods.net/showthread.php?t=99203)

ALIENMODSX 08-02-2009 15:58

How to create a (custom) target?
 
I was wondering how I can create a (custom) target to an entity by targetname?


Example:

Targetname is "button".
There is not target, but I want "door" to be the target.


+Karma for helpers, ofc.

Firippu 08-02-2009 16:13

Re: How to create a (custom) target?
 
Requires Fakemeta

PHP Code:

public whatever()
{
    new 
ent

    
while((ent engfunc(EngFunc_FindEntityByStringent,"targetname","button")) != 0)
        
set_pev(ent,pev_target,"door")



ALIENMODSX 08-02-2009 16:26

Re: How to create a (custom) target?
 
Thanks. I will test. +Karma


All times are GMT -4. The time now is 18:25.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.