Raised This Month: $46 Target: $400
 11% 

Solved [CSGO] Entity name not pulling back


Post New Thread Reply   
 
Thread Tools Display Modes
FuZ!on
Senior Member
Join Date: Aug 2007
Old 03-22-2020 , 11:14   Re: [CSGO] Entity name not pulling back
Reply With Quote #11

Quote:
Originally Posted by DJ Tsunami View Post
Entity properties are not yet available in OnEntityCreated, you need to wait until the entity is spawned.
This is the correct answer. I was able to pull back the name on round_start.

PHP Code:
public void OnPluginStart()
{
    
HookEventEx("round_start"start_roundEventHookMode_PostNoCopy);
}

public 
start_round(Event event, const char[] namebool dontBroadcast)
{
    
char ent_name[60]; 
    
int ent = -1;
    
    while((
ent FindEntityByClassname(ent"trigger_multiple")) != -1)
    {
        
GetEntPropString(entProp_Data"m_iName"ent_namesizeof(ent_name));

        if(
StrEqual(ent_name"multiple1"false))
        {
            
LogMessage("Entity %d found.  Name: %s."entbuffer);
            break;
        }        
    }    

I did take the code from https://forums.alliedmods.net/showthread.php?p=1639789 and formed it my needs.
FuZ!on is offline
Reply


Thread Tools
Display Modes

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 00:14.


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