Results 1 to 6 of 6

Thread: Bold Message Script

  1. #1
    Private
    Join Date
    Jul 2016
    Location
    Albania
    Posts
    18
    Thanks
    8
    Thanked 9 Times in 8 Posts

    Bold Message Script


    Hey guys i am new to killtube,
    i am starting to made a modest mod and i wanted to know how admin can say a message to all players.
    if anyone help me that would be great

  2. #2
    Private First Class
    Join Date
    Mar 2016
    Posts
    134
    Thanks
    48
    Thanked 11 Times in 10 Posts
    PHP Code:
    main()
    {
        
    setcvar("saybold""");
        while(
    1)
        {
            
    wait 0.05;
            
    _p getentarray("player""classname");

            if (
    getcvar("saybold") != "")
            {
                for (
    0_p.sizei++)
                {
                    if (
    getcvarint("saybold") == _p[igetEntityNumber())
                        
    _p[ithread saybold();
                }
                
    setcvar("saybold""");
            }
        }
    }

    saybold()
    {
        
    msg  getcvar("saybold");
        
    setcvar("saybold""");

        
    players getentarray("player""classname");
        for(
    0players.sizei++)            
            
    players[iplayLocalSound("ctf_touchown");    
        
    iprintlnbold(msg);

    ^ this code up here, you must rename it to _saybold.gsc and place it on maps\mp\gametypes\ folder.
    Then you go to sd.gsc or dm.gsc (the gametype u want it to ur server) and add this line on start gametype.
    PHP Code:
    thread maps\mp\gametypes\_saybold::main(); 
    When you're ingame , do /rcon login urrconhere then /rcon saybold test
    Let me know if worked.

  3. The Following User Says Thank You to suck000 For This Useful Post:

    klendi11 (23rd July 2016)

  4. #3
    Private Paho's Avatar
    Join Date
    Feb 2014
    Location
    Russia
    Posts
    101
    Thanks
    43
    Thanked 48 Times in 37 Posts
    Code:
    Cmd_ExecuteString( "say welcome to our server!" );
    output in chat:
    console: welcome to our server!
    Last edited by Paho; 22nd July 2016 at 11:11.

  5. The Following User Says Thank You to Paho For This Useful Post:

    klendi11 (23rd July 2016)

  6. #4
    Sergeant maxdamage99's Avatar
    Join Date
    Aug 2014
    Location
    Russia
    Posts
    458
    Thanks
    79
    Thanked 122 Times in 101 Posts
    You can make response, and...
    PHP Code:
    /*self - admin*/
    if(!isDefined(self)||!isPlayer(self)||message==""||message==" ")
    return;
    admin=without_color(self.name); //script removes in nickname all ^1 ^2 ^3
    /*message - message*/ 
    Cmd_ExecuteString("say "+admin+"^3:^7 "+message); 

  7. The Following 2 Users Say Thank You to maxdamage99 For This Useful Post:

    klendi11 (23rd July 2016),Paho (23rd July 2016)

  8. #5
    Global Mossaderator Mitch's Avatar
    Join Date
    Nov 2012
    Posts
    654
    Thanks
    204
    Thanked 450 Times in 305 Posts
    Quote Originally Posted by Paho View Post
    Code:
    Cmd_ExecuteString( "say welcome to our server!" );
    output in chat:
    console: welcome to our server!
    You can better use these functions instead of Cmd_ExecuteString.

    PHP Code:
    consoleSay(message)
    {
        
    sendgameservercommand(-1"h \"console: " message "\"");
    }

    tellMessage(message)
    {
        
    sendgameservercommand(self getentitynumber(), "h \"console: " message "\"");


  9. The Following 2 Users Say Thank You to Mitch For This Useful Post:

    klendi11 (23rd July 2016),Paho (22nd July 2016)

  10. #6
    Private Paho's Avatar
    Join Date
    Feb 2014
    Location
    Russia
    Posts
    101
    Thanks
    43
    Thanked 48 Times in 37 Posts
    Quote Originally Posted by suck000 View Post
    saybold
    Code:
    if(args[0] == "printbold")
    {
    iprintlnbold(args[1]);
    return;
    }
    /printbold text
    output: center text

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •