Raised This Month: $ Target: $400
 0% 

Getting light entities in a map


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
MousePad
Junior Member
Join Date: Apr 2012
Old 04-24-2013 , 23:53   Re: Getting light entities in a map
Reply With Quote #1

Thank you so much! The reason I wanted to keep them was to set flickering lights to normal. The map that I'm testing has lights set their appearance to "Flicker B", which corresponds to value 6 for m_iStyle

http://wiki.amxmodx.org/CLight_%28CS%29

From that link I actually verified that I can read that style using get_pdata_int(iEnt, 33) and I do read 6 for the ones that flicker. In your spawn hook function I added a set_pdata_int line and when I do that I do read 0 for the m_iStyle value; however the lights still flicker.

PHP Code:
public Forward_SpawniEnt )
{
        static 
szName32 ];
        
peviEntpev_targetnameszNamecharsmaxszName ) );
        if( !
strlenszName ) )
        {
                
set_pdata_int(iEnt330)
                
DispatchKeyValueiEnt"targetname""some_targetname" );
        }

Is DispatchKeyValue the only way to modify an entity before spawn? As far as I researched, the DispatchKeyValue function only accepts strings for key-value pairs. And unfortunately I couldn't find a pev_* variable for m_iStyle. Any ideas?
Thanks a lot again!
MousePad 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 10:48.


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