AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   engine >> fakemeta (https://forums.alliedmods.net/showthread.php?t=108178)

Empowers 11-02-2009 12:00

engine >> fakemeta
 
PHP Code:

    new TARGET create_entity "trigger_hurt" )
    
DispatchKeyValue TARGET "classname" "trigger_hurt" )
    
DispatchKeyValue TARGET "dmg" "19999" )
    
DispatchKeyValue TARGET "damagetype" "0" )
    
DispatchKeyValue TARGET "origin" "8192 8192 8192" )
    
DispatchSpawn TARGET )
    
entity_set_stringTARGET EV_SZ_classname "trigger_hurt" )

    return 
TARGET 

help me to convert this to fakemeta.

+ karma to helper

Exolent[jNr] 11-02-2009 12:03

Re: engine >> fakemeta
 
There is no need to.

Arkshine 11-02-2009 12:06

Re: engine >> fakemeta
 
It will be more efficient and less code to use engine version. It's fine as it is, Empowers.

ConnorMcLeod 11-02-2009 14:40

Re: engine >> fakemeta
 
Also, you can remove lines 2 and 7, classname won't change by miracle.

Empowers 11-02-2009 15:15

Re: engine >> fakemeta
 
i just have no engine module on my server. all 30 plugins run with out it. And I don't wanna to turn it on only because of some few functions.

hleV 11-02-2009 16:38

Re: engine >> fakemeta
 
It won't affect server's performance. Anyway I'd kinda suggest converting some more serious plugins into engine for better performance.

Firippu 11-02-2009 17:31

Re: engine >> fakemeta
 
hope this helps

PHP Code:

#include <fakemeta_util>

    
new TARGET fm_create_entity("trigger_hurt")
    
engfunc(EngFunc_SetOrigin,TARGET,Float:{8192.0,8192.0,8192.0})
    
set_pev(TARGET,pev_dmg,19999.0)
    
dllfunc(DLLFunc_Spawn,TARGET



All times are GMT -4. The time now is 17:42.

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