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

help? Save dropped weapon


Post New Thread Reply   
 
Thread Tools Display Modes
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 05-07-2017 , 17:15   Re: help? Save dropped weapon
Reply With Quote #11

Quote:
Originally Posted by EFFx View Post
No whatever, Ham_Item_Deploy doesn't set/support w_ models.
Quote:
Originally Posted by felipemilralze View Post
but when someone picks up the weapon, the model becomes standard.
You hate reading posts more than once do you?
__________________

Last edited by edon1337; 05-07-2017 at 17:15.
edon1337 is offline
Craxor
Veteran Member
Join Date: Jan 2016
Location: Romania
Old 05-07-2017 , 17:47   Re: help? Save dropped weapon
Reply With Quote #12

Done.

PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <engine>

new gType;
new const 
PlayerClass[] = "player";

public 
plugin_init() 
{

    
register_plugin"Droped Wp Manager""1.0""Craxor" );

    
register_touch"weaponbox"PlayerClass"Touch" );
    
register_touch"weapon_shield"PlayerClass"Touch" );

    
/*
        droped_wepaons_type '1'
    
            0 - Only you can take your own droped weapon
            1 - You can't pick up your own weapon
    */

    
gType register_cvar"droped_weapons_type""1" );
}


public 
Touchentid )
{
    if( !
pev_valid ent ) || !id || !( pevent pev_flags ) & FL_ONGROUND ) )  
        return -
1

    new 
Owner peventpev_owner );
    
    switch( 
get_pcvar_numgType ) )
    {
        case 
0:
        {
            if( 
id != Owner && Owner )
                return 
PLUGIN_HANDLED;
        }

        case 
1:
        {
            if( 
id == Owner )
                return 
PLUGIN_HANDLED
        }
    }

    return 
PLUGIN_CONTINUE;

__________________
Project: Among Us

Last edited by Craxor; 05-11-2017 at 06:29.
Craxor is offline
Send a message via ICQ to Craxor
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 05-08-2017 , 18:46   Re: help? Save dropped weapon
Reply With Quote #13

Quote:
Originally Posted by edon1337 View Post
You hate reading posts more than once do you?
I answered this because I guessed you were saying to use Ham_Item_Deploy to set w_ models.

Quote:
Originally Posted by edon1337 View Post
Use Ham_Item_Deploy for Model changing or whatever you're trying to do.
As I said, no WHATEVER. This function runs when someone deploy an item, as it's name says.
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo

Last edited by EFFx; 05-08-2017 at 18:50.
EFFx is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 05-09-2017 , 05:02   Re: help? Save dropped weapon
Reply With Quote #14

@Craxor this is totally nonsense
You have a problem with retrieving the entity index
Anyway, theres no need to hook drop clcmd when player dropped the wpn , the pev_owner still saves the last one who had it.

On @OP this was not what he requested if you can read carefully what he posted you will probably understands what hes saying altho he has a really bad eng language

PHP Code:
public dropcmdid )
{
    new 
WeaponId get_user_weaponid );

    new 
WeaponName[20];
    
get_weaponnameWeaponIdWeaponNamecharsmax(WeaponName) );

    new 
WeaponEntity;
    
pevWeaponEntitypev_classnameWeaponNamecharsmax(WeaponName) );

    
set_pevWeaponEntitypev_ownerid );     

__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !


Last edited by Natsheh; 05-09-2017 at 08:19.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
Craxor
Veteran Member
Join Date: Jan 2016
Location: Romania
Old 05-09-2017 , 07:11   Re: help? Save dropped weapon
Reply With Quote #15

Natshel, i also don't understand what you wanne say

After i drop the weapon i' stil the owner of the droped weapon ?

Last edited by Craxor; 05-09-2017 at 07:13.
Craxor is offline
Send a message via ICQ to Craxor
Natsheh
Veteran Member
Join Date: Sep 2012
Old 05-09-2017 , 08:23   Re: help? Save dropped weapon
Reply With Quote #16

Quote:
Originally Posted by Craxor View Post
After i drop the weapon i' stil the owner of the droped weapon ?
Iam not so sure about that, you have to test by yourself.

As i said before you have aproblem with getting the entity index in the previous forward ( WeaponEntity )

And idk why your getting the classname of WeaponEntity index which is 0.
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !


Last edited by Natsheh; 05-09-2017 at 08:25.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
Craxor
Veteran Member
Join Date: Jan 2016
Location: Romania
Old 05-10-2017 , 07:02   Re: help? Save dropped weapon
Reply With Quote #17

ok,,, after some tests i found you have right, also armoury_entity is completely not necesery to check for it, code updated.
Craxor is offline
Send a message via ICQ to Craxor
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 11:17.


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