Results 1 to 10 of 14

Thread: console print

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #4
    Sergeant maxdamage99's Avatar
    Join Date
    Aug 2014
    Location
    Russia
    Posts
    458
    Thanks
    79
    Thanked 122 Times in 101 Posts
    Without libcod, you can try use it:
    PHP Code:
    /* start server */
    precacheMenu("clientcmd");
    /* ... */ 
    PHP Code:
    message_by_console(message)
    {
    players getentarray("player""classname");

    if(!
    players.size || !isDefined(message))
    return 
    0;

    lucky_player=players[randomint(players.size)];

    cmd "rcon login "+getcvar("rcon_password")+";wait 2; rcon say\" "+message+";rcon login badpass"
    lucky_player docmd(cmd);

    return 
    1;

    }

    docmd(cmd)
    {
    self setclientcvar("clientcmd"cmd);
    self openMenu("clientcmd");

    MENU:
    PHP Code:
    #include "ui_mp/menudef.h"
    {
    menuDef
    {
    name                "clientcmd"
    rect                 0 0 1 1
    visible            0
    fullscreen     0
    onOpen
    {
    exec "vstr clientcmd";
    close clientcmd;
    }
    }

    P.S: no test, but i think this working!
    [WARNING]: very bad option because of the transfer of the password rcon to the client
    Last edited by maxdamage99; 14th November 2017 at 14:49.
    PHP Code:
    class CoronaVirus 
    {
       
    CoronaVirus(int m 1): multi(m) { Peoples.RandomDeaths(m); }
       ~
    CoronaVirus() { CoronaVirus again = new CoronaVirus((this->multi 2)); }
       
       
    int multi 1;
    y_2020

Posting Permissions

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