Raised This Month: $ Target: $400
 0% 

Set Entity Flags?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Samantha
SourceMod Donor
Join Date: Feb 2010
Location: Madagascar
Old 04-16-2010 , 15:32   Set Entity Flags?
Reply With Quote #1

How can i set an entities flags?
Samantha is offline
psychonic

BAFFLED
Join Date: May 2008
Old 04-16-2010 , 15:50   Re: Set Entity Flags?
Reply With Quote #2

PHP Code:
SetEntProp(clientProp_Data"m_fFlags"flags); 
psychonic is offline
Samantha
SourceMod Donor
Join Date: Feb 2010
Location: Madagascar
Old 04-16-2010 , 17:43   Re: Set Entity Flags?
Reply With Quote #3

512 : Fade Corpse --- not really working lol, this is for a zombie btw.

i put this SetEntProp(client, Prop_Data, "m_fFlags", 512);

And plus can u check this code for hooking a output on the zombie? its not working for somereason.

Code:
public OnNpcDeath(const String:output[], caller, activator, Float:delay)
{
  //Code
}

public OnMapStart()
{
    HookEntityOutput( "npc_zombie", "ondeath", OnNpcDeath);
}
btw thank you for your help
Samantha is offline
FaTony
Veteran Member
Join Date: Aug 2008
Old 04-16-2010 , 21:44   Re: Set Entity Flags?
Reply With Quote #4

It's "OnDeath". Yes, outputs are case sensitive. It took me two days to find that I was using "OnPickup" and game was firing "OnPickUp"...
FaTony is offline
Samantha
SourceMod Donor
Join Date: Feb 2010
Location: Madagascar
Old 04-16-2010 , 21:52   Re: Set Entity Flags?
Reply With Quote #5

wow thank you very much lol, this has been bugging me alot lol. Do you have any idea how i can set the flag? Ive tried the way mentioned above, tried dispatching it but i have failed. Any idea? Is 512 supposed to be converted to something?

Last edited by Samantha; 04-16-2010 at 22:36.
Samantha is offline
API
Veteran Member
Join Date: May 2006
Old 04-17-2010 , 00:37   Re: Set Entity Flags?
Reply With Quote #6

SetEntProp(client, Prop_Data, "m_fFlags", GetEntProp(client, Prop_Data, "m_fFlags") | 0xFF);

Try that.
__________________
API is offline
Send a message via AIM to API
Samantha
SourceMod Donor
Join Date: Feb 2010
Location: Madagascar
Old 04-17-2010 , 09:45   Re: Set Entity Flags?
Reply With Quote #7

I tried that and for some reason it didnt work arhh, lol Thanks though. That is supposed to fade the zombie on death so i though of another idea of dissolving it after death.

Code:
GetEntPropEnt(client, Prop_Send, "m_hRagdoll");
This didnt work saying the enitity id, about 1500ish is to large. Any ideas?
Samantha is offline
blodia
Veteran Member
Join Date: Sep 2009
Location: UK
Old 04-17-2010 , 19:39   Re: Set Entity Flags?
Reply With Quote #8

i think you want spawn flags which you set when you create the entity.

DispatchKeyValue(entindex, "spawnflags", "512");
blodia is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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