Raised This Month: $59 Target: $400
 14% 

Drop Nightvision Goggles


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Fun Stuff        Approver:   Exolent[jNr] (178)
tuty
Veteran Member
Join Date: Jul 2008
Location: Romania
Old 03-23-2009 , 13:39   Drop Nightvision Goggles
Reply With Quote #1

Drop Nightvision Goggles
Version 3.1






Description:

- Well, because a drop defuserkit exists, i decided to made a plugin to drop the Nightvision Goggles. With this plugin you can drop the Nightvision Goggles!
- If you have NVG Goggles turned ON, and you drop the NVG Goggles, automatically the NVG will be turned OFF.
- If you have Nightvision Goggles and you die, you lose Nightvision on floor and someone can pickup your Nightvision Goggles.


Commands:

- dropnvg bind <key> dropnvg - to drop the Nightvision Goggles


Cvars:

- drop_nvg - 1 - enable / 0 - disable the plugin
- drop_nvg_hud - 1 - enable / 0 - disable the information hud on join
- drop_nvg_on_death - 1 - enable / 0 - disable the drop nvg on death


Modules:

- fakemeta
- i used this module instead of cstrike because cs_set_user_nvg and cs_get_user_nvg natives wont work correctly, and i have some errors.


Credits:

-
ConnorMcLeod
- arkshine
- kalin
- Costin83


P.S:

- this is the last plugin for the next 2 months
- i forgot something and now i updated the plugin! All persons, please retranslate the version. Added a new print.. sorry
- added a new model, thanks
Costin83
- put the w_nvg.mdl in models/ dir.


Images:


[IMG]http://img195.**************/img195/1795/nvg1.th.png[/IMG] [IMG]http://img11.**************/img11/9151/nvg2.th.png[/IMG]




Attached Files
File Type: zip models.zip (41.4 KB, 895 views)
File Type: txt dropnvg.txt (2.1 KB, 619 views)
File Type: sma Get Plugin or Get Source (dropnvg.sma - 1856 views - 7.5 KB)
__________________
All my lifetime work is there (includin private big ass plugins and stuff) https://github.com/tutyamxx


Last edited by tuty; 08-23-2009 at 22:38.
tuty is offline
Send a message via ICQ to tuty Send a message via AIM to tuty
KadiR
Unnecessary Member
Join Date: Aug 2008
Location: Zürich / Switzerland
Old 03-23-2009 , 14:21   Re: Drop Nightvision Goggles
Reply With Quote #2

nice plugin

german translation ;) :

Quote:
[de]
CANNOT_DROP_NVG = Du kannst keine NVG fallen lassen, da das Plugin ausgeschaltet ist!
MUST_BE_ALIVE = Du musst leben um eine NVG fallen zu lassen!
DONT_HAVE_NVG = Du hast keine NVG zum Fallen lassen!
PICK_UP_NVG = Du hast eine NVG aufgenommen!
NVG_ON_FLOOR = Du hast die NVG fallen lassen!
INFO_HUD_NVG = Auf diesem Server kannst du NVGs fallen lassen!^nSchreibe in Konsole bind ^"taste^" dropnvg und drueck diese Taste zum Fallen lassen!
KadiR is offline
Nextra
Veteran Member
Join Date: Apr 2008
Location: Germany
Old 03-23-2009 , 14:22   Re: Drop Nightvision Goggles
Reply With Quote #3

Nice idea and well done, but I think I'd go crazy with too many NVG around

Anyway, here are some things you could change:

- Directly use floats in fm_set_rendering. No reason to convert afterwards?
- fm_remove_nvg uses engfung to emit sound, you could do that with the emit_sound native like you did before.
- Maybe play the nvg on and off sound in fm_set_user_nvg (or do you not have to? just an idea..)
__________________
In Flames we trust!
Nextra is offline
tuty
Veteran Member
Join Date: Jul 2008
Location: Romania
Old 03-23-2009 , 14:25   Re: Drop Nightvision Goggles
Reply With Quote #4

Code:
- fm_remove_nvg uses engfung to emit sound, you could do that with the emit_sound native like you did before.
lol thanks

Code:
- Maybe play the nvg on and off sound in fm_set_user_nvg (or do you not have to? just an idea..)
nope, because the nvg sound on/off is played only when you turn on/off the nvg with 'N' key
__________________
All my lifetime work is there (includin private big ass plugins and stuff) https://github.com/tutyamxx


Last edited by tuty; 03-23-2009 at 14:44.
tuty is offline
Send a message via ICQ to tuty Send a message via AIM to tuty
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 03-23-2009 , 14:43   Re: Drop Nightvision Goggles
Reply With Quote #5

Hi. Some suggestions.

- You could use cstrike, most of people use it, and would more efficient. Using fakemeta for that is not a benifit.
- Cache the value of engfunc( EngFunc_AllocString, "info_target"
- I would use Ham_Touch with "info_target" ; it would be more efficent and there will be less call.
- nvgent = -1; <= You can use FM_NULLENT , it's more readable. This define already exists.
- EngFunc_RemoveEntity ; I would use use FL_KILLME to let the engine decide the right moment.
Arkshine is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 03-23-2009 , 14:50   Re: Drop Nightvision Goggles
Reply With Quote #6

Quote:
Originally Posted by arkshine View Post
Hi. Some suggestions.

- You could use cstrike, most of people use it, and would more efficient. Using fakemeta for that is not a benifit.
This conversion includes a fix, see -link-
Code is confusing though.
__________________
- tired and retired -

Last edited by ConnorMcLeod; 03-23-2009 at 14:56.
ConnorMcLeod is offline
Speed!
BANNED
Join Date: Jan 2009
Old 03-23-2009 , 14:59   Re: Drop Nightvision Goggles
Reply With Quote #7

Instead of having to bind a key, why not using actual "drop" bind?
Speed! is offline
tuty
Veteran Member
Join Date: Jul 2008
Location: Romania
Old 03-23-2009 , 15:01   Re: Drop Nightvision Goggles
Reply With Quote #8

where? on knife slot? i dont think so because if some servers has player drop the money active, this plugin will block the drop money command... i think is ok in this way
__________________
All my lifetime work is there (includin private big ass plugins and stuff) https://github.com/tutyamxx

tuty is offline
Send a message via ICQ to tuty Send a message via AIM to tuty
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 03-23-2009 , 15:05   Re: Drop Nightvision Goggles
Reply With Quote #9

He could add emit_sound() after the cstrike native.
Arkshine is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 03-23-2009 , 15:09   Re: Drop Nightvision Goggles
Reply With Quote #10

The fix is when the user has his NVG turned on and you remove it : send a NVG msg off + emit_sound, so emit_sound itself is not really the fix.
If you use cstrike native when NVG is turned on, the green screen stay on and the player can't disabled it.

Tuty you just forgot to drop nvg when a player dies
__________________
- tired and retired -
ConnorMcLeod 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 15:51.


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