What can I add to script to ignore the m3
HI everyone, over a month ago I found this plugin called no_hs_with_helmet.amxx written by Simon Logic. I have been using it on my cz server, but one thing I have not been able to figure out, is how to get the no_hs_with_helmet.amxx plugin to ignore the m3 pump shotgun. I searched the archives here and have not been able to figure out a solution. I also asked on simon logic's post for the no_hs_with_helmet.amxx plugin over a month ago, but he has not responded. https://forums.alliedmods.net/images/smilies/cry.gif In a nutshell, I would like the plugin to ignore the damage the m3 pump shotgun does when it hits the head. Ie. the shotgun could do a headshot normally, while the rest of the weapons in the game are under the control of no_hs_with_helmet.amxx plugin. What can I add to the script to make ignore the m3 pump shotgun.
Thank you all https://forums.alliedmods.net/images/smilies/smile.gif For those of you not familiar with the script I will paste it below. Any help is greatly appreciated #include <amxmodx> #include <fakemeta> #include <cstrike> #define MY_PLUGIN_NAME "No Headshot With Helmet" #define MY_PLUGIN_VERSION "1.1.0" #define MY_PLUGIN_AUTHOR "Simon Logic" #define HIT_SHIELD 8 new g_iMaxPlayers new g_cvarSHelmetThreshold public plugin_init() { g_iMaxPlayers = get_maxplayers() register_plugin(MY_PLUGIN_NAME, MY_PLUGIN_VERSION, MY_PLUGIN_AUTHOR) register_cvar("version_no_headshot_with_helme t", MY_PLUGIN_VERSION, FCVAR_SERVER|FCVAR_SPONLY) g_cvarSHelmetThreshold = register_cvar("amx_superhelmet_when_armor", "0") //register_forward(FM_TraceLine, "onTraceLine") register_forward(FM_TraceLine, "onTraceLinePost", 1) } public onTraceLinePost(Float:v1[3], Float:v2[3], fNoMonsters, pentToSkip, ptr) { //engfunc(EngFunc_TraceLine, v1, v2, fNoMonsters, pentToSkip, ptr) static iHitEnt; iHitEnt = get_tr2(ptr, TR_pHit) if(1 <= iHitEnt <= g_iMaxPlayers) { static iArmor static CsArmorType:tArmor iArmor = cs_get_user_armor(iHitEnt, tArmor) if(iArmor > 0 && tArmor == CS_ARMOR_VESTHELM && get_tr2(ptr, TR_iHitgroup) == HIT_HEAD) { iHitEnt = get_pcvar_num(g_cvarSHelmetThreshold) // re-use iHitEnt if(iHitEnt > 0 && iArmor >= iHitEnt) iHitEnt = HIT_SHIELD else iHitEnt = HIT_GENERIC set_tr2(ptr, TR_iHitgroup, iHitEnt) } } //return FMRES_SUPERCEDE } |
Re: What can I add to script to ignore the m3
PHP Code:
|
Re: What can I add to script to ignore the m3
Try this version :
(You asked for m3 but not for xm1014 ;) PHP Code:
|
Re: What can I add to script to ignore the m3
Awesome Ty Connor :) I have been trying it out on my server for the last few days and it seems to work well. I tested it out on an enemy with full kevlar and a helmet & was able to get a head shot like normal at close range. I have noticed though that the awp for some reason with the plugin in general will not from time to time register any damage from an awp when you aim for the head. I see blood, but no damage is done. Not really sure why.
I noticed you asked why I didnt have the auto shotty ignored and it got me thinking what other weapons that are low on head shots could be added to the list for this specific plugin. Is there a format based on what you wrote I can follow to say add the t & ct awp and scout? Thanks, smgcz :) |
Re: What can I add to script to ignore the m3
Not sure if I understand you correctly but this is how you can add additional weapons.
PHP Code:
|
Re: What can I add to script to ignore the m3
Best way (most efficient in my mind) to add weapons is to make a bitsum :
PHP Code:
instead of PHP Code:
PHP Code:
PHP Code:
|
Re: What can I add to script to ignore the m3
so is this what it would look like with bitsum if I want the plugin to ignore the m3, awp, and scout?
PHP Code:
|
Re: What can I add to script to ignore the m3
Declare the bitsum at the top of the .sma, with other global vars.
|
Re: What can I add to script to ignore the m3
like such ?
PHP Code:
|
Re: What can I add to script to ignore the m3
Yes, juste change #define with const, then the line is perfomed only 1 time.
|
| All times are GMT -4. The time now is 02:26. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.