Raised This Month: $ Target: $400
 0% 

Changing w_hegrenade model


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Sun Set
BANNED
Join Date: Apr 2009
Old 04-09-2009 , 12:16   Changing w_hegrenade model
Reply With Quote #1

I wanna change the model of the grenade when its thrown. I tried this but doesn't work

PHP Code:
public fw_SetModel(entity, const model[])
{


    static 
Float:dmgtime
    pev
(entitypev_dmgtimedmgtime)
    if (
dmgtime == 0.0)
        return;

    if (
equal(model[7], "w_he"4))
        
engfunc(EngFunc_SetModelentitymodel_waura_shield)

Sun Set is offline
xbatista
Veteran Member
Join Date: Mar 2008
Location: Lithuania
Old 04-09-2009 , 12:20   Re: Changing w_hegrenade model
Reply With Quote #2

PHP Code:
public fwd_setmodel(ent, const model[]) 
{
    if(!
pev_valid(ent) || !equal(model[9], "smokegrenade.mdl"))
        return 
FMRES_IGNORED
    
    
static classname[32]; pev(entpev_classnameclassname31)
    if(
equal(classname"grenade") )
    {
        
engfunc(EngFunc_SetModelentg_flare_model)
        
        return 
FMRES_SUPERCEDE
    
}
    return 
FMRES_IGNORED

xbatista is offline
Send a message via Skype™ to xbatista
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 04-09-2009 , 14:49   Re: Changing w_hegrenade model
Reply With Quote #3

PHP Code:
public fw_SetModeliEntityszModel[] ) {
    if( !
pev_validiEntity ) )
        return 
FMRES_IGNORED;
    
    if( 
equaliszModel"w_hegrenade.mdl" ) ) {
        new 
szClassname32 ];
        
peviEntitypev_classnameszClassname31 );
        
        if( 
equalszClassname"grenade" ) ) {
            
engfuncEngFunc_SetModeliEntitymodel_waura_shield );
            
            return 
FMRES_SUPERCED;
        }
    }
    
    return 
FMRES_IGNORED;

__________________
xPaw is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 04-09-2009 , 16:18   Re: Changing w_hegrenade model
Reply With Quote #4

Quote:
Originally Posted by xPaw View Post
PHP Code:
public fw_SetModeliEntityszModel[] ) {
    if( !
pev_validiEntity ) )
        return 
FMRES_IGNORED;
    
    if( 
equalszModel"models/w_hegrenade.mdl" ) ) {
        
engfuncEngFunc_SetModeliEntitymodel_waura_shield );
            
        return 
FMRES_SUPERCEDE;
    }
    
    return 
FMRES_IGNORED;

Fixed.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
naSTR
Veteran Member
Join Date: Dec 2011
Location: Asia, Mongolia
Old 02-06-2012 , 08:01   Re: Changing w_hegrenade model
Reply With Quote #5

Quote:
Originally Posted by ConnorMcLeod View Post
Fixed.
compile error
Code:
engfunc( EngFunc_SetModel, iEntity, model_waura_shield );
Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team

Error: Undefined symbol "model_waura_shield" on line 14
Error: Number of arguments does not match definition on line 14

2 Errors.
Could not locate output file C:\Documents and Settings\Administrator\My Documents\zp_hegrenade.amx (compile failed).

can u make it for zombie plague?
if zombie w_hegranade2.mdl
if human w_hegranade3.mdl or back to default model

Last edited by naSTR; 02-06-2012 at 08:19.
naSTR 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 02:22.


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