Page 2 of 2 FirstFirst 12
Results 11 to 16 of 16

Thread: linux rcon tool

  1. #11
    Corporal voron00's Avatar
    Join Date
    Nov 2014
    Posts
    248
    Thanks
    64
    Thanked 216 Times in 116 Posts
    Quote Originally Posted by feanor View Post
    it wont be good for announcements :/ how can i add automessage with libcod ?
    Something like that:
    PHP Code:
    setCvar("botname""[NoBeer4You] console"); // So you can change its name to whatev on the fly

    thread saybot();
    thread botloop();

    level.botmessages[level.botmessages.size] = "Hey, welcome to our server!";
    level.botmessages[level.botmessages.size] = "Can someone please bring a fire extinguisher to that pickup truck which is now a blaze, and possibly a burn specialist.";
    level.botmessages[level.botmessages.size] = "Please report all the hackers to an admin.";
    level.botmessages[level.botmessages.size] = "Beer is currently out of stock, but you can still order your juice for just 3.99$";
    // etc etc

    // So you can use this cvar to say something yourself through it
    saybot()
    {
        
    setcvar("saybot""");
        for (;;)
        {
            if (
    getCvar("saybot") != "")
            {
                
    botname getCvar("botname");
                
    message getCvar("saybot");
                
    sendGameServerCommand(-1"h \"" botname "^7: " message "\"");
                
    setcvar("saybot""");
            }
            
    wait 0.05;
        }
    }

    botloop()
    {
        while(
    1)
        {
            
    wait (randomIntRange(180300));
            
    setCvar("saybot"level.botmessages[randomInt(level.botmessages.size)]);
        }


    sudo apt-get rekt

  2. The Following User Says Thank You to voron00 For This Useful Post:

    feanor (28th April 2016)

  3. #12
    Private First Class thOuMta's Avatar
    Join Date
    Oct 2012
    Location
    France
    Posts
    191
    Thanks
    139
    Thanked 35 Times in 28 Posts
    Just edit the Messages mod with "sendgameservercommand"

    messages.gsc

    PHP Code:
    main()
    {
        
    msg_amount getCvarInt("cg_smsg_amount");
        
    msg_delay getCvarInt("cg_smsg_delay");
        for(;;)
        {
            for (
    1<= msg_amounti++)
            {
                
    wait msg_delay;
                
    msg getCvar("cg_smsg_" i);
                
    sendgameservercommand(-1"h \"^7console: " msg "\"");
            }

            
    wait 0.15;
        }

    and in server.cfg

    PHP Code:
    set cg_smsg_amount "3"
    set cg_smsg_delay "15"
    set cg_smsg_1 "Announcement 1"
    set cg_smsg_2 "Announcement 2"
    set cg_smsg_3 "Announcement 3" 

  4. The Following User Says Thank You to thOuMta For This Useful Post:

    feanor (28th April 2016)

  5. #13
    Private First Class
    Join Date
    Nov 2015
    Posts
    128
    Thanks
    37
    Thanked 14 Times in 14 Posts
    i put it like this

    PHP Code:
    init()
    {
        
    thread msg();
    }

    msg() 

        
    msg_amount getCvarInt("cg_smsg_amount"); 
        
    msg_delay getCvarInt("cg_smsg_delay"); 
        for(;;) 
        { 
            for (
    1<= msg_amounti++) 
            { 
                
    wait msg_delay
                
    msg getCvar("cg_smsg_" i); 
                
    sendgameservercommand(-1"h \"^7console: " msg "\""); 
            } 

            
    wait 0.15
        } 
    then i call it i ctf,hq,dm,tdm. gsc like this


    PHP Code:
    thread maps\msg::init(); 
    but didnt work :/ i put it in my mod
    Last edited by feanor; 28th April 2016 at 19:34.

  6. #14
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    Great bug report, we'll get right on it.

    Before we can continue, we will need some additional information:

    - Is your server on?
    - Is it running linux?
    - Is it running call of duty?
    - Are there any error messages that might be of interest?
    - Is your mother a woman?
    - How much potato chips did you eat last night?


    Provide something aside from "it doesnt work".
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

  7. #15
    Private First Class
    Join Date
    Nov 2015
    Posts
    128
    Thanks
    37
    Thanked 14 Times in 14 Posts
    yes my servers working on linux you can recognize it when i said that how can i make this with libcod ?

    PHP Code:
    unknown function: (file 'maps/msg.gsc'line 16)
                
    sendgameservercommand(-1"h \"^7console: " msg "\""); 
    Last edited by feanor; 28th April 2016 at 19:46.

  8. #16
    Private First Class
    Join Date
    Nov 2015
    Posts
    128
    Thanks
    37
    Thanked 14 Times in 14 Posts
    ok i fixed myself , it was about my hosting service stupids..they didnt start server with libcod.. sorry i wasted your time

Posting Permissions

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