Raised This Month: $32 Target: $400
 8% 

[L4D1] HELP: How to get an helicopter's entity?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
axelnieves2012
Senior Member
Join Date: Oct 2014
Location: Argentina
Old 01-16-2019 , 03:41   [L4D1] HELP: How to get an helicopter's entity?
Reply With Quote #1

Hello, Im trying to find No Mercy's escape helicopter to replace it by a flying car,

but I don't know it's entity model nor classname.

I have tried something like this:

PHP Code:
public OnMapStart()
{
    
PrecacheModel("models/prop_vehicles/car_white.mdl"true);
}
public 
OnEntityCreated(entity, const String:classname[]) 
{
    
PrintToChatAll"*********found: %s"classname );
    
SDKHook(entitySDKHook_Spawntest);
}

public 
Action:test(entityclassname)
{
    
decl String:modelname[255];
    if (
entity != -1)
    {
        
GetEntPropString(entityProp_Data"m_ModelName"modelnamesizeof(modelname));
        
PrintToChatAll("modelname: %s"modelname);
        if  ( 
StrContains(modelname"heli")>=)
        {
            
DispatchKeyValue(entity"m_ModelName""models/prop_vehicles/car_white.mdl");
            
DispatchSpawn(entity);
            
PrintToChatAll("***********HELICOPTERO CAMBIADO");
            return  
Plugin_Changed;
        }
        
        
GetEntPropString(entityProp_Data"model"modelnamesizeof(modelname));
        if  ( 
StrContains(modelname"heli")>=)
        {
            
DispatchKeyValue(entity"model""models/prop_vehicles/car_white.mdl");
            
DispatchSpawn(entity);
            
PrintToChatAll("***********HELICOPTERO CAMBIADO");
            return  
Plugin_Changed;
        }
    }
    return  
Plugin_Continue;

But I cannot found that helicopter!.
I have joined a Brazilian server that replaces that helicopter by a flying car buy they have not posted their plugin, so I want to remake it.

Any help please?

Last edited by axelnieves2012; 01-16-2019 at 03:42.
axelnieves2012 is offline
midnight9
Senior Member
Join Date: Nov 2012
Old 01-16-2019 , 10:24   Re: [L4D1] HELP: How to get an helicopter's entity?
Reply With Quote #2

Not sure if thats what you looking for models/hybridphysx/news_helicoptor_map1_intro_v1.mdl.
midnight9 is offline
axelnieves2012
Senior Member
Join Date: Oct 2014
Location: Argentina
Old 01-16-2019 , 23:34   Re: [L4D1] HELP: How to get an helicopter's entity?
Reply With Quote #3

Quote:
Originally Posted by midnight9 View Post
Not sure if thats what you looking for models/hybridphysx/news_helicoptor_map1_intro_v1.mdl.
It seems the entity I am looking for is "prop_dynamic" and it has its model set in some property I don't know.
"model" is empty.
"m_iModelName" is empty.

I am confused.
axelnieves2012 is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 01-17-2019 , 00:16   Re: [L4D1] HELP: How to get an helicopter's entity?
Reply With Quote #4

Isn't it the m_ModelName datamap (with no i in it)?
__________________
Not currently working on SourceMod plugin development.
Powerlord 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 12:36.


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