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

Variable Ignoring _cl_autowepswich "0"


Post New Thread Reply   
 
Thread Tools Display Modes
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 02-15-2019 , 18:25   Re: Variable Ignoring _cl_autowepswich "0"
Reply With Quote #11

If I do not misunderstand he want to force weapon switch for the best available weapon, if that's the case my code does exactly what he want.

Ham_Weapon_RetireWeapon call GetNextBestWeapon.

https://github.com/s1lentq/ReGameDLL...pons.cpp#L1420
Spoiler



https://github.com/s1lentq/ReGameDLL...ules.cpp#L3159
Spoiler
__________________









Last edited by CrazY.; 02-15-2019 at 18:27.
CrazY. is offline
PartialCloning
Senior Member
Join Date: Dec 2015
Old 02-15-2019 , 18:33   Re: Variable Ignoring _cl_autowepswich "0"
Reply With Quote #12

He only wants to switch under certain conditions. Based on the code, the primary weapon is given after the secondary weapon, calling engclient_cmd to always switch to the primary weapons seems like the simplest solution, but he'll have to test it.
PartialCloning is offline
Vaim
Member
Join Date: Feb 2019
Old 02-16-2019 , 02:57   Re: Variable Ignoring _cl_autowepswich "0"
Reply With Quote #13

Quote:
Originally Posted by CrazY. View Post
Code:
#include <amxmodx> #include <amxmisc> #include <hamsandwich> public plugin_init() {     RegisterHam(Ham_Spawn, "player", "CBasePlayer_Spawn_Post", 1); } public CBasePlayer_Spawn_Post(id) {     if (!is_user_alive(id))         return;     new pActiveItem = get_pdata_cbase ( id, 373 , 5 ) ;     if (pActiveItem != -1)         ExecuteHamB ( Ham_Weapon_RetireWeapon, pActiveItem ) ; }

Thank you very much for your help, your plugin works perfectly on aim_usp, aim_glock, aim_deagle. You helped me a lot
Vaim is offline
Vaim
Member
Join Date: Feb 2019
Old 02-16-2019 , 03:00   Re: Variable Ignoring _cl_autowepswich "0"
Reply With Quote #14

Quote:
Originally Posted by PartialCloning View Post
Edit, try this Line 1162:

PHP Code:
new item_id csdm_give_item(idwp);
if(
slot == SLOT_PRIMARY)
    
engclient_cmd(idwp); 

And your csdm_equip edit advice
also works great on other cards, you helped me a lot
Vaim is offline
Vaim
Member
Join Date: Feb 2019
Old 02-16-2019 , 03:05   Re: Variable Ignoring _cl_autowepswich "0"
Reply With Quote #15

Thank you for responding and helping, you have the best community I've ever met. Thank you again
Vaim is offline
Reply


Thread Tools
Display Modes

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:42.


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