Raised This Month: $51 Target: $400
 12% 

Changing w_ models [Help]


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
pro_on_0
Member
Join Date: Nov 2008
Old 12-31-2009 , 06:04   Changing w_ models [Help]
Reply With Quote #1

I want to change the w_ model when there is a admin dropping a weapon,

and

don't change the w_ model when there isn't a admin dropping a weapon...

I very sorry about my poor english..

Last edited by pro_on_0; 01-02-2010 at 06:09.
pro_on_0 is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 12-31-2009 , 07:22   Re: Changing w_ models
Reply With Quote #2

Hook FM_SetModel, use get_user_flags() to check if player is an admin or not.
__________________
Arkshine is offline
pro_on_0
Member
Join Date: Nov 2008
Old 01-02-2010 , 04:29   Re: Changing w_ models
Reply With Quote #3

Oh.. Thanks ;)
pro_on_0 is offline
pro_on_0
Member
Join Date: Nov 2008
Old 01-02-2010 , 06:01   Re: Changing w_ models
Reply With Quote #4

Can't change the w_models ....

What wrong?

PHP Code:
public fw_SetModel(entity, const model[])
{
        
// Get damage time of grenade
        
static Float:dmgtime
        pev
(entitypev_dmgtimedmgtime)
 
        new 
id pev(entitypev_owner)
 
        
// Grenade not yet thrown
        
if (dmgtime == 0.0)
                return 
PLUGIN_CONTINUE
 
        
if (equal(model[7], "w_he"4))
        {
                if (
g_item[id][3])
                {
                        
// Give it a glow
                        
fm_set_rendering(entitykRenderFxGlowShell25500kRenderNormal255)
 
                        
// And a colored trail
                        
message_begin(MSG_BROADCASTSVC_TEMPENTITY)
                        
write_byte(TE_BEAMFOLLOW// TE id
                        
write_short(entity// entity
                        
write_short(g_trailSpr// sprite
                        
write_byte(10// life
                        
write_byte(10// width
                        
write_byte(255// r
                        
write_byte(0// g
                        
write_byte(0// b
                        
write_byte(255// brightness
                        
message_end()
 
                        
entity_set_model(entitymodel_requip_hegrenade)
 
                }
        }


Last edited by pro_on_0; 01-02-2010 at 06:05.
pro_on_0 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 12:51.


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