AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Changing w_ models [Help] (https://forums.alliedmods.net/showthread.php?t=113900)

pro_on_0 12-31-2009 06:04

Changing w_ models [Help]
 
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..

Arkshine 12-31-2009 07:22

Re: Changing w_ models
 
Hook FM_SetModel, use get_user_flags() to check if player is an admin or not.

pro_on_0 01-02-2010 04:29

Re: Changing w_ models
 
Oh.. Thanks ;)

pro_on_0 01-02-2010 06:01

Re: Changing w_ models
 
Can't change the w_models ....:cry:

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




All times are GMT -4. The time now is 04:16.

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