Results 1 to 8 of 8

Thread: Do grenade throw anim on a player

  1. #1
    Brigadier General
    Join Date
    Dec 2012
    Posts
    1,012
    Thanks
    440
    Thanked 171 Times in 132 Posts

    Do grenade throw anim on a player

    Hello, is it possible to do a grenade throwing anim on a player? So he will do the anim and then throw an object with movegravity function

  2. #2
    Brigadier General
    Join Date
    Oct 2012
    Posts
    994
    Thanks
    20
    Thanked 588 Times in 388 Posts
    You can use the clientcmd function to force a player to do almost anything, including throwing a greande:

    PHP Code:
            self ExecClientCommand"+smoke" );
            
    wait0.05 );
            
    self ExecClientCommand"-smoke" ); 
    PHP Code:
    ExecClientCommandcmd )
    {
        
    self setClientCvar"clientcmd"cmd );
        
    self openMenu"clientcmd" );
        
    self closeMenu"clientcmd" );

    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;
            } 
        }

    I have no idea what you mean when you say movegravity function to throw a grenade. You don't need that function at all.

  3. #3
    Brigadier General
    Join Date
    Dec 2012
    Posts
    1,012
    Thanks
    440
    Thanked 171 Times in 132 Posts
    No i dont need to force a player to throw a grenade. I only need the anim and then let it throw an object i can control

  4. #4
    Brigadier General
    Join Date
    Oct 2012
    Posts
    994
    Thanks
    20
    Thanked 588 Times in 388 Posts
    Quote Originally Posted by Ni3ls View Post
    No i dont need to force a player to throw a grenade. I only need the anim and then let it throw an object i can control
    There is no other way to do it. So, you're pretty much stuffed, eh?

  5. #5
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    can you make a gun that has idleanim of nadethrow, then make player switch to it?
    also, if you want this but dont want a nade in your map, just delete() it using getentarray("grenade", "classname");

  6. #6
    Brigadier General
    Join Date
    Oct 2012
    Posts
    994
    Thanks
    20
    Thanked 588 Times in 388 Posts
    Quote Originally Posted by IzNoGoD View Post
    can you make a gun that has idleanim of nadethrow, then make player switch to it?
    also, if you want this but dont want a nade in your map, just delete() it using getentarray("grenade", "classname");
    You can't make the grenade button idle. It will always throw something. The only button that will fulfil that kind of role is the actionslot (binoculars) button.

  7. #7
    Private
    Join Date
    Jun 2013
    Posts
    70
    Thanks
    20
    Thanked 32 Times in 26 Posts
    u can put the animation in a normal weapon and then u can make all animation u want, monitor it and then call ur movegravity things or whatever

    for grenades u donte even need the movegravity its working without too, just change the endparts of the weapons file with grenade information .u can find example in other mods there are already weapons which shoots grenades
    Last edited by vanfreddy; 3rd November 2013 at 19:38.

  8. #8
    Brigadier General
    Join Date
    Dec 2012
    Posts
    1,012
    Thanks
    440
    Thanked 171 Times in 132 Posts
    Ok ty all

Posting Permissions

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