Monthly Target: $400 Donations: $147
 36% 

[ANY] Binoculars


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Franc1sco
Veteran Member
Join Date: Oct 2010
Location: Spain (Madrid)
Plugin ID:
2972
Plugin Version:
3.0
Plugin Category:
Fun Stuff
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
    4 
    Plugin Description:
    Allows you to use binoculars with !binoculars command in chat.
    Old 05-26-2012 , 18:07   [ANY] Binoculars
    Reply With Quote #1

    Current Version: 3.0


    Description:

    Allows you to use binoculars with !binoculars command in chat.


    Cvars:
    Put in server.cfg
    Code:
    sm_binoculars_zoom "15" // zoom level for binoculars.
    
    sm_binoculars_shots 0  // Allow or disallow shots while using binoculars. 1 = allow. 0 = disallow.
    
    sm_binoculars_adminflag 0 // Admin flag required to use binoculars. 0 = No flag needed.

    Commands:

    sm_binoculars - Use binoculars.

    You can bind this commands, for example:

    bind p sm_binoculars


    Enjoy!


    Last version views: 196


    Donations (optional):

    If you apreciate my work, you can donate me via paypal or with a trade offer


    Download:

    Main repository
    Direct download
    Code changes
    __________________
    Veteran SM scripter -> Donations
    Taking paid requests -> Add me in Steam or Telegram

    I can help to large european communities for free.

    Last edited by Franc1sco; 12-20-2015 at 10:46. Reason: fb given
    Franc1sco is offline
    Send a message via MSN to Franc1sco Send a message via Skype™ to Franc1sco
    MasterOfTheXP
    Veteran Member
    Join Date: Aug 2011
    Location: Cloudbank
    Old 05-26-2012 , 19:48   Re: [ANY] Binoculars
    Reply With Quote #2

    Using FOV for makeshift binoculars...clever. Veeeery clever.

    Perhaps add an override so only clients with a certain flag can use it.
    __________________
    Plugins / My Steam / TF2 Sandbox (plugin beta testing!)
    MasterOfTheXP is offline
    Fearts
    ferts of daeth
    Join Date: Oct 2008
    Old 05-27-2012 , 00:15   Re: [ANY] Binoculars
    Reply With Quote #3

    Cool stuff
    __________________
    Fearts is offline
    Sevi_FyA
    Member
    Join Date: Jul 2011
    Location: Seville
    Old 05-27-2012 , 04:28   Re: [ANY] Binoculars
    Reply With Quote #4

    Esto lo tengo que probar Francisco

    Edit: Lo he probado Francisco en mi server y prefiero que no se pueda disparar cuando esta activado los prismaticos, sino creo yo que deja de ser prismaticos para ser Zoom de armas

    Last edited by Sevi_FyA; 05-27-2012 at 05:04.
    Sevi_FyA is offline
    Franc1sco
    Veteran Member
    Join Date: Oct 2010
    Location: Spain (Madrid)
    Old 05-27-2012 , 07:40   Re: [ANY] Binoculars
    Reply With Quote #5

    Testing new version:

    -new cvar: sm_binoculars_shots 0 - Allow or disallow shots while using binoculars. 1 = allow. 0 = disallow.

    -new cvar: sm_binoculars_adminflag 0 - Admin flag required to use binoculars. 0 = No flag needed.


    Please, test it and tell me if this works fine for put in the first post


    Edit: now tested, use the attached of first post
    Attached Files
    File Type: sp Get Plugin or Get Source (binoculars.sp - 220 views - 2.7 KB)
    __________________
    Veteran SM scripter -> Donations
    Taking paid requests -> Add me in Steam or Telegram

    I can help to large european communities for free.

    Last edited by Franc1sco; 05-27-2012 at 09:51.
    Franc1sco is offline
    Send a message via MSN to Franc1sco Send a message via Skype™ to Franc1sco
    Franc1sco
    Veteran Member
    Join Date: Oct 2010
    Location: Spain (Madrid)
    Old 05-27-2012 , 09:48   Re: [ANY] Binoculars
    Reply With Quote #6

    New version 2.0

    -new cvar: sm_binoculars_shots 0 - Allow or disallow shots while using binoculars. 1 = allow. 0 = disallow.

    -new cvar: sm_binoculars_adminflag 0 - Admin flag required to use binoculars. 0 = No flag needed.

    -bug fixeds
    __________________
    Veteran SM scripter -> Donations
    Taking paid requests -> Add me in Steam or Telegram

    I can help to large european communities for free.

    Last edited by Franc1sco; 05-27-2012 at 09:48.
    Franc1sco is offline
    Send a message via MSN to Franc1sco Send a message via Skype™ to Franc1sco
    Franc1sco
    Veteran Member
    Join Date: Oct 2010
    Location: Spain (Madrid)
    Old 05-27-2012 , 14:17   Re: [ANY] Binoculars
    Reply With Quote #7

    New version 2.1

    -Bug fixed (found that 0 is also normal IFOV vision )
    __________________
    Veteran SM scripter -> Donations
    Taking paid requests -> Add me in Steam or Telegram

    I can help to large european communities for free.

    Last edited by Franc1sco; 05-27-2012 at 14:18.
    Franc1sco is offline
    Send a message via MSN to Franc1sco Send a message via Skype™ to Franc1sco
    Zephyrus
    Cool Pig B)
    Join Date: Jun 2010
    Location: Hungary
    Old 05-27-2012 , 15:23   Re: [ANY] Binoculars
    Reply With Quote #8

    you should add a nice overlay to simulate an actual binocular and it will be even more awesome
    __________________
    Taking private C++/PHP/SourcePawn requests, PM me.
    Zephyrus is offline
    Franc1sco
    Veteran Member
    Join Date: Oct 2010
    Location: Spain (Madrid)
    Old 05-27-2012 , 17:01   Re: [ANY] Binoculars
    Reply With Quote #9

    Quote:
    Originally Posted by Zephyrus View Post
    you should add a nice overlay to simulate an actual binocular and it will be even more awesome
    Yes, already they asked me, then I will try to add good overlay

    btw, proposals are supported for overlays
    __________________
    Veteran SM scripter -> Donations
    Taking paid requests -> Add me in Steam or Telegram

    I can help to large european communities for free.
    Franc1sco is offline
    Send a message via MSN to Franc1sco Send a message via Skype™ to Franc1sco
    Calystos
    Member
    Join Date: Jan 2011
    Location: Terra
    Old 05-28-2012 , 07:04   Re: [ANY] Binoculars
    Reply With Quote #10

    This won't work on Nuclear Dawn as there is no "weapon_zoom" event to hook into (though it does exist in the "nucleardawn/modevents.res" file, under "cstrikeevents" list, but not in the "nucleardawn/resource/ModEvents.res"). Though there are of course some sorta event along that path since there are sniper scope weapons ingame (ironsights I think). Not sure what its alternate name is on ND. Am looking into it when I get a bit more time though, less someone beats me to it, ;)

    EDIT: Long as the weapon_zoom hook is ignored/disabled this does work on ND, Though it does ignore the binoculars/attack ignore setting (it spams chat with you can't attack messages but still shoots).

    Quick hack attached for ND users, will ignore weapon_zoom event hook. Its a dirty hack but least it works on ND,
    Oh an all I did was change the hook line to the following:
    Code:
        new String:modname[30];
        GetGameFolderName(modname, sizeof(modname));
        if (!StrEqual(modname, "nucleardawn", false))
        {
             HookEvent("weapon_zoom", EventWeaponZoom);
        }
    EDIT: Found another glitch, when (in ND this obviously) you right-click to use normal weapons zoom scope (if it has one) and shoot, it spams chat with you can't attack while using binoculars text too. Am guessing it'll be sorted if we can find out what ND uses instead of "weapon_zoom" as the event name.

    EDIT: Just had the same problem of no "weapon_zoom" in TF2 also btw.
    Attached Files
    File Type: sp Get Plugin or Get Source (binoculars.sp - 245 views - 3.0 KB)

    Last edited by Calystos; 05-28-2012 at 08:32.
    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
    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 12:48.


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