AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [TF2] Binoculars (https://forums.alliedmods.net/showthread.php?t=326274)

Mr_panica 07-24-2020 18:49

[TF2] Binoculars
 
3 Attachment(s)
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

https://forums.alliedmods.net/image-...6f776e2e706e67

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

enderandrew 07-24-2020 21:43

Re: [TF2] Binoculars
 
1 Attachment(s)
Quote:

Originally Posted by Mr_panica (Post 2711550)
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.


Mr_panica 07-25-2020 02:39

Re: [TF2] Binoculars
 
Quote:

Originally Posted by enderandrew (Post 2711563)
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 (Post 2711563)
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.

enderandrew 07-28-2020 01:42

Re: [TF2] Binoculars
 
The overlay files are downloading on every map change. Is there a way to make sure they only download once?


All times are GMT -4. The time now is 09:41.

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