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

Amx Mod X 1.8.3 Grenade Issue


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Whitez
Member
Join Date: Apr 2016
Location: London, UK
Old 04-28-2016 , 07:20   Amx Mod X 1.8.3 Grenade Issue
Reply With Quote #1

The Problem:

After throwing a flashbang the game is automatically switching to the main weapon even if the player has more flashbangs in the backpack

Note:
This doesn't happen for the he or smoke grenade

How it should work:
The game shouldn't automatically switch to the main weapon if the player has more grenades of the same type

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "PC"


public plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_clcmd("say /123""givegrenades")
    
    
// Add your code here...
}

public 
givegrenades(id)
{
    
give_item(id"weapon_flashbang")
    
give_item(id"weapon_hegrenade")
    
give_item(id"weapon_smokegrenade")
    
    
cs_set_user_bpammo(idCSW_FLASHBANG10)
    
cs_set_user_bpammo(idCSW_HEGRENADE10)
    
cs_set_user_bpammo(idCSW_SMOKEGRENADE10)

Whitez is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 04-28-2016 , 07:30   Re: Amx Mod X 1.8.3 Grenade Issue
Reply With Quote #2

This is the default game behavior, it will deploy the next best weapon. This is not related to AMXX.
__________________

Last edited by Arkshine; 04-28-2016 at 07:34.
Arkshine is offline
Whitez
Member
Join Date: Apr 2016
Location: London, UK
Old 04-28-2016 , 11:09   Re: Amx Mod X 1.8.3 Grenade Issue
Reply With Quote #3

If it is, shouldn't it change to the next best weapon after throwing a he grenade or a smoke one?
Whitez is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 04-28-2016 , 11:21   Re: Amx Mod X 1.8.3 Grenade Issue
Reply With Quote #4

Quote:
Originally Posted by Whitez View Post
If it is, shouldn't it change to the next best weapon after throwing a he grenade or a smoke one?
Game was made to switch to next best weapon only for flashbang so you can kill your enemy while he is flashed. If you want to prevent this you can probably hook WeaponIndle(), check ammo and if non 0 hook and block RetireWeapon()
__________________

Last edited by HamletEagle; 04-28-2016 at 11:28.
HamletEagle 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 22:45.


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