Raised This Month: $ Target: $400
 0% 

HE Models in-air


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 08-17-2012 , 23:22   HE Models in-air
Reply With Quote #1

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

__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 08-18-2012 , 00:13   Re: HE Models in-air
Reply With Quote #2

Hook SetModel as post and set model there.
__________________
Arkshine is offline
MokeN
Senior Member
Join Date: Jan 2012
Location: Vaasa, Finland
Old 08-18-2012 , 05:53   Re: HE Models in-air
Reply With Quote #3

Quote:
Originally Posted by Napoleon_be View Post
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.
__________________
Private Works:
- Achievements, HNS & JB Menus, HNS & JB Shops

mY BlockMaker - mY Steam - mY Game Menu
MokeN is offline
Send a message via Skype™ to MokeN
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 08-18-2012 , 06:03   Re: HE Models in-air
Reply With Quote #4

Quote:
CurWeapon to set the p_ and v_ models.
Use Ham_Item_Deploy instead.
__________________
Arkshine is offline
retoxx
Junior Member
Join Date: Jul 2012
Old 08-18-2012 , 08:23   Re: HE Models in-air
Reply With Quote #5

Quote:
Originally Posted by Arkshine View Post
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.
retoxx is offline
nikhilgupta345
Veteran Member
Join Date: Aug 2009
Location: Virginia
Old 08-18-2012 , 14:13   Re: HE Models in-air
Reply With Quote #6

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" ) )
     }

__________________
Quote:
Originally Posted by DarkGod View Post
nikhilgupta generates his plugins using sheer awesome.
If you like my work, please

Last edited by nikhilgupta345; 08-18-2012 at 14:15.
nikhilgupta345 is offline
Send a message via ICQ to nikhilgupta345 Send a message via Yahoo to nikhilgupta345
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 05:41.


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