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

Change the inscription enemies remaining ... when you kill someone


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
impossible89
Member
Join Date: Jun 2020
Old 05-01-2021 , 08:54   Change the inscription enemies remaining ... when you kill someone
Reply With Quote #1

I want to change the inscription enemies remaining ... when you kill someone

to write when you are CT for example and there are 10 people from T and for each killed to write how many T remain alive still to take the victory for this round for example there are 10 players and are killed 5 and write that there are still

5 TERORIST Remaining ... and in the same way to show for the opposing team when its T to write how many live CTs still remain to take the victory for the round I hope you understood me.

You are currently showing this way no matter which team you are on




When you are CT and it says that there are 5 people left on the T team - to take the victory for this round





When you are T and it says that there are 5 people left from the CT team - to take the victory for this round

Attached Files
File Type: sma Get Plugin or Get Source (miscstats.sma - 165 views - 27.6 KB)
File Type: txt miscstats.txt (47.8 KB, 74 views)
impossible89 is offline
MAJESTIC_SZ
Senior Member
Join Date: Mar 2020
Location: Portugal
Old 05-04-2021 , 18:22   Re: Change the inscription enemies remaining ... when you kill someone
Reply With Quote #2

I think i found what you need.

Requirements: ReAPI + AMXX 1.9.0 or Higher

PHP Code:
/*
* Author: https://t.me/twisternick
* Request: https://dev-cs.ru/threads/4792/
*/

#include <amxmodx>
#include <amxmisc>
#include <reapi>

#pragma semicolon 1

#define PLUGIN_VERSION "1.0"

/****************************************************************************************
****************************************************************************************/

new g_iSyncMessage;

public 
plugin_init()
{
    
register_plugin("Enemies Left"PLUGIN_VERSION"w0w");

    
RegisterHookChain(RG_CBasePlayer_Killed"refwd_PlayerKilled_Post"true);
    
g_iSyncMessage CreateHudSyncObj();
}

public 
refwd_PlayerKilled_Post()
{
    new 
iTs get_playersnum_ex(GetPlayers_ExcludeDead|GetPlayers_MatchTeam"TERRORIST");
    new 
iCTs get_playersnum_ex(GetPlayers_ExcludeDead|GetPlayers_MatchTeam"CT");

    
set_hudmessage(11055110, -1.00.7010.13.00.12.0, -1);
    
ShowSyncHudMsg(0g_iSyncMessage"Terrorists %d - %d Counter-Terrorists"iTsiCTs);

Try it.
Itīs a countdown for every player remaining on both sides.
It is possible to translate to other language as well.
Report if it works.

Last edited by MAJESTIC_SZ; 05-04-2021 at 18:24.
MAJESTIC_SZ is offline
impossible89
Member
Join Date: Jun 2020
Old 05-05-2021 , 04:01   Re: Change the inscription enemies remaining ... when you kill someone
Reply With Quote #3

Quote:
Originally Posted by MAJESTIC_SZ View Post
I think i found what you need.

Requirements: ReAPI + AMXX 1.9.0 or Higher

PHP Code:
/*
* Author: https://t.me/twisternick
* Request: https://dev-cs.ru/threads/4792/
*/

#include <amxmodx>
#include <amxmisc>
#include <reapi>

#pragma semicolon 1

#define PLUGIN_VERSION "1.0"

/****************************************************************************************
****************************************************************************************/

new g_iSyncMessage;

public 
plugin_init()
{
    
register_plugin("Enemies Left"PLUGIN_VERSION"w0w");

    
RegisterHookChain(RG_CBasePlayer_Killed"refwd_PlayerKilled_Post"true);
    
g_iSyncMessage CreateHudSyncObj();
}

public 
refwd_PlayerKilled_Post()
{
    new 
iTs get_playersnum_ex(GetPlayers_ExcludeDead|GetPlayers_MatchTeam"TERRORIST");
    new 
iCTs get_playersnum_ex(GetPlayers_ExcludeDead|GetPlayers_MatchTeam"CT");

    
set_hudmessage(11055110, -1.00.7010.13.00.12.0, -1);
    
ShowSyncHudMsg(0g_iSyncMessage"Terrorists %d - %d Counter-Terrorists"iTsiCTs);

Try it.
Itīs a countdown for every player remaining on both sides.
It is possible to translate to other language as well.
Report if it works.


I want these things to be inserted into the plugin I've attached here, not through a separate plugin

I think these lines should be edited from line: 521 to line: 544

PHP Code:
    new const CsTeams:team cs_get_user_team(victim);

    if (
EnemyRemaining && CS_TEAM_T <= team <= CS_TEAM_CT && is_user_connected(victim))
    {
        new const 
victimTeammatesCount get_playersnum_ex(GetPlayers_ExcludeDead GetPlayers_MatchTeamg_teamsNames[team]);

        if (
victimTeammatesCount)
        {
            new 
killerTeammatesList[MAX_PLAYERS], killerTeammatesCount;
            
get_players_ex(killerTeammatesListkillerTeammatesCountGetPlayers_ExcludeDead GetPlayers_MatchTeamg_teamsNames[CsTeams:(any:team 1)]);

            if (
killerTeammatesCount)
            {
                
set_hudmessage(2552552550.020.8520.050.10.023.0, -1);

                for (new 
teammateteammate killerTeammatesCount; ++teammate)
                {
                    
victimTeammatesCount ?
                        
ShowSyncHudMsg(killerTeammatesList[teammate], g_bottom_sync"%l""REMAINING_ENEMIES"victimTeammatesCount) :
                        
ShowSyncHudMsg(killerTeammatesList[teammate], g_bottom_sync"%l","REMAINING_ENEMY");
                }
            }
        }
    } 
And from TXT:
PHP Code:
CT CT
CTS 
CTS
TERRORIST 
TERRORIST
TERRORISTS 
TERRORISTS
REMAINING 
= %%s Remaining...
REMAINING_ENEMY One enemy remaining...
REMAINING_ENEMIES = %d enemies remaining... 

But I don't know exactly how
impossible89 is offline
MAJESTIC_SZ
Senior Member
Join Date: Mar 2020
Location: Portugal
Old 05-05-2021 , 08:53   Re: Change the inscription enemies remaining ... when you kill someone
Reply With Quote #4

Sorry. I dont know how to script. I can edit simple things only. Cut/paste code...That i dont know. Good Luck.
MAJESTIC_SZ 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 13:07.


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