AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Doesnt read... (https://forums.alliedmods.net/showthread.php?t=130156)

edgaras85 06-20-2010 19:34

Doesnt read...
 
PHP Code:

if (Killer == engfuncEngFunc_FindEntityByStringiEntity"classname""trigger_hurt" ))
        {
//my code


Why not reading?

wrecked_ 06-20-2010 19:36

Re: Doesnt read...
 
I'm pretty sure it counts as worldspawn when someone dies by trigger_hurt.

edgaras85 06-21-2010 05:03

Re: Doesnt read...
 
Quote:

Originally Posted by wrecked_ (Post 1214917)
I'm pretty sure it counts as worldspawn when someone dies by trigger_hurt.

i was made like this :
PHP Code:

if (Killer == find_ent_by_class"func_trigger_hurt")
{
//mycode


But it counts all entitys not only trigger hurt...

xPaw 06-21-2010 08:15

Re: Doesnt read...
 
roflcopteralert! Seriously, you really think that this code will work?

edgaras85 06-21-2010 08:35

Re: Doesnt read...
 
Quote:

Originally Posted by xPaw (Post 1215280)
roflcopteralert! Seriously, you really think that this code will work?

Whats wrong?
maybe you have some ideas?

Alka 06-21-2010 12:14

Re: Doesnt read...
 
@xPaw - New avatar :(

So, what you want to do ? -.-'

edgaras85 06-21-2010 12:20

Re: Doesnt read...
 
Quote:

Originally Posted by Alka (Post 1215446)
@xPaw - New avatar :(

So, what you want to do ? -.-'

Check if killer entity(trigger_hurt)

wrecked_ 06-21-2010 12:51

Re: Doesnt read...
 
Code:
public DeathMsg() {     new Killer = read_data( 1 )     new classname[32]     pev( Killer, pev_classname, classname, 31 )         if( equal( classname, "trigger_hurt" ) )     {         // Keep in mind, this may not be executed since it'll probably         // be worldspawn that's registered as the killer                 // ...     } }

mottzi 06-21-2010 12:57

Re: Doesnt read...
 
@wrecked_

can you explain me what

PHP Code:

equal 



is?

wrecked_ 06-21-2010 13:00

Re: Doesnt read...
 
http://www.amxmodx.org/funcwiki.php?...qual&go=search


All times are GMT -4. The time now is 14:57.

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