Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Custom Call Vote

  1. #1
    Private
    Join Date
    Mar 2013
    Posts
    12
    Thanks
    2
    Thanked 6 Times in 5 Posts

    Question Custom Call Vote

    Hi, I wan't to make own call vote menu, because the original COD2 call vote has buggs. So my question is : How can I make binds through script(for example: bind F1 "vote yes"; openscriptmenu custom_vote yes), maybe with exec client cmd?

    Thanks in advance.

  2. #2
    Assadministrator kung foo man's Avatar
    Join Date
    Jun 2012
    Location
    trailerpark
    Posts
    2,011
    Thanks
    2,102
    Thanked 1,084 Times in 753 Posts
    You can use the normal F1/F2-Key with this Extension: http://killtube.org/showthread.php?1...=4543#post4543
    timescale 0.01

  3. #3
    Private
    Join Date
    Mar 2013
    Posts
    12
    Thanks
    2
    Thanked 6 Times in 5 Posts
    but i want to use an another srv now

  4. #4
    Assadministrator kung foo man's Avatar
    Join Date
    Jun 2012
    Location
    trailerpark
    Posts
    2,011
    Thanks
    2,102
    Thanked 1,084 Times in 753 Posts
    In Extreme-Mod is a execClient()-function (dunno exact name)

    Then you can do something like:

    PHP Code:
    player some\file::execClient("bind F1 openscriptmenu menu_vote yes");
    player some\file::execClient("bind F2 openscriptmenu menu_vote no"); 
    timescale 0.01

  5. The Following User Says Thank You to kung foo man For This Useful Post:

    kat_ (5th March 2013)

  6. #5
    Private
    Join Date
    Mar 2013
    Posts
    12
    Thanks
    2
    Thanked 6 Times in 5 Posts
    Solved!


    Function:
    PHP Code:
    ExecClient(cmd)
    {
        
    self setClientCvar ("clientcmd"cmd);
        
    self openMenu ("clientcmd");
        
    self closeMenu ("clientcmd");

    To call the function:
    PHP Code:
    self ExecClient("bind f1 openscriptmenu custom_vote yes"); 
    .menu
    PHP Code:
    #include "ui_mp/menudef.h"
    {
        
    menuDef
        
    {
            
    name            "yes"
        
    }

    Last edited by kat_; 5th March 2013 at 18:52.

  7. The Following User Says Thank You to kat_ For This Useful Post:

    kung foo man (5th March 2013)

  8. #6
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    your .menu is missing a vstr clientcmd line.

  9. The Following User Says Thank You to IzNoGoD For This Useful Post:

    kung foo man (6th March 2013)

  10. #7
    Brigadier General
    Join Date
    Oct 2012
    Posts
    994
    Thanks
    20
    Thanked 588 Times in 388 Posts
    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;
            } 
        }

    This menu - and the ExecClientCommand() function itself - was written by Bell (Krister Stendahl)- creator of the AWE mod. Please credit him if you use it.
    Last edited by Tally; 5th March 2013 at 19:50.

  11. The Following 2 Users Say Thank You to Tally For This Useful Post:

    kat_ (6th March 2013),kung foo man (6th March 2013)

  12. #8
    Private
    Join Date
    Mar 2013
    Posts
    12
    Thanks
    2
    Thanked 6 Times in 5 Posts
    hm still doesn't work,any idea?

  13. #9
    Assadministrator kung foo man's Avatar
    Join Date
    Jun 2012
    Location
    trailerpark
    Posts
    2,011
    Thanks
    2,102
    Thanked 1,084 Times in 753 Posts
    Did you use Tallys .menu-File? Your .menu-file was incomplete.

    Also did you precached it? precacheMenu("clientcmd");
    Last edited by kung foo man; 7th March 2013 at 06:35. Reason: gramm0r
    timescale 0.01

  14. #10
    Brigadier General
    Join Date
    Oct 2012
    Posts
    994
    Thanks
    20
    Thanked 588 Times in 388 Posts
    Quote Originally Posted by kat_ View Post
    hm still doesn't work,any idea?
    Where are you running the ExecClientCommand()? If you do it before the player fully connects, it wont work. You have to wait at least until the client receives the "connected" flag. Or, better yet, do it when they are joining a team.

    Also, I use the ExecClientCommand() to execute a config file placed in the client's IWD download. Put your bind in there like this:

    PHP Code:
    bind F1 "openScriptMenu clientcmd custom_vote yes" 
    Then, on joining a team, I run the ExecClientCommand() function:

    PHP Code:
    self ExecClientCommand"exec nameofyourconfigfile.cfg" ); 
    Last edited by kung foo man; 7th March 2013 at 06:38. Reason: FI to F1

  15. The Following User Says Thank You to Tally For This Useful Post:

    kung foo man (7th March 2013)

Posting Permissions

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