Raised This Month: $ Target: $400
 0% 

Grenade throwing animation


Post New Thread Reply   
 
Thread Tools Display Modes
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 12-31-2005 , 03:18  
Reply With Quote #11

Negative.

+attack would make them throw it ;)
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
SubFive
Senior Member
Join Date: Dec 2005
Location: USA
Old 12-31-2005 , 03:58  
Reply With Quote #12

When I type /throwfnade, it seems to automatically do the animation, and so what it looks like is that I switched a grenade and immediatly throw it, but never see the grenade model. After the animation is done and the person's hand comes back from moving, it switches to the HE grenade that I fake threw for about a half second, and then goes back to the gun I had. I'm guessing the latter is a simple fix, making the set task lower than 1.2, but is there anyway to look the animation smoother with a grenade model?

I was hoping to be able to interact with the thrown grenade as if it was a real one. I'm basically trying to add a new grenade to the game.

Code:
#include <amxmodx> #include <engine> public plugin_init() {     register_plugin("Fake throw","1.0","SubFive")     register_clcmd("say /throwfnade","cmd_Throw",ADMIN_USER) } public cmd_Throw(id) {     if(user_has_weapon(id, CSW_HEGRENADE))     {         engclient_cmd(id, "weapon_hegrenade")         set_animation(id, 2)         set_task(1.2, "revert_back", id)     } } public revert_back(id) {     client_cmd(id, "lastinv") } public set_animation( id, seq ) {     entity_set_int(id, EV_INT_weaponanim, seq);     message_begin(MSG_ONE, SVC_WEAPONANIM, {0,0,0}, id);     write_byte(seq);     write_byte(entity_get_int(id, EV_INT_body));     message_end(); }
SubFive is offline
SubFive
Senior Member
Join Date: Dec 2005
Location: USA
Old 01-01-2006 , 19:18  
Reply With Quote #13

I've also noticed that when I tested it with a friend, the only person to actually see the animation is the one doing it. My friend was in a server with me testing it, and when I issued the command, only I (or the issuer) saw the animation. I've also noticed that if I have a grenade out and do the animation, it switches back to my gun afterwards just fine, but if I have my gun out when I do the animation it switches to my HE grenade after the animation for a short time, and then switches back to my gun. Id really like to eliminate that. Thats my main problem, switching back to the HE after doing the animation. Any ideas v3x?
SubFive is offline
SubFive
Senior Member
Join Date: Dec 2005
Location: USA
Old 01-01-2006 , 21:43  
Reply With Quote #14

Sorry for the triple post, but I solved it on my own.

Only thing that could use fixing is showing the animation to other people instead of just myself, but thats not to big of a deal. I have no idea how I'd go about that though.
SubFive is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 01-01-2006 , 21:52  
Reply With Quote #15

Code:
entity_set_int(id, EV_INT_gaitsequence, num);
I forget what the sequence number is though.
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
SubFive
Senior Member
Join Date: Dec 2005
Location: USA
Old 01-01-2006 , 21:53  
Reply With Quote #16

You said it was 2 earlier.
SubFive is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 01-01-2006 , 22:25  
Reply With Quote #17

Yeah, but this is for the actual player animation..
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
SubFive
Senior Member
Join Date: Dec 2005
Location: USA
Old 01-01-2006 , 22:33  
Reply With Quote #18

Could I put in a number, one by one, and test it on a server and see what it looks like? For example,

entity_set_int(id, EV_INT_gaitsequence, 1);
entity_set_int(id, EV_INT_gaitsequence, 2);
entity_set_int(id, EV_INT_gaitsequence, 3);
entity_set_int(id, EV_INT_gaitsequence, and so on);
SubFive is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 01-01-2006 , 23:19  
Reply With Quote #19

Jed's HL Model Viewer

Open up a player model and scroll through the sequences and it'll show you the number
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
SubFive
Senior Member
Join Date: Dec 2005
Location: USA
Old 01-01-2006 , 23:21  
Reply With Quote #20

Thanks again v3x, if I publish the plugin I'm working on I'll be sure to include you as quite helpful.
SubFive is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 09:09.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode