Raised This Month: $51 Target: $400
 12% 

[ANY] Binoculars


Post New Thread Reply   
 
Thread Tools Display Modes
loranger
Senior Member
Join Date: Jun 2011
Old 06-16-2012 , 16:41   Re: [ANY] Binoculars
Reply With Quote #11

anyone got it working with tf2?

It says in console: unknown command sm_binoculars
loranger is offline
Calystos
Member
Join Date: Jan 2011
Location: Terra
Old 06-28-2012 , 01:17   Re: [ANY] Binoculars
Reply With Quote #12

I managed to get some workarounds sorta working in TF2 & ND, but haven't had the time to fully work at it yet.

I say sort of working, it spams chat with errors if you try to fire when using the binoculars. But it DOES work other than that. Least, it did when I was testing it on ND. And since TF2 has the same issue it should work on TF2 too. Since both appear to be missing the same functions that this plugin by default was using.

Will look further into it when I get more time.
Calystos is offline
Send a message via ICQ to Calystos Send a message via AIM to Calystos Send a message via MSN to Calystos Send a message via Yahoo to Calystos Send a message via Skype™ to Calystos
RedSword
SourceMod Plugin Approver
Join Date: Mar 2006
Location: Quebec, Canada
Old 01-21-2013 , 19:52   Re: [ANY] Binoculars
Reply With Quote #13

Hi there,

I can't approve this for the following reason :
  • You're putting your plugin as [ANY], but you're hooking weapon_zoom, which doesn't exist in all mods, which generates errors on mods such as DODS. Either hook it in predefined mods (checking game folders) or try creating such an event and check if != INVALID_HANDLE to hook it.

Also, your code could get some change (note those are recommendations) :
  • Use tabs or spaces, not both.
  • Rather than hardcoding default FOV to 90, take the one that the client has before zooming/using binoculars. TF2 allows the user to choose its own FOV, which mess up your "Prismaticos" code (i.e. default 75 --> 90 = ...)
  • Remove FCVAR_REPLICATED from version ConVar.
  • Add minimum FOV ConVar value.

Red
__________________
My plugins :
Red Maze
Afk Bomb
RAWR (per player/rounds Awp Restrict.)
Kill Assist
Be Medic

You can also Donate if you appreciate my work
RedSword is offline
Franc1sco
Veteran Member
Join Date: Oct 2010
Location: Spain (Madrid)
Old 01-21-2013 , 20:17   Re: [ANY] Binoculars
Reply With Quote #14

Quote:
Originally Posted by RedSword View Post
Hi there,

I can't approve this for the following reason :
  • You're putting your plugin as [ANY], but you're hooking weapon_zoom, which doesn't exist in all mods, which generates errors on mods such as DODS. Either hook it in predefined mods (checking game folders) or try creating such an event and check if != INVALID_HANDLE to hook it.

Also, your code could get some change (note those are recommendations) :
  • Use tabs or spaces, not both.
  • Rather than hardcoding default FOV to 90, take the one that the client has before zooming/using binoculars. TF2 allows the user to choose its own FOV, which mess up your "Prismaticos" code (i.e. default 75 --> 90 = ...)
  • Remove FCVAR_REPLICATED from version ConVar.
  • Add minimum FOV ConVar value.

Red
ok I will look it
__________________
Veteran Coder -> Activity channel
Coding on CS2 and taking paid and free jobs.

Contact: Steam, Telegram or discord ( franug ).

You like my work? +Rep in my steam profile comments or donate.


Last edited by Franc1sco; 01-21-2013 at 20:31.
Franc1sco is offline
Send a message via MSN to Franc1sco
DarthNinja
SourceMod Plugin Approver
Join Date: Mar 2009
Location: PreThinkHook()
Old 01-22-2013 , 12:00   Re: [ANY] Binoculars
Reply With Quote #15

Quote:
Originally Posted by RedSword View Post
  • Either hook it in predefined mods (checking game folders) or try creating such an event and check if != INVALID_HANDLE to hook it.
HookEventEx exists for a reason.
__________________
DarthNinja is offline
RedSword
SourceMod Plugin Approver
Join Date: Mar 2006
Location: Quebec, Canada
Old 01-22-2013 , 12:06   Re: [ANY] Binoculars
Reply With Quote #16

Quote:
Originally Posted by DarthNinja View Post
HookEventEx exists for a reason.
:$

That too :$.
__________________
My plugins :
Red Maze
Afk Bomb
RAWR (per player/rounds Awp Restrict.)
Kill Assist
Be Medic

You can also Donate if you appreciate my work

Last edited by RedSword; 01-22-2013 at 12:07.
RedSword is offline
Franc1sco
Veteran Member
Join Date: Oct 2010
Location: Spain (Madrid)
Old 01-22-2013 , 14:48   Re: [ANY] Binoculars
Reply With Quote #17

Quote:
Originally Posted by RedSword View Post
Hi there,

I can't approve this for the following reason :
  • You're putting your plugin as [ANY], but you're hooking weapon_zoom, which doesn't exist in all mods, which generates errors on mods such as DODS. Either hook it in predefined mods (checking game folders) or try creating such an event and check if != INVALID_HANDLE to hook it.

Also, your code could get some change (note those are recommendations) :
  • Use tabs or spaces, not both.
  • Rather than hardcoding default FOV to 90, take the one that the client has before zooming/using binoculars. TF2 allows the user to choose its own FOV, which mess up your "Prismaticos" code (i.e. default 75 --> 90 = ...)
  • Remove FCVAR_REPLICATED from version ConVar.
  • Add minimum FOV ConVar value.

Red

Ok I think that already everything is done.


New version v3.0

-bugfixeds y optimized for approval
__________________
Veteran Coder -> Activity channel
Coding on CS2 and taking paid and free jobs.

Contact: Steam, Telegram or discord ( franug ).

You like my work? +Rep in my steam profile comments or donate.

Franc1sco is offline
Send a message via MSN to Franc1sco
Groger
Veteran Member
Join Date: Oct 2009
Location: Belgium
Old 01-22-2013 , 16:00   Re: [ANY] Binoculars v3
Reply With Quote #18

Cheers, using it as a donate benefit. Nice little extra for our donators

Thx again
Groger is offline
RedSword
SourceMod Plugin Approver
Join Date: Mar 2006
Location: Quebec, Canada
Old 01-22-2013 , 16:20   Re: [ANY] Binoculars v3
Reply With Quote #19

Something I overlooked; you should check that the client that uses sm_binoculars isn't 0; it causes an error when called in server console.

Also why keep both plugins in first post ?
__________________
My plugins :
Red Maze
Afk Bomb
RAWR (per player/rounds Awp Restrict.)
Kill Assist
Be Medic

You can also Donate if you appreciate my work

Last edited by RedSword; 01-22-2013 at 16:21.
RedSword is offline
Franc1sco
Veteran Member
Join Date: Oct 2010
Location: Spain (Madrid)
Old 01-22-2013 , 16:27   Re: [ANY] Binoculars v3
Reply With Quote #20

Quote:
Originally Posted by RedSword View Post
Something I overlooked; you should check that the client that uses sm_binoculars isn't 0; it causes an error when called in server console.

Also why keep both plugins in first post ?
Fixed
__________________
Veteran Coder -> Activity channel
Coding on CS2 and taking paid and free jobs.

Contact: Steam, Telegram or discord ( franug ).

You like my work? +Rep in my steam profile comments or donate.

Franc1sco is offline
Send a message via MSN to Franc1sco
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 07:38.


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