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

[REQ] CSGO hintmessage (Retakes)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Ejziponken
AlliedModders Donor
Join Date: Apr 2008
Old 02-10-2015 , 19:30   [REQ] CSGO hintmessage (Retakes)
Reply With Quote #1

Hi. Im using splewis csgo-retakes plugin for my server and I have a smallish problem that maybe someone here could help me with.

Problem:
The message that says which bombsite is being used that round is printed to the chat and is kinda hard to see and easy to miss making players run to the wrong b-site.

Solution:
I would like it to also print the same message with hintmessage with a seperate smx.


Splewis made it kinda easy if I understood it correctly for a coder to fix this problem of mine since he added natives that could be used?!. But Im not a coder so its kinda impossible for me to figure it out.

https://github.com/splewis/csgo-reta...de/retakes.inc

https://github.com/splewis/csgo-retakes

thx!

Last edited by Ejziponken; 02-10-2015 at 19:33.
Ejziponken is offline
Darkness_
Veteran Member
Join Date: Nov 2014
Old 02-10-2015 , 20:19   Re: [REQ] CSGO hintmessage (Retakes)
Reply With Quote #2

Modify retakes_sitepicker.sp

PHP Code:
public Action Command_Site(int clientargs) {
    
char arg[32];
    if (
args >= && GetCmdArg(1argsizeof(arg))) {
        if (
StrEqual(arg"a"false)) {
            
g_forceSite true;
            
g_pickedSite BombsiteA;
            
Retakes_MessageToAll("Now only using bombsite A");
            
PrintHintTextToAll("Now only using bombsite A");
        } else  if (
StrEqual(arg"b"false)) {
            
g_forceSite true;
            
g_pickedSite BombsiteB;
            
Retakes_MessageToAll("Now only using bombsite B");
            
PrintHintTextToAll("Now only using bombsite B");
        } else {
            
g_forceSite false;
            
Retakes_MessageToAll("Now using all bombsites");
            
PrintHintTextToAll("Now using all bombsites");
        }
    } else {
        
Retakes_Message(client"Usage: sm_site [a|b|any]");
    }

Darkness_ is offline
Ejziponken
AlliedModders Donor
Join Date: Apr 2008
Old 02-10-2015 , 20:38   Re: [REQ] CSGO hintmessage (Retakes)
Reply With Quote #3

Code:
public Action Event_RoundPostStart(Handle event, const char[] name, bool dontBroadcast) {
    if (Retakes_InWarmup())
        return;

    if (!g_EditMode) {
        GameRules_SetProp("m_iRoundTime", GetConVarInt(g_hRoundTime), 4, 0, true);
        char bombsite[4];
        GetSiteString(g_Bombsite, bombsite, sizeof(bombsite));
        Retakes_MessageToAll("%t", "RetakeSiteMessage", bombsite, g_NumT, g_NumCT);
		PrintHintTextToAll("%t", "RetakeSiteHintMessage", bombsite, g_NumT, g_NumCT);
    }
The problem now is that something aborts the hint for CT side on spawn so you cant really see it. So I think I need somekind of delay on the hintmessage, like 1 or 2 seconds. I dont know how to add that tho.

Last edited by Ejziponken; 02-10-2015 at 23:31.
Ejziponken is offline
Ohiobob
New Member
Join Date: Jun 2015
Old 06-29-2015 , 15:44   Re: [REQ] CSGO hintmessage (Retakes)
Reply With Quote #4

Hi,

Im also looking for this,
like it comes where the warmup timer is in the middle of the screen.
is this possible
or did you find a solution already ?
Ohiobob is offline
Laam4
Member
Join Date: Sep 2014
Old 06-29-2015 , 16:37   Re: [REQ] CSGO hintmessage (Retakes)
Reply With Quote #5

You can try this:
PHP Code:
public Action Timer_roundStart(Handle timer) {
    
char bombsite[4];
    
GetSiteString(g_Bombsitebombsitesizeof(bombsite));
    for (
int i 1<= MaxClientsi++) {
        if(
IsValidClient(i)) {
            if(
GetClientTeam(i) == 2) {
                
PrintHintText(i"<font size='70'>DEFEND: </font><font size='70' color='#FF0000'>%s</font>"bombsite);
            } else if(
GetClientTeam(i) == 3) {
                
PrintHintText(i"<font size='70'>RETAKE: </font><font size='70' color='#FF0000'>%s</font>"bombsite);
            }
        }
    }
}

public 
Action Event_RoundPostStart(Handle event, const char[] namebool dontBroadcast) {
    if (!
Retakes_Live())
    return;

    if (!
g_EditMode) {
        
GameRules_SetProp("m_iRoundTime"g_hRoundTime.IntValue40true);
        
char bombsite[4];
        
GetSiteString(g_Bombsitebombsitesizeof(bombsite));
        
Retakes_MessageToAll("%t""RetakeSiteMessage"bombsiteg_NumTg_NumCT);
        
CreateTimer(2.0Timer_roundStart);
        
//PrintHintTextToAll("<font size='70'>RETAKE: </font><font size='70' color='#FF0000'>%s</font>", bombsite);
    
}

    
g_bombPlanted false;

Laam4 is offline
Ohiobob
New Member
Join Date: Jun 2015
Old 06-29-2015 , 17:44   Re: [REQ] CSGO hintmessage (Retakes)
Reply With Quote #6

i get fatal error when trying to compile:
cannot read from file smlib
Ohiobob is offline
Laam4
Member
Join Date: Sep 2014
Old 06-30-2015 , 02:20   Re: [REQ] CSGO hintmessage (Retakes)
Reply With Quote #7

Quote:
Originally Posted by Ohiobob View Post
i get fatal error when trying to compile:
cannot read from file smlib
You need the latest smlib include files. https://github.com/bcserv/smlib/tree...ipting/include
Laam4 is offline
Ohiobob
New Member
Join Date: Jun 2015
Old 06-30-2015 , 15:38   Re: [REQ] CSGO hintmessage (Retakes)
Reply With Quote #8

OK i got it now but i get an error:

Spoiler
Ohiobob is offline
lilpetri
Member
Join Date: Nov 2016
Location: The Netherlands
Old 12-14-2017 , 17:42   Re: [REQ] CSGO hintmessage (Retakes)
Reply With Quote #9

Can someone still compile this? I am having trouble.
lilpetri is offline
rogeraabbccdd
Veteran Member
Join Date: Jun 2015
Location: de_dust2
Old 12-14-2017 , 19:34   Re: [REQ] CSGO hintmessage (Retakes)
Reply With Quote #10

Quote:
Originally Posted by lilpetri View Post
Can someone still compile this? I am having trouble.
Use this
https://github.com/Czar-VG/RetakeSiteHud

or this
https://forums.alliedmods.net/showthread.php?p=2526503
__________________

Please keep in mind, nobody have responsibility to help you, especially who don't try to Google first.
I only read messages in Chinese and English.

GitHub | Discord:Kento#2118
rogeraabbccdd 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 01:41.


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