AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   HE Models in-air (https://forums.alliedmods.net/showthread.php?t=193279)

Napoleon_be 08-17-2012 23:22

HE Models in-air
 
I'm trying to set the dodgeball model when i'm throwing a grenade, but the thing is that i can see the model while having the dodgeball, but from when on i throw it, it just lays on the ground and does nothing being a HE grenade model

PHP Code:

public think_grenade(ent

{
    
    new 
model[32];
    
    
entity_get_string(entEV_SZ_modelmodel31)
    
    
    
    if(
equali(model,"models/w_dodgeball.mdl")) 
        
    {
        
        return 
PLUGIN_CONTINUE
        
    
}
    
    
// stop grenade from blowing up
    
    
return PLUGIN_HANDLED



Arkshine 08-18-2012 00:13

Re: HE Models in-air
 
Hook SetModel as post and set model there.

MokeN 08-18-2012 05:53

Re: HE Models in-air
 
Quote:

Originally Posted by Napoleon_be (Post 1774793)
I'm trying to set the dodgeball model when i'm throwing a grenade, but the thing is that i can see the model while having the dodgeball, but from when on i throw it, it just lays on the ground and does nothing being a HE grenade model

PHP Code:

public think_grenade(ent

{
    
    new 
model[32];
    
    
entity_get_string(entEV_SZ_modelmodel31)
    
    
    
    if(
equali(model,"models/w_dodgeball.mdl")) 
        
    {
        
        return 
PLUGIN_CONTINUE
        
    
}
    
    
// stop grenade from blowing up
    
    
return PLUGIN_HANDLED



I used SetModel to set the worldmodel and CurWeapon to set the p_ and v_ models.

Works great.

Arkshine 08-18-2012 06:03

Re: HE Models in-air
 
Quote:

CurWeapon to set the p_ and v_ models.
Use Ham_Item_Deploy instead.

retoxx 08-18-2012 08:23

Re: HE Models in-air
 
Quote:

Originally Posted by Arkshine (Post 1774818)
Hook SetModel as post and set model there.

I am also in need of the code but I don't know how to do that you are saying.

nikhilgupta345 08-18-2012 14:13

Re: HE Models in-air
 
PHP Code:

register_forwardFM_SetModel"Forward_SetModel_Post"

and then

PHP Code:

public Forward_SetModel_PostiEntszModel[] )
{
     if( 
equaliszModel"models/w_hegrenade.mdl" ) ) // I think that's the name
     
{
          
set_peviEntpev_model"models/w_dodgeball.mdl" ) )
     }




All times are GMT -4. The time now is 05:41.

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