Raised This Month: $32 Target: $400
 8% 

[TF2] Binoculars


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Mr_panica
Senior Member
Join Date: Jan 2017
Location: Russia, Saint-Petersburg
Plugin ID:
7221
Plugin Version:
3.0TF
Plugin Category:
Gameplay
Plugin Game:
Team Fortress 2
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Binoculars TF2 edition.
    Old 07-24-2020 , 18:49   [TF2] Binoculars
    Reply With Quote #1

    Binoculars for tf2 server.

    Original plugin:
    https://forums.alliedmods.net/showth...31#post2711531

    This plugin is required (to compile and use)
    https://forums.alliedmods.net/showth...44#post2711544



    I'm not a very good programmer.
    But I remade this plugin for myself.

    Major changes:
    1. Now, if sm_binoculars_shots = 0, then you will switch to melee weapons, but you will be able to hit.

    2. The plugin now has an overlay.

    3. The plugin remembers the face mode.?
    But he forcibly switches you to the first person when you turn on the binoculars.

    4. The plugin blocks taunts and transition to 3rd person (when using binoculars).
    (Yes, maybe it was done clumsily: D)

    Commands:
    Code:
    sm_binoculars =
    sm_bino =
    Equip / remove binoculars.
    Installation:
    Load the "overlay" folder into the /materials directory
    Load the "binoculars.smx" into the /plugins directory
    Attached Files
    File Type: zip overlay.zip (329.1 KB, 119 views)
    File Type: sp Get Plugin or Get Source (binoculars.sp - 140 views - 5.5 KB)
    File Type: smx binoculars.smx (5.8 KB, 109 views)
    __________________
    Sorry for my English.

    Last edited by Mr_panica; 07-25-2020 at 03:15.
    Mr_panica is offline
    enderandrew
    Senior Member
    Join Date: Jun 2020
    Old 07-24-2020 , 21:43   Re: [TF2] Binoculars
    Reply With Quote #2

    Quote:
    Originally Posted by Mr_panica View Post
    Load the "overlay" folder into the /plugins directory
    Load the "binoculars.smx" into the /materials directory
    I assumed the overlay folder needed to go in the materials folder. The code seems to reference the files being in materials/overlay.

    Here is a new syntax version, though the plugin compiles with two warnings:

    Code:
    SourcePawn Compiler 1.11.0.6599
    Copyright (c) 1997-2006 ITB CompuPhase
    Copyright (c) 2004-2018 AlliedModders LLC
    
    binoculars.sp(158) : warning 209: function "SetBino" should return a value
    binoculars.sp(171) : warning 209: function "UnsetBino" should return a value
    Code size:             7540 bytes
    Data size:             4260 bytes
    Stack/heap size:      16384 bytes
    Total requirements:   28184 bytes
    
    2 Warnings.
    Attached Files
    File Type: sp Get Plugin or Get Source (binoculars.sp - 76 views - 5.5 KB)
    enderandrew is offline
    Mr_panica
    Senior Member
    Join Date: Jan 2017
    Location: Russia, Saint-Petersburg
    Old 07-25-2020 , 02:39   Re: [TF2] Binoculars
    Reply With Quote #3

    Quote:
    Originally Posted by enderandrew View Post
    I assumed the overlay folder needed to go in the materials folder. The code seems to reference the files being in materials/overlay.
    Heh, weird mistake.
    Yes, fixed)

    Quote:
    Originally Posted by enderandrew View Post
    Here is a new syntax version, though the plugin compiles with two warnings:

    Code:
    SourcePawn Compiler 1.11.0.6599
    Copyright (c) 1997-2006 ITB CompuPhase
    Copyright (c) 2004-2018 AlliedModders LLC
    
    binoculars.sp(158) : warning 209: function "SetBino" should return a value
    binoculars.sp(171) : warning 209: function "UnsetBino" should return a value
    Code size:             7540 bytes
    Data size:             4260 bytes
    Stack/heap size:      16384 bytes
    Total requirements:   28184 bytes
    
    2 Warnings.

    Thanks for the new syntax)
    Compiles without warnings on stable SM.
    __________________
    Sorry for my English.

    Last edited by Mr_panica; 07-25-2020 at 03:17.
    Mr_panica is offline
    enderandrew
    Senior Member
    Join Date: Jun 2020
    Old 07-28-2020 , 01:42   Re: [TF2] Binoculars
    Reply With Quote #4

    The overlay files are downloading on every map change. Is there a way to make sure they only download once?
    enderandrew 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 02:12.


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