AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Corpse classname (https://forums.alliedmods.net/showthread.php?t=156128)

xbatista 05-01-2011 10:59

Corpse classname
 
How to detect if a dead body is player's corpse, whats classname of it?
( I need to check it not by model )

pRoxxxDD 05-01-2011 11:02

Re: Corpse classname
 
from HLSDK
PHP Code:

string_t    istrClassname MAKE_STRING("bodyque"); 


Arkshine 05-01-2011 11:25

Re: Corpse classname
 
The corpse is not an entity spawned by the server. It's a temporary client-side entity triggered from ClCorpse message.

xbatista 05-01-2011 11:26

Re: Corpse classname
 
So, I can't detect it's classname "bodyque" ?

Arkshine 05-01-2011 11:27

Re: Corpse classname
 
CS != HL ; even if this entity exists in CS, it's not used. You can use it though.

xbatista 05-01-2011 11:30

Re: Corpse classname
 
For example:
PHP Code:

static entbody;
new 
Float:aim_distance get_user_aiming(cliententbody);

if ( 
aim_distance <= 50.0 )
if (
pev_valid(ent) ) blah blah blah
if ( corpse 

How to detect if it is player's Corpse?

EDIT: So can I detect by classname "bodyque" or not?:mrgreen:

hleV 05-01-2011 11:32

Re: Corpse classname
 
Try?

Arkshine 05-01-2011 11:33

Re: Corpse classname
 
When you can't aim the player, meaning no entity found.

pRoxxxDD 05-01-2011 11:42

Re: Corpse classname
 
mm, I did so, block ClCorpse Message, hook player death, making him invisible on his origin create an entity, put his model, death animations. Then I can do anything with a corpse.

P.S. Sorry my bad English.

xbatista 05-01-2011 11:52

Re: Corpse classname
 
Tried to detect by that classname, it's not working.
Btw I don't need antyhing only detect if entity is player's body


All times are GMT -4. The time now is 04:27.

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