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

[CSGO] Axe and hammer pick up


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
root88
Senior Member
Join Date: May 2016
Old 12-08-2018 , 05:01   [CSGO] Axe and hammer pick up
Reply With Quote #1

Hi!
After CSGO Danger Zone Update there are axes and hammers. What I'd like to do is picking them up in normal game mode. You can spawn them for example with:
Code:
sv_cheats 1
give weapon_axe
give weapon_hammer
but you can't pick them up. Anyone?

*update
PHP Code:
#pragma semicolon 1
#include <sourcemod>
#include <sdktools>


public void OnPluginStart()
{
    
HookEvent("player_spawn"Event_PlayerSpawn);
}

public 
void Event_PlayerSpawn(Event event, const char[] namebool dontBroadcast)
{
    
int client GetClientOfUserId(GetEventInt(event"userid"));
    if(
IsPlayerAlive(client))
    {
        
int iAxe GivePlayerItem(client"weapon_axe");
        
EquipPlayerWeapon(clientiAxe);
    }

It will work, but I still can't pick them up from ground.
__________________

Last edited by root88; 12-08-2018 at 05:51. Reason: update, better code
root88 is offline
Ilusion9
Veteran Member
Join Date: Jun 2018
Location: Romania
Old 12-08-2018 , 06:09   Re: [CSGO] Axe and hammer pick up
Reply With Quote #2

I think you should edit items_game.txt for that.

weapon_tablet and weapon_breachcharge have item_gear_slot key.
PHP Code:

"item_gear_slot"        "item"
"item_gear_slot"        "utility" 
__________________
Ilusion9 is offline
zipcore
Veteran Member
Join Date: Mar 2010
Location: m_flZipcore
Old 12-08-2018 , 07:12   Re: [CSGO] Axe and hammer pick up
Reply With Quote #3

weapon_fists work great like this btw

EDIT: jailbreak without knife as spawn weapon?
__________________

Last edited by zipcore; 12-08-2018 at 07:13.
zipcore is offline
root88
Senior Member
Join Date: May 2016
Old 12-08-2018 , 07:39   Re: [CSGO] Axe and hammer pick up
Reply With Quote #4

Quote:
Originally Posted by zipcore View Post
weapon_fists work great like this btw

EDIT: jailbreak without knife as spawn weapon?
Wow, nice! Thx!
__________________
root88 is offline
Trsak
Junior Member
Join Date: Jul 2018
Old 12-09-2018 , 05:52   Re: [CSGO] Axe and hammer pick up
Reply With Quote #5

So currently the only way to use new weapons in causal mode is to edit items_game.txt?
Trsak is offline
root88
Senior Member
Join Date: May 2016
Old 12-09-2018 , 08:12   Re: [CSGO] Axe and hammer pick up
Reply With Quote #6

You can use my code from first post to give players those weapons on spawn.
__________________

Last edited by root88; 12-09-2018 at 08:13.
root88 is offline
Bara
AlliedModders Donor
Join Date: Apr 2012
Location: Germany
Old 12-09-2018 , 08:33   Re: [CSGO] Axe and hammer pick up
Reply With Quote #7

You could work with SDKHooks and WeaponCanUse to pick up melee weapons or try `mp_drop_knife_enable 1`.
__________________
Discord (Bara#5006) | My Plugins (GitHub)
You like my work? Support is not a crime.
Bara is offline
root88
Senior Member
Join Date: May 2016
Old 12-09-2018 , 08:35   Re: [CSGO] Axe and hammer pick up
Reply With Quote #8

I've tried mp_drop_knife_enable 1 already, it doesn't work for axe etc.
__________________
root88 is offline
zipcore
Veteran Member
Join Date: Mar 2010
Location: m_flZipcore
Old 12-09-2018 , 09:52   Re: [CSGO] Axe and hammer pick up
Reply With Quote #9

If nobody has time earlier I would write a plugin to be able to pickup those new weapons end of the week. ( weapon_breachcharge works anyways btw. )

Esp. a fists plugin would be welcome for a lot of servers ( Power punch let your opponent drop their weapon ).

I was wasting some time on the new drones, but sadly havn't got them working yet ( to follow a player and carry items with them ). Looks like they need more then just "m_hMoveToThisEntity" & "m_hDeliveryCargo".

Writing a plugin with those droneguns seems to be pointless, their AI is too boooooring.

A money plugin killing floor style is now possible, or drop money on death.

++++ many more new cool plugins are incomming I guess ++++
__________________
zipcore is offline
shanapu
Veteran Member
Join Date: Apr 2015
Location: .de
Old 12-09-2018 , 12:37   Re: [CSGO] Axe and hammer pick up
Reply With Quote #10

Quote:
Originally Posted by zipcore View Post
...
A money plugin killing floor style is now possible, ...
https://forums.alliedmods.net/showthread.php?p=2558324
__________________
coding & free software
shanapu 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 04:59.


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