Raised This Month: $32 Target: $400
 8% 

COD: HitMarkers v1.7 [Updated April 29th 2021]


Post New Thread Reply   
 
Thread Tools Display Modes
Midnight Kid
Member
Join Date: Aug 2017
Location: Chornobay, Ukraine
Old 05-05-2020 , 09:08   Re: COD: HitMarkers v1.6 [Updated 07/04/2020]
Reply With Quote #71

Quote:
Originally Posted by DJEarthQuake View Post
@Midnight Kid. You are a gentleman and scholar sharing that much detail. Would something of the sort, similarly make features, possibly work on bot flavors, that do not ordinarily do things, that others can to interface or bridge the gap, so to speak? What I mean... Features that may or may not work on a plethora of bots. For example: parachute or voice synthesis? Just PM me if your off topic meter is buzzing.
My purpose is simply to say that info as is. And then you "diagonally" choose what you need from the text.
Do you have a better snippet? You're welcome - the forum was created for that. And Napoleon_be just give thanks for your pro-help. That's how it works.
P. S. How people sometimes drop when they feel the rivalry, what doesn't even exist in real. I thought that it happens only on Russian forums. But... it seems mistake.
PM? For what? To read the empty text of a simple (or common, or private) coder?))) Excuse me, but how can we force a senior person to do that... That would be too easy and inhumane. You deserve to live in the proud expectation of that.

Sorry for that biggest and real off-topic opus.
Midnight Kid is offline
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 05-05-2020 , 10:18   Re: COD: HitMarkers v1.6 [Updated 07/04/2020]
Reply With Quote #72

Help and collaboration was asked. Got the message. Good luck.
__________________
DJEarthQuake is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 04-28-2021 , 23:10   Re: COD: HitMarkers v1.6 [Updated 07/04/2020]
Reply With Quote #73

Update:

Code:
1.7: Adjusted the plugin to work with all guns on default (as it is in Call Of Duty). Description has been updated for more information.
__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
joaokb
Junior Member
Join Date: Apr 2021
Location: brazil
Old 04-30-2021 , 15:20   Re: COD: HitMarkers v1.6 [Updated 07/04/2020]
Reply With Quote #74

Quote:
Originally Posted by Napoleon_be View Post
Update:

Code:
1.7: Adjusted the plugin to work with all guns on default (as it is in Call Of Duty). Description has been updated for more information.
I put it on my server but it dont show any hit markers

I can see that the plugin is running in "pause plugins" menu and I can edit the cvar's in amxmod cvar's menu, but it dont show any hitmarker and dont play the sound of the hit

I am using a plugin that show the bullets damage, maybe this 2 plugins are bugging?
__________________
⠀⠀⠀⠀⠀⠀
⠀⠀kabest
joaokb is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 04-30-2021 , 16:26   Re: COD: HitMarkers v1.7 [Updated April 29th 2021]
Reply With Quote #75

Would you please do me a favour and test the folowing code? This is the previous version. Only made minor changes which shouldn't be affecting the plugin in a bad way.

PHP Code:
/* Plugin generated by AMXX-Studio */


/* Credits:
    - DJEarthQuake aka SPiNX: random symbol & rainbow color idea.
    - Bugsy: Thanks for showing me how to use bitsums, comes in very handy & optimizing my code alot.
    - HamletEagle: Thanks for helping me out with the snipers cvar.
    - WarrioR: For delivering me the hitmarker sound.
*/

#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>

#define iRainbow random_num(10, 255)
#define TASKID 85621

#pragma semicolon 1

// pCvars
new pPlugin;
new 
pRainbow;
new 
pRandomHitmarkers;
new 
pSnipersOnly;
new 
pSounds;
new 
pSymbol;
new 
pColorRed;
new 
pColorGreen;
new 
pColorBlue;
new 
pXPosition;
new 
pYPosition;
new 
pHoldTime;
new 
pDeadHitMarker;
new 
pDeadColorRed;
new 
pDeadColorGreen;
new 
pDeadColorBlue;

new const 
szSymbols[][] =
{
    
"-",
    
"\",
    "
|",
    "
/",
    "
*",
    "
+",
    "
x"
};

new const szVersion[] = "
1.6";
new const szSound[] = "
hitmarkers/hitmarkers.wav";

new gWeaponList = (1 << CSW_SCOUT) | (1 << CSW_AWP) | (1 << CSW_SG550) | (1 << CSW_G3SG1);

public plugin_init()
{
    register_plugin("
CODHitMarkers", szVersion, "NapoleoN#");

    
RegisterHam(Ham_TakeDamage"player""PostTakeDamage"1);

    
pPlugin =                 register_cvar("amx_hitmarkers""1"); // Enables/disables plugin
    
pRainbow =                 register_cvar("amx_hmrainbow""1"); // Enables/disables random colors on every hit.
    
pRandomHitmarkers =     register_cvar("amx_hmrandom""1"); //Enables/disables random hit markers.
    
pSnipersOnly =            register_cvar("amx_hmsnipers""1"); // Enables/disables hitmarkers on snipers only.
    
pSounds =                 register_cvar("amx_hmsounds""1"); // Enables/disables hitmarker sound on hit.
    
pSymbol =                 register_cvar("amx_hmsymbol""x"); // Sets the symbol of the hitmarker (only works when amx_hmrandom "0")
    
pColorRed =                register_cvar("amx_hmrcolor""165"); // RGB - Red (This won't work when amx_hmrainbow = 1)
    
pColorGreen =            register_cvar("amx_hmgcolor""165"); // RGB - Green (This won't work when amx_hmrainbow = 1)
    
pColorBlue =            register_cvar("amx_hmbcolor""165"); // RGB - Blue (This won't work when amx_hmrainbow = 1)
    
pDeadHitMarker =         register_cvar("amx_hmdead""1"); // Sets a different color when victim died.
    
pDeadColorRed =         register_cvar("amx_hmdeadrcolor""255"); // RGB Dead - Red
    
pDeadColorGreen =         register_cvar("amx_hmdeadgcolor""0"); // RGB Dead - Green
    
pDeadColorBlue =         register_cvar("amx_hmdeadbcolor""0"); // RGB Dead - Blue
    
pXPosition =             register_cvar("amx_hmxpos""-1.0"); // x pos
    
pYPosition =             register_cvar("amx_hmypos""-1.0"); // y pos
    
pHoldTime =             register_cvar("amx_hmholdtime""0.5"); // hud hold time
}

public 
plugin_precache()
{
    
precache_sound(szSound);
}

#if AMXX_VERSION_NUM < 190
public client_disconnect(id)
#else
public client_disconnected(id)
#endif
{
    if(
task_exists(id TASKID))
    {
        
remove_task(id TASKID);
    }
}

public 
PostTakeDamage(iVictimiInflictoriAttackerFloat:iDamageiDamagebits)
{
    if(
get_pcvar_num(pPlugin) && is_user_connected(iAttacker) && (get_user_team(iVictim) != get_user_team(iAttacker)))
    {
        new 
bool:bShowHitMarker;

        if(
get_pcvar_num(pSnipersOnly))
        {
            if(
gWeaponList & (<< get_user_weapon(iAttacker)))
            {
                
bShowHitMarker true;
            }
        }

        else
        {
            
bShowHitMarker true;
        }

        if(
bShowHitMarker)
        {
            new 
isVictimAlive is_user_alive(iVictim);

            new 
iRediGreeniBlueszSymbol[2];
            
get_pcvar_string(pSymbolszSymbolcharsmax(szSymbol));

            if(
isVictimAlive)
            {
                if(
get_pcvar_num(pRainbow))
                {
                    
iRed iRainbow;
                    
iGreen iRainbow;
                    
iBlue iRainbow;
                }

                else
                {
                    
iRed get_pcvar_num(pColorRed);
                    
iGreen get_pcvar_num(pColorGreen);
                    
iBlue get_pcvar_num(pColorBlue);
                }
            }

            else if(!
isVictimAlive && get_pcvar_num(pDeadHitMarker))
            {
                
iRed get_pcvar_num(pDeadColorRed);
                
iGreen get_pcvar_num(pDeadColorGreen);
                
iBlue get_pcvar_num(pDeadColorBlue);
            }

            
set_hudmessage(iRediGreeniBlueget_pcvar_float(pXPosition), get_pcvar_float(pYPosition) , 02.0get_pcvar_float(pHoldTime) , 0.00.0, -1);
            
show_hudmessage(iAttacker"%s" get_pcvar_num(pRandomHitmarkers) ? szSymbols[random(sizeof(szSymbols))] : szSymbol);

            if(
get_pcvar_num(pSounds))
            {
                
set_task(0.110"PlaySound"iAttacker TASKID);
            }
        }
    }
}

public 
PlaySound(iAttacker)
{
    
iAttacker -= TASKID;
    
client_cmd(iAttacker"spk %s"szSound);

__________________

Last edited by Napoleon_be; 04-30-2021 at 16:26.
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
Noochs
Junior Member
Join Date: Apr 2020
Old 10-16-2023 , 20:43   Re: COD: HitMarkers v1.7 [Updated April 29th 2021]
Reply With Quote #76

Quote:
Originally Posted by Napoleon_be View Post
Would you please do me a favour and test the folowing code? This is the previous version. Only made minor changes which shouldn't be affecting the plugin in a bad way.

PHP Code:
/* Plugin generated by AMXX-Studio */


/* Credits:
    - DJEarthQuake aka SPiNX: random symbol & rainbow color idea.
    - Bugsy: Thanks for showing me how to use bitsums, comes in very handy & optimizing my code alot.
    - HamletEagle: Thanks for helping me out with the snipers cvar.
    - WarrioR: For delivering me the hitmarker sound.
*/

#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>

#define iRainbow random_num(10, 255)
#define TASKID 85621

#pragma semicolon 1

// pCvars
new pPlugin;
new 
pRainbow;
new 
pRandomHitmarkers;
new 
pSnipersOnly;
new 
pSounds;
new 
pSymbol;
new 
pColorRed;
new 
pColorGreen;
new 
pColorBlue;
new 
pXPosition;
new 
pYPosition;
new 
pHoldTime;
new 
pDeadHitMarker;
new 
pDeadColorRed;
new 
pDeadColorGreen;
new 
pDeadColorBlue;

new const 
szSymbols[][] =
{
    
"-",
    
"\",
    "
|",
    "
/",
    "
*",
    "
+",
    "
x"
};

new const szVersion[] = "
1.6";
new const szSound[] = "
hitmarkers/hitmarkers.wav";

new gWeaponList = (1 << CSW_SCOUT) | (1 << CSW_AWP) | (1 << CSW_SG550) | (1 << CSW_G3SG1);

public plugin_init()
{
    register_plugin("
CODHitMarkers", szVersion, "NapoleoN#");

    
RegisterHam(Ham_TakeDamage"player""PostTakeDamage"1);

    
pPlugin =                 register_cvar("amx_hitmarkers""1"); // Enables/disables plugin
    
pRainbow =                 register_cvar("amx_hmrainbow""1"); // Enables/disables random colors on every hit.
    
pRandomHitmarkers =     register_cvar("amx_hmrandom""1"); //Enables/disables random hit markers.
    
pSnipersOnly =            register_cvar("amx_hmsnipers""1"); // Enables/disables hitmarkers on snipers only.
    
pSounds =                 register_cvar("amx_hmsounds""1"); // Enables/disables hitmarker sound on hit.
    
pSymbol =                 register_cvar("amx_hmsymbol""x"); // Sets the symbol of the hitmarker (only works when amx_hmrandom "0")
    
pColorRed =                register_cvar("amx_hmrcolor""165"); // RGB - Red (This won't work when amx_hmrainbow = 1)
    
pColorGreen =            register_cvar("amx_hmgcolor""165"); // RGB - Green (This won't work when amx_hmrainbow = 1)
    
pColorBlue =            register_cvar("amx_hmbcolor""165"); // RGB - Blue (This won't work when amx_hmrainbow = 1)
    
pDeadHitMarker =         register_cvar("amx_hmdead""1"); // Sets a different color when victim died.
    
pDeadColorRed =         register_cvar("amx_hmdeadrcolor""255"); // RGB Dead - Red
    
pDeadColorGreen =         register_cvar("amx_hmdeadgcolor""0"); // RGB Dead - Green
    
pDeadColorBlue =         register_cvar("amx_hmdeadbcolor""0"); // RGB Dead - Blue
    
pXPosition =             register_cvar("amx_hmxpos""-1.0"); // x pos
    
pYPosition =             register_cvar("amx_hmypos""-1.0"); // y pos
    
pHoldTime =             register_cvar("amx_hmholdtime""0.5"); // hud hold time
}

public 
plugin_precache()
{
    
precache_sound(szSound);
}

#if AMXX_VERSION_NUM < 190
public client_disconnect(id)
#else
public client_disconnected(id)
#endif
{
    if(
task_exists(id TASKID))
    {
        
remove_task(id TASKID);
    }
}

public 
PostTakeDamage(iVictimiInflictoriAttackerFloat:iDamageiDamagebits)
{
    if(
get_pcvar_num(pPlugin) && is_user_connected(iAttacker) && (get_user_team(iVictim) != get_user_team(iAttacker)))
    {
        new 
bool:bShowHitMarker;

        if(
get_pcvar_num(pSnipersOnly))
        {
            if(
gWeaponList & (<< get_user_weapon(iAttacker)))
            {
                
bShowHitMarker true;
            }
        }

        else
        {
            
bShowHitMarker true;
        }

        if(
bShowHitMarker)
        {
            new 
isVictimAlive is_user_alive(iVictim);

            new 
iRediGreeniBlueszSymbol[2];
            
get_pcvar_string(pSymbolszSymbolcharsmax(szSymbol));

            if(
isVictimAlive)
            {
                if(
get_pcvar_num(pRainbow))
                {
                    
iRed iRainbow;
                    
iGreen iRainbow;
                    
iBlue iRainbow;
                }

                else
                {
                    
iRed get_pcvar_num(pColorRed);
                    
iGreen get_pcvar_num(pColorGreen);
                    
iBlue get_pcvar_num(pColorBlue);
                }
            }

            else if(!
isVictimAlive && get_pcvar_num(pDeadHitMarker))
            {
                
iRed get_pcvar_num(pDeadColorRed);
                
iGreen get_pcvar_num(pDeadColorGreen);
                
iBlue get_pcvar_num(pDeadColorBlue);
            }

            
set_hudmessage(iRediGreeniBlueget_pcvar_float(pXPosition), get_pcvar_float(pYPosition) , 02.0get_pcvar_float(pHoldTime) , 0.00.0, -1);
            
show_hudmessage(iAttacker"%s" get_pcvar_num(pRandomHitmarkers) ? szSymbols[random(sizeof(szSymbols))] : szSymbol);

            if(
get_pcvar_num(pSounds))
            {
                
set_task(0.110"PlaySound"iAttacker TASKID);
            }
        }
    }
}

public 
PlaySound(iAttacker)
{
    
iAttacker -= TASKID;
    
client_cmd(iAttacker"spk %s"szSound);

Tested the following code and it works fine.

Last edited by Noochs; 10-16-2023 at 22:29.
Noochs 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 21:35.


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