AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   Change the inscription enemies remaining ... when you kill someone (https://forums.alliedmods.net/showthread.php?t=332235)

impossible89 05-01-2021 08:54

Change the inscription enemies remaining ... when you kill someone
 
2 Attachment(s)
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

https://media.discordapp.net/attachm...01843466/1.png


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

https://media.discordapp.net/attachm...41675048/2.png



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

https://media.discordapp.net/attachm...70242866/3.png

MAJESTIC_SZ 05-04-2021 18:22

Re: Change the inscription enemies remaining ... when you kill someone
 
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.

impossible89 05-05-2021 04:01

Re: Change the inscription enemies remaining ... when you kill someone
 
Quote:

Originally Posted by MAJESTIC_SZ (Post 2745941)
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

MAJESTIC_SZ 05-05-2021 08:53

Re: Change the inscription enemies remaining ... when you kill someone
 
Sorry. I dont know how to script. I can edit simple things only. Cut/paste code...That i dont know. Good Luck.


All times are GMT -4. The time now is 19:51.

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