Raised This Month: $66 Target: $400
 16% 

Steer your nade. 1.4


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Fun Stuff        Approver:   v3x (159)
Ramono
Veteran Member
Join Date: Nov 2005
Location: Netherlands
Old 04-26-2006 , 14:04   Steer your nade. 1.4
Reply With Quote #1

This plugin allows you to steer your own grenades.
When you trow a grenade your view will change to the one of the grenade and use your mouse to steer it.

Cvars:
Code:
amx_grencam 1/0  ( Default 1 )
enables/disables plugin

amx_smokecam 1/0  ( Default 0 )
Make the effect on a smoke grenase ( strongly recommanded "0", read bugs )

amx_gravgren 1/0 ( Default 0 )
When 1 the grenade goes down with gravity, so steer left and right only and also is more realistic, 0 is just free trow and more fun.

amx_grenexplode 1/0 ( Standard 1 )
When 1 it allows the client to let his grenate explode on a click.
Bugs:
Code:
Smoke granades can fly as long as they don't hit the ground ( to fix this set amx_smokecam to 0 )
Smoke granates stay +-30 sec after explosion, and the cam stays stuck in it ( to fix this set amx_smokecam to 0 )
Modules:
Code:
Engine
History
Code:
 < 0.99 Private use + bug fixing
1.0 Public release
1.1 Used Pcvar for better amxmodxx 1.7 compatabillity + removed unused function ( thanks v3x )
1.2 fixed high ping players dont get grenade view
1.3 Added attack button = grenade explode ( thanks VEN! )
1.4 Added a cvar + added v3x suggestion.
To do:
Code:
Fix the smoke gren bugs ( If its possable )
Add speed control
attack click = explode grenade. DONE in 1.3!!!
Have fun with it!!!

( the zip file is a small movie of how it works )
Attached Files
File Type: zip steergren.zip (1.46 MB, 6239 views)
File Type: sma Get Plugin or Get Source (steernades.sma - 4019 views - 2.0 KB)
__________________
Um, hi.

Last edited by Ramono; 12-30-2006 at 11:44.
Ramono is offline
Xanimos
Veteran Member
Join Date: Apr 2005
Location: Florida
Old 04-26-2006 , 14:19  
Reply With Quote #2

Sounds origional. I'm going to wait for client responses on how it works. Try and fix those bugs though too.
Xanimos is offline
Send a message via AIM to Xanimos Send a message via MSN to Xanimos
ch3cker
Veteran Member
Join Date: Jun 2005
Location: Deutschland / Baden-Würt
Old 04-26-2006 , 14:20  
Reply With Quote #3

very nice plugin
can you make it so that you can't leave the fly of the smoke ??
__________________
SORRY 4 MY BAD ENGLISH
ch3cker is offline
Ramono
Veteran Member
Join Date: Nov 2005
Location: Netherlands
Old 04-26-2006 , 14:21  
Reply With Quote #4

Quote:
Originally Posted by Suicid3
Sounds origional. I'm going to wait for client responses on how it works. Try and fix those bugs though too.
+
Quote:
Originally Posted by ch3cker
very nice plugin
can you make it so that you can't leave the fly of the smoke ??
Can't figure out how, thats why i added a cvar. ^_^
And even when fixed the "Stuck in smoke-gren bug"
You can fly around the map as long as you want.
and that is a CS thing/bug
__________________
Um, hi.
Ramono is offline
Lt Llama
Senior Member
Join Date: Aug 2004
Old 04-26-2006 , 14:35  
Reply With Quote #5

Hax master

Very nice idea. In what dimensions can you control the nade? Up, down, left, right? Can you also influence the speed of the nade and make it fly as long as you want?

Is it like a guided missile with amx_gravgren 1?
Would be cool to be able to control speed of nade to.

Damn, wanna test this.

n1

+rep
Lt Llama is offline
Ramono
Veteran Member
Join Date: Nov 2005
Location: Netherlands
Old 04-26-2006 , 14:39  
Reply With Quote #6

Quote:
Originally Posted by Lt Llama
Hax master

Very nice idea. In what dimensions can you control the nade? Up, down, left, right? Can you also influence the speed of the nade and make it fly as long as you want?

Is it like a guided missile with amx_gravgren 1?
Would be cool to be able to control speed of nade to.

Damn, wanna test this.

n1

+rep
Yes, up down left right, anyway u want it.
The speed of the grenade is the grenades standard speed.
It makes u fly untill the nade explodes.
and with amx_gravgren "0" its like a missile, 1 is with gravity.
Controlable speed will be added in "future" versions
__________________
Um, hi.
Ramono is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 04-26-2006 , 15:00  
Reply With Quote #7

I'll try and test it on my server before I go to sleep ( been up for about 24 hours ).

Edit: Use the pcvar natives.

Edit #2:
Code:
#include <amxmodx> #include <engine> #define PLUGIN "Steer nades" #define VERSION "1.0" #define AUTHOR "NL)Ramon(NL" new bool:isgren[33] new whosgren[33] new grencam new smokecam new gravgren public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)     grencam = register_cvar("amx_grencam","1")     smokecam = register_cvar("amx_smokecam","0")     gravgren = register_cvar("amx_gravgren","0") } public trowed() {     new id = read_data(1)     set_task(0.1,"makecam",id) } public grenade_throw(id,grenid,grentype) {     if(get_pcvar_num(grencam) <= 0 || is_user_bot(id)) return PLUGIN_CONTINUE     if(get_pcvar_num(smokecam) <= 0 && grentype == 9) return PLUGIN_CONTINUE     if(grenid <= 0)     {         isgren[id] = false         return PLUGIN_CONTINUE     }     isgren[id] = true     whosgren[id] = grenid     attach_view(id,grenid)     return PLUGIN_CONTINUE } public client_PreThink(id){     if(!isgren[id]) return PLUGIN_CONTINUE     if(!is_valid_ent(whosgren[id]))     {         isgren[id] = false         attach_view(id,id)         whosgren[id] = 0         return PLUGIN_CONTINUE     }     new Float:angles[3]     entity_get_vector(id,EV_VEC_v_angle,angles)     new Float:setvel[3]     velocity_by_aim(id,get_speed(whosgren[id]),setvel)     if(get_pcvar_num(gravgren))     {         new Float:vel[3]         entity_get_vector(whosgren[id],EV_VEC_velocity,vel)         setvel[2] = vel[2]     }     entity_set_vector(whosgren[id],EV_VEC_velocity,setvel)     entity_set_vector(whosgren[id],EV_VEC_angles,angles)     return PLUGIN_CONTINUE }
__________________
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
Ramono
Veteran Member
Join Date: Nov 2005
Location: Netherlands
Old 04-28-2006 , 19:34  
Reply With Quote #8

Its done, but what is the big difference between cvar_num and pcvar_num?
__________________
Um, hi.
Ramono is offline
Batman/Gorlag
Senior Member
Join Date: Aug 2005
Old 04-28-2006 , 19:45  
Reply With Quote #9

Using get_pcvar_num is much faster than get_cvar_num. That's the difference.
__________________
GRR If only the amxmod programming were in Java.....
Java and C used to be two different languages, now Java is turning into another C. My logevent plugin
Batman/Gorlag is offline
seoulxkorean
Member
Join Date: Apr 2006
Old 04-29-2006 , 20:56  
Reply With Quote #10

i tested this but i get stuck in the gren cam just using the HE grenade =(
seoulxkorean is offline
Reply


Thread Tools
Display Modes

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 04:45.


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