Results 1 to 5 of 5

Thread: Cmd_ExecuteString and search .3dbsp

  1. #1
    Sergeant maxdamage99's Avatar
    Join Date
    Aug 2014
    Location
    Russia
    Posts
    458
    Thanks
    79
    Thanked 122 Times in 101 Posts

    Cmd_ExecuteString and search .3dbsp

    Hi, how check "mp_mapname" in folder?
    EXAMPLE:
    PHP Code:
    checkmap(map)
    {
    /* map_indir - example function */
    if(map_indir(map))
    return 
    1;
    else
    return 
    "File: "+map+".3dbsp no found in: "+getcvar("fs_game")+" and main";

    and i can use this?????:
    Code:
    Cmd_ExecuteString("clientkick 0");
    /* and */
    Cmd_ExecuteString("givepistol 5"); //rcon-admin command by .gsc scripts
    /* or */
    Cmd_ExecuteString("set newcvar newvalue");
    ?
    Last edited by maxdamage99; 11th August 2016 at 10:53.
    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

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

    kubislav23 (11th August 2016)

  3. #2
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    So, you're using a gsc script to set a cvar on a server, which will be read by another .gsc script to give a pistol to someone. Sounds silly.

    Same with set cvar value. Why not use setcvar("cvar", "value");

    clientkick can be replaced by the kick() command, or even kick2() by mitch iirc.

    Use file_exists(file here) for your last question.
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

  4. #3
    Sergeant maxdamage99's Avatar
    Join Date
    Aug 2014
    Location
    Russia
    Posts
    458
    Thanks
    79
    Thanked 122 Times in 101 Posts
    Omg..is EXAMPLE!!!!
    Code:
    exists = file_exists( "/home/server/mod/gob_aim.iwd" );
    yes?
    if i have mappack? mappack1 (in mappack more 5 maps) how check?
    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

  5. #4
    Global Mossaderator Mitch's Avatar
    Join Date
    Nov 2012
    Posts
    654
    Thanks
    204
    Thanked 450 Times in 305 Posts
    Quote Originally Posted by maxdamage99 View Post
    Omg..is EXAMPLE!!!!
    Code:
    exists = file_exists( "/home/server/mod/gob_aim.iwd" );
    yes?
    if i have mappack? mappack1 (in mappack more 5 maps) how check?
    Then you can only use the function 'MapExists' if the map has been loaded.

  6. The Following User Says Thank You to Mitch For This Useful Post:

    maxdamage99 (11th August 2016)

  7. #5
    Sergeant maxdamage99's Avatar
    Join Date
    Aug 2014
    Location
    Russia
    Posts
    458
    Thanks
    79
    Thanked 122 Times in 101 Posts
    I check this function, ty mitch
    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
  •