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

Pick up gun owner info


Post New Thread Reply   
 
Thread Tools Display Modes
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 05-04-2021 , 21:24   Re: Pick up gun owner info
Reply With Quote #11

Nope, do this:

PHP Code:
enum Skins
{
    
NoSkin,
    
Skin0,
    
Skin1,
    
Skin2
}

new 
Skins:sSkin Skins:peviEntity pev_iuser2 );
    
switch ( 
sSkin )
{
    case 
NoSkin:
    {
        
    }
    case 
Skin0:
    {
        
    }
    case 
Skin1:
    {
        
    }
    case 
Skin2:
    {
        
    }
    default:
    {
        
set_fail_state"Skin not supported: %d" sSkin );
    }

To reset a weapon, use:
PHP Code:
set_peviEntity pev_iuser2 NoSkin ); 
__________________

Last edited by Bugsy; 05-04-2021 at 21:25.
Bugsy is offline
FeehSK
Junior Member
Join Date: Jul 2019
Location: MT - BRAZIL.
Old 06-05-2021 , 15:26   Re: Pick up gun owner info
Reply With Quote #12

Quote:
Originally Posted by Bugsy View Post

To reset a weapon, use:
PHP Code:
set_peviEntity pev_iuser2 NoSkin ); 
How do I set an entity when the player drops or throws away the weapon (skin) other than by CurWeapon? because by CurWeapon the entity is constantly set
FeehSK is offline
Send a message via Skype™ to FeehSK
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 06-05-2021 , 21:51   Re: Pick up gun owner info
Reply With Quote #13

You can use SetModel
__________________
Bugsy is offline
FeehSK
Junior Member
Join Date: Jul 2019
Location: MT - BRAZIL.
Old 06-06-2021 , 10:36   Re: Pick up gun owner info
Reply With Quote #14

Quote:
Originally Posted by Bugsy View Post
You can use SetModel
I've tried it but it doesn't define. Can you give me an example?
FeehSK is offline
Send a message via Skype™ to FeehSK
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 06-06-2021 , 11:20   Re: Pick up gun owner info
Reply With Quote #15

Something like this:
PHP Code:
public SetModeliEntity , const szModel[] )
{
    new 
szClassname32 ] , szModel32 ];
    
    
peviEntity pev_classname szClassname charsmaxszClassname ) );
    
    if ( 
equal szClassname "weaponbox" ) )
    {
        
set_peviEntity pev_iuser2 12345 );
        
peviEntity pev_model szModel charsmaxszModel ) );
        
        if ( 
containszModel "w_ak47.mdl" ) )
        {
            
//ak47 dropped
        
}
    }

__________________
Bugsy 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 16:11.


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