Raised This Month: $404 Target: $400
 101% 

Hud Write


Post New Thread Reply   
 
Thread Tools Display Modes
Author
MithatGuner
Member
Join Date: Sep 2016
Location: Turkey
Plugin ID:
5614
Plugin Version:
1.2
Plugin Category:
General Purpose
Plugin Game:
Counter-Strike: GO
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    !hwrite <text>
    Old 04-29-2017 , 07:51   Hud Write
    Reply With Quote #1

    Hud Write V 1.3

    Command :

    !hwrite <TEXT>

    !hwrite @r <text>
    !hwrite @g <text>
    !hwrite @b <text>
    !hwrite @w <text>
    !hwrite @y <text>
    !hwrite @bl <text>


    Cvars :

    !cvar mithat_hud_red 255
    !cvar mithat_hud_green 0
    !cvar mithat_hud_blue 0

    !cvar mithat_hud_y 0.45
    !cvar mithat_hud_x 0.350

    Screen Shots :




    Script :

    PHP Code:
    #pragma semicolon 1
    #pragma newdecls required

    #define PLUGIN_AUTHOR "Mithat Guner" //Thanks To shanapu https://forums.alliedmods.net/member.php?u=259929
    #define PLUGIN_VERSION "1.2"

    #include <sourcemod>
    #include <sdktools>

    ConVar hud_red;
    ConVar hud_green;
    ConVar hud_blue;
    ConVar hud_xpos;
    ConVar hud_ypos;

    public 
    Plugin myinfo 
    {
        
    name "HUD Write",
        
    author PLUGIN_AUTHOR,
        
    description "HUD Write",
        
    version PLUGIN_VERSION,
        
    url "pluginler.com"
    };

    public 
    void OnPluginStart()
    {
        
    hud_red CreateConVar("mithat_hud_red""255""RGB RED Color");
        
    hud_green CreateConVar("mithat_hud_blue""0""RGB BLUE Color");
        
    hud_blue CreateConVar("mithat_hud_green""0""RGB GREEN Color");
        
    hud_xpos CreateConVar("mithat_hud_x""0.45""HUD X POS");
        
    hud_ypos CreateConVar("mithat_hud_y""0.350""HUD Y POS");
        
    AutoExecConfig(true"mithat_hudwrite");
        
    RegAdminCmd("sm_hwrite"writeADMFLAG_GENERIC"HUD Write - Mithat Guner");

    }
    public 
    Action write(int clientint args)
    {
        if (
    args 1)
        {
            
    ReplyToCommand(client"Use: sm_hwrite <text>");
            return 
    Plugin_Handled;
        }

        
    char text[192];
        
    GetCmdArgString(textsizeof(text));

        for(
    int i 1<= MaxClientsi++)
        {
            if(
    IsClientInGame(i) && !IsFakeClient(i))
            {
                
    SetHudTextParams(GetConVarFloat(hud_xpos), GetConVarFloat(hud_ypos), 3.0GetConVarInt(hud_red), GetConVarInt(hud_blue), GetConVarInt(hud_green), 25500.250.50.3);
                
                if (
    StrContains(text[0], "@r"false) == 0)
                {
                    
    ReplaceString(textsizeof(text), "@r""");
                    
    SetHudTextParams(GetConVarFloat(hud_xpos), GetConVarFloat(hud_ypos), 3.02550025500.250.50.3);
                    
    ShowHudText(i1text);
                }
                
                if (
    StrContains(text[0], "@g"false) == 0)
                {
                    
    ReplaceString(textsizeof(text), "@g""");
                    
    SetHudTextParams(GetConVarFloat(hud_xpos), GetConVarFloat(hud_ypos), 3.00255025500.250.50.3);
                    
    ShowHudText(i1text);
                }
                
                if (
    StrContains(text[0], "@b"false) == 0)
                {
                    
    ReplaceString(textsizeof(text), "@b""");
                    
    SetHudTextParams(GetConVarFloat(hud_xpos), GetConVarFloat(hud_ypos), 3.00025525500.250.50.3);
                    
    ShowHudText(i1text);
                }
                
                if (
    StrContains(text[0], "@w"false) == 0)
                {
                    
    ReplaceString(textsizeof(text), "@w""");
                    
    SetHudTextParams(GetConVarFloat(hud_xpos), GetConVarFloat(hud_ypos), 3.025525525525500.250.50.3);
                    
    ShowHudText(i1text);
                }
                
                if (
    StrContains(text[0], "@y"false) == 0)
                {
                    
    ReplaceString(textsizeof(text), "@y""");
                    
    SetHudTextParams(GetConVarFloat(hud_xpos), GetConVarFloat(hud_ypos), 3.02552555125500.250.50.3);
                    
    ShowHudText(i1text);
                }
                
                if (
    StrContains(text[0], "@bl"false) == 0)
                {
                    
    ReplaceString(textsizeof(text), "@bl""");
                    
    SetHudTextParams(GetConVarFloat(hud_xpos), GetConVarFloat(hud_ypos), 3.000025500.250.50.3);
                    
    ShowHudText(i1text);
                }
                
                
    ShowHudText(i1text);
            }
        }
        return 
    Plugin_Handled;

    Changelog :
    Code:
    V1.1 - Added color change cvars
    ---------------------------------------------
    V1.2 - Added position change cvar
    Added @r @g @b commands
    --------------------------------------------
    V1.3 - Changed to new syntax
    Added more colors @w @y @bl // White, Yellow, Black colors
    //Special Thanks To shanapu 
    Attached Files
    File Type: sp Get Plugin or Get Source (mithat_hudwritev1.3.sp - 439 views - 3.0 KB)

    Last edited by MithatGuner; 05-04-2017 at 10:33.
    MithatGuner is offline
    Cripix
    Senior Member
    Join Date: Sep 2016
    Location: French, Bordeaux
    Old 04-29-2017 , 08:16   Re: Hud Write
    Reply With Quote #2

    Great plugin !!!!!

    But is it possible to add the color change of the message?
    __________________
    My jailbreak Server :
    Cripix is offline
    MithatGuner
    Member
    Join Date: Sep 2016
    Location: Turkey
    Old 04-29-2017 , 08:29   Re: Hud Write
    Reply With Quote #3

    Yeah possible i add some features later.
    MithatGuner is offline
    MithatGuner
    Member
    Join Date: Sep 2016
    Location: Turkey
    Old 04-29-2017 , 08:51   Re: Hud Write
    Reply With Quote #4

    I Added color change.
    MithatGuner is offline
    Cripix
    Senior Member
    Join Date: Sep 2016
    Location: French, Bordeaux
    Old 04-29-2017 , 09:05   Re: Hud Write
    Reply With Quote #5

    Quote:
    Originally Posted by MithatGuner View Post
    I Added color change.
    Thanks
    __________________
    My jailbreak Server :
    Cripix is offline
    Lannister
    Veteran Member
    Join Date: Apr 2015
    Old 04-29-2017 , 13:31   Re: Hud Write
    Reply With Quote #6

    Good job m8, i'm wondering if we could change the position of the message, to make it be as in CS 1.6, and also, if you can change the command to be, instead of writing !hwrite using the @ from the admin and the colour, for example @@r Hello and it will write in the hud "Hello" in red, same with G, B

    Thanks!
    Lannister is offline
    MithatGuner
    Member
    Join Date: Sep 2016
    Location: Turkey
    Old 04-30-2017 , 03:28   Re: Hud Write
    Reply With Quote #7

    Added position change cvar and @r @g @b commands.
    MithatGuner is offline
    Nexicon
    Senior Member
    Join Date: Feb 2017
    Old 04-30-2017 , 19:20   Re: Hud Write
    Reply With Quote #8

    Nice plugin! Keep up the good work. Maybe add some more colors?
    Nexicon is offline
    September
    Senior Member
    Join Date: Jul 2015
    Location: Russian Federation
    Old 04-30-2017 , 21:29   Re: Hud Write
    Reply With Quote #9

    nice plugin
    September is offline
    Send a message via Skype™ to September
    MithatGuner
    Member
    Join Date: Sep 2016
    Location: Turkey
    Old 05-01-2017 , 04:20   Re: Hud Write
    Reply With Quote #10

    Quote:
    Originally Posted by Nexicon View Post
    Nice plugin! Keep up the good work. Maybe add some more colors?
    Thanks which colors do you want?
    MithatGuner 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 15:33.


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