View Full Version : Do grenade throw anim on a player
Ni3ls
3rd November 2013, 15:22
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
Tally
3rd November 2013, 16:28
You can use the clientcmd function to force a player to do almost anything, including throwing a greande:
self ExecClientCommand( "+smoke" );
wait( 0.05 );
self ExecClientCommand( "-smoke" );
ExecClientCommand( cmd )
{
self setClientCvar( "clientcmd", cmd );
self openMenu( "clientcmd" );
self closeMenu( "clientcmd" );
}
clientcmd menu:
#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.
Ni3ls
3rd November 2013, 16:45
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
Tally
3rd November 2013, 16:59
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?
IzNoGoD
3rd November 2013, 18:50
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");
Tally
3rd November 2013, 19:07
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.
vanfreddy
3rd November 2013, 19:32
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
Ni3ls
4th November 2013, 10:05
Ok ty all:)
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.