Raised This Month: $ Target: $400
 0% 

Weapons Drop Ability


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
KadiR
Unnecessary Member
Join Date: Aug 2008
Location: Zürich / Switzerland
Old 03-15-2010 , 10:35   Re: Weapons Drop Ability
Reply With Quote #1

Wow looks cool, better than those '' blocking c4 drop'' plugins.
KadiR is offline
LeVraiT
Senior Member
Join Date: Dec 2009
Location: France
Old 03-15-2010 , 13:05   Re: Weapons Drop Ability
Reply With Quote #2

Cool for Furiens good job thanks
__________________
Zombie Plague New IP 109.239.150.168:27030

Furiens Mod IP 109.239.147.48:27165
LeVraiT is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 03-15-2010 , 13:08   Re: Weapons Drop Ability
Reply With Quote #3

Furien smells
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
worldspawn
Senior Member
Join Date: Aug 2009
Location: Russia, Yekaterinburg
Old 03-16-2010 , 13:37   Re: Weapons Drop Ability
Reply With Quote #4

am i blind or "awp" is not included?
worldspawn is offline
Send a message via ICQ to worldspawn Send a message via Skype™ to worldspawn
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 03-16-2010 , 13:44   Re: Weapons Drop Ability
Reply With Quote #5

You are not blind, i've forgotten the 4 snipers.
I'm affraid i won't have enough letters to let the command as it is now.

Gonna rewrite it like :

weapon_candrop <weaponname> <0/1>

So you can do :

weapon_candrop awp 0

Unless anyone have another idea (Direct use of flags value is not userfriendly).


EDIT : Updated
__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 03-16-2010 at 15:49.
ConnorMcLeod is offline
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 04-02-2010 , 19:53   Re: Weapons Drop Ability
Reply With Quote #6

This seems useless to me and if it was anyone else who posted it, I would approve it, but I'm not going to stand up against you because I know everyone will rally around you like sheep and defend you.

This plugin is well done.

If you would like any information regarding possible adjustments you could make or things you could do to make this better, please feel free to post here or PM me.

Approved.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 04-03-2010 , 05:26   Re: Weapons Drop Ability
Reply With Quote #7

Quote:
Originally Posted by Hawk552 View Post
This seems useless to me
To me it seems the easiest/most efficient way to enable nades drop for example.

-> my plugin code :
PHP Code:
public CS_Item_CanDrop(iEnt)
{
    const 
XTRA_OFS_WEAPON 4
    
const m_iId 43

    SetHamReturnInteger
( !! (DEFAULT_CANT_DROP_BITSUM & ( 1<<get_pdata_int(iEntm_iIdXTRA_OFS_WEAPON) )) )

    return 
HAM_SUPERCEDE

-> other plugin code :
PHP Code:
public clcmd_drop(id) {
    if (!
MODE_ALIVE || !is_user_alive(id)) // if nade drops not allowed to alive players or player isn't alive
        
return PLUGIN_CONTINUE

    
new currentclipammoi
    current 
get_user_weapon(idclipammo// get id and ammo of current weapon

    
new arg[21]
    
read_argv(1arg20// get name of weapon to drop
    
if (!arg[0]) { // if weapon name isn't specified
        
if (!ammo// if no weapon ammo (usually knife)
            
return PLUGIN_CONTINUE

        
// get nade index
        
for (0NADE_TYPES; ++i) {
            if (
current == NADE_WEAPON_ID[i]) // if current weapon is nade
                
break
        }
    }
    else {
        
// check if weapon to drop is nade
        
for (0NADE_TYPES; ++i) {
            if (
equal(argNADE_WEAPON_NAME[i])) // if weapon to drop is nade
                
break
        }
    }

    if (
== NADE_TYPES// if weapon to drop isn't nade
        
return PLUGIN_CONTINUE

    
new weapon NADE_WEAPON_ID[i]
    
ammo get_pdata_int(idNADE_OFFSET_AMMO[i], OFFSET_AMMO_LINUXDIFF// get nade actual ammo
    
if (ammo 1// if no nade ammo
        
return PLUGIN_CONTINUE

    
if (g_nades_number >= MAX_NADE_ENTITIES) {
        
client_print(idprint_centerMSG_TOMANY)
        return 
PLUGIN_HANDLED
    
}

    if (!
MODE_BUY && !g_freezetime) { // is rnd_buy is 0 and currently not a freezetime
        
new Float:wait get_pcvar_float(g_pcvar_buytime) * 60 - (get_gametime() - g_round_start_time)
        if (
wait 0) { // is currently a buytime
            #if defined OBEY_BUYZONE
                
if (g_buyzone[id]) { // is player in buyzone
                    
client_print(idprint_centerMSG_BUY)
                    return 
PLUGIN_HANDLED
                
}
            
#else
                
new seconds floatround(waitfloatround_floor)
                
client_print(idprint_centerMSG_BUYseconds seconds 1)
                return 
PLUGIN_HANDLED
            
#endif
        
}
    }

    new 
nade engfunc(EngFunc_CreateNamedEntityg_ipsz_armoury_entity// create nade entity
    
if (!nade) { // if nade entity not created
        
client_print(idprint_centerMSG_ERROR// client error center text message
        
log_amx(MSG_ERROR// log error
        
return PLUGIN_HANDLED
    
}

    
g_nades_number++

    
set_pdata_int(idNADE_OFFSET_AMMO[i], --ammoOFFSET_AMMO_LINUXDIFF// reduce nade ammo over one unit
    
if (!ammo) { // no more weapon ammo
        
if (current == weapon) { // if current weapon is weapon to drop
            // CS standard-like weapon switching after drop
            
for (new 0WEAPONS; ++j) {
                if (
user_has_weapon(idWEAPON_PRIORITY[j]) && weapon != WEAPON_PRIORITY[j]) { // search for player main weapon id
                    
new wname[20// longest weapon name is "weapon_smokegrenade" (19 characters long)
                    
get_weaponname(WEAPON_PRIORITY[j], wname19// get name of player main weapon
                    
engclient_cmd(idwname// switch player to his main weapon
                    
break
                }
            }
        }
        else {
            
// this is necessary to strip nade properly
            
engclient_cmd(idNADE_WEAPON_NAME[i]) // switch to nade
            
engclient_cmd(idg_lastinv// switch to previous weapon
        
}
    }

    
set_nade_kvd(nadeg_itemNADE_ITEM_ID[i]) // set nade item type

    
set_pev(nadepev_classnameNADE_NAME// set nade unique classname

    // setup nade start origin
    
new Float:origin[3]
    
pev(idpev_originorigin)
    
engfunc(EngFunc_SetOriginnadeorigin)

    
// setup nade angles
    
new Float:angles[3]
    
pev(idpev_anglesangles)
    
angles[0] = 0.0 // we don't need specific vertical angle
    
angles[1] += NADE_PLR_DIFF_ANGLE_HOR
    set_pev
(nadepev_anglesangles)

    
// setup nade velocity
    
new Float:anglevec[3], Float:velocity[3]
    
pev(idpev_v_angleanglevec)
    
engfunc(EngFunc_MakeVectorsanglevec)
    
global_get(glb_v_forwardanglevec)
    
velocity[0] = anglevec[0] * NADE_VELOCITY
    velocity
[1] = anglevec[1] * NADE_VELOCITY
    velocity
[2] = anglevec[2] * NADE_VELOCITY
    set_pev
(nadepev_velocityvelocity)

    
dllfunc(DLLFunc_Spawnnade// spawn nade

    
return PLUGIN_HANDLED

Quote:
Originally Posted by Hawk552 View Post
if it was anyone else who posted it, I would approve it
You meant unapprove ?

Quote:
Originally Posted by Hawk552 View Post
This plugin is well done.
Thanks

Quote:
Originally Posted by Hawk552 View Post
If you would like any information regarding possible adjustments you could make or things you could do to make this better, please feel free to post here or PM me.
Sure i would like.
__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 04-03-2010 at 05:42.
ConnorMcLeod is offline
CsIosefin
Senior Member
Join Date: Aug 2009
Old 04-07-2010 , 08:56   Re: Weapons Drop Ability
Reply With Quote #8

This plugin restricts all, or only on the map where he gave the order?
CsIosefin is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 04-07-2010 , 12:40   Re: Weapons Drop Ability
Reply With Quote #9

Quote:
Originally Posted by CsIosefin View Post
This plugin restricts all, or only on the map where he gave the order?
Depend on where you put commands.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
zoubiey
Member
Join Date: Jul 2009
Location: Sweden / Piteċ
Old 05-09-2010 , 11:50   Re: Weapons Drop Ability
Reply With Quote #10

This doesnt work for me..
It's a great plugin but is it working for HNS?
Trying it right now but those things I put in the Cvars wasnt able to drop (like all nades and awp/deagle)

Hope someone can help me.
zoubiey 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 19:47.


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