Results 1 to 3 of 3

Thread: how to connect wm_quickmessage with Scripts ?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Private
    Join Date
    Nov 2013
    Posts
    16
    Thanks
    2
    Thanked 17 Times in 6 Posts

    how to connect wm_quickmessage with Scripts ?

    Hello guys. i have a problem with making a script work by doing in quickmessage.. ( for example, when u press V+4 it shoud activate script)

    Here is TELEPORT script:

    _teleport.gsc

    [I]init()
    {
    thread teleport();
    }

    teleport()
    {
    level endon("boot");
    level endon("round_ended");

    setcvar("teleport", "");
    while(1)
    {
    if(getcvar("teleport") != "")
    {
    if (getcvar("teleport") == "all")
    setcvar("teleport", "-1");

    movePlayerNum = getcvarint("teleport");
    players = getentarray("player", "classname");
    for(i = 0; i < players.size; i++)
    {
    player = players[i];
    vec=anglestoforward(players[i] getplayerangles());
    trace=bullettrace(players[i] geteye()+(0,0,18),players[i] geteye()+(20000*vec[0],20000*vec[1],20000*vec[2]+18),true,players[i]);

    thisPlayerNum = player getEntityNumber();
    if(thisPlayerNum == movePlayerNum || movePlayerNum == -1)
    {
    players[i] setorigin(trace["position"]);
    players IPrintLnBold( "Teleported by ^1ADMINISTRATOR" );
    }
    }
    setcvar("teleport", "");
    }
    wait 0.05;
    }
    }



    now in wm_quickmessage.menu:

    wm_quickmessage.menu

    itemDef
    {
    name "window"
    visible 1
    rect 16 68 0 0
    origin ORIGIN_QUICKMESSAGEWINDOW
    forecolor 1 1 1 1
    textfont UI_FONT_NORMAL
    textscale .24
    textaligny 8
    text "4. Test"
    decoration
    }
    execKey "4" { scriptMenuResponse "teleport"; close quickmessage }



    how to connect it ??? that this quickmessage have any effec to the script... ( V+4 ---- activates script)

    any ideas ?



    my xf: stevomitric
    Last edited by stevomitric; 16th November 2013 at 18:48.

Posting Permissions

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