Release FOV Plugin
#11
(01-08-2012, 15:31)fallensouls Wrote: This does not work correctly, when you use the command it changes the FOV, however it also changes so when you ADS it does not zoom in. This is a problem with snipers. I think its because you used cg_fovmin instead of cg_fov.

EDIT: Just tested, this is a edited properly working version:

Code:
using System; using Addon; namespace MW3_FOV { public class zxz_FOVPlugin : CPlugin { public override void OnServerLoad() { ServerPrint("\n FOV Plugin loaded \n Author: zxz0O0 \n Thanks to Nukem, Jariz, Pozzuh\n"); } public override ChatType OnSay(string Message, ServerClient Client) { if (Message.StartsWith("!fov")) { string[] split = Message.Split(' '); try { int num; bool isNum = int.TryParse(split[1], out num); if (split.Length == 2 && isNum) { if (Convert.ToInt32(split[1]) <= 90 && Convert.ToInt32(split[1]) >= 65) { SetClientDvar(Client.ClientNum, "cg_fov \"" + split[1] + "\""); TellClient(Client.ClientNum, "PM: FOV changed to " + split[1] + ", default value is 65", true); } else TellClient(Client.ClientNum, "PM: Invalid parameter. Usage: !fov <fov 65-90>", true); return ChatType.ChatNone; } } catch { } TellClient(Client.ClientNum, "PM: Invalid parameter. Usage: !fov <fov 65-90>", true); return ChatType.ChatNone; } return ChatType.ChatAll; } } }
Are you sure? When I tested it cg_fov dvar didn't work.
[Image: azuw.jpg]

#12
(01-08-2012, 17:40)zxz0O0 Wrote:
(01-08-2012, 15:31)fallensouls Wrote: This does not work correctly, when you use the command it changes the FOV, however it also changes so when you ADS it does not zoom in. This is a problem with snipers. I think its because you used cg_fovmin instead of cg_fov.

EDIT: Just tested, this is a edited properly working version:

Code:
using System; using Addon; namespace MW3_FOV { public class zxz_FOVPlugin : CPlugin { public override void OnServerLoad() { ServerPrint("\n FOV Plugin loaded \n Author: zxz0O0 \n Thanks to Nukem, Jariz, Pozzuh\n"); } public override ChatType OnSay(string Message, ServerClient Client) { if (Message.StartsWith("!fov")) { string[] split = Message.Split(' '); try { int num; bool isNum = int.TryParse(split[1], out num); if (split.Length == 2 && isNum) { if (Convert.ToInt32(split[1]) <= 90 && Convert.ToInt32(split[1]) >= 65) { SetClientDvar(Client.ClientNum, "cg_fov \"" + split[1] + "\""); TellClient(Client.ClientNum, "PM: FOV changed to " + split[1] + ", default value is 65", true); } else TellClient(Client.ClientNum, "PM: Invalid parameter. Usage: !fov <fov 65-90>", true); return ChatType.ChatNone; } } catch { } TellClient(Client.ClientNum, "PM: Invalid parameter. Usage: !fov <fov 65-90>", true); return ChatType.ChatNone; } return ChatType.ChatAll; } } }
Are you sure? When I tested it cg_fov dvar didn't work.

This will indeed give problems with the sniper zoom, cg_fov should work because @JariZ used it with his old plugin
(08-10-2011, 12:58)Pozzuh Wrote:
Se7en Wrote:Stealed, from cod4 mod ...
look who's talking

[Release] Old School Mod v2.2
[Release] Scroll menu


#13
I want forced FOV!

#14
(01-08-2012, 17:51)jariz Wrote: I want forced FOV!

how can we force it if we have no onPlayerConnect / onPlayerSpawned :/
[Image: MaEIQ.png]

#15
(01-08-2012, 17:44)iAegle Wrote: This will indeed give problems with the sniper zoom, cg_fov should work because @JariZ used it with his old plugin
Ok cg_fov works. Just not up to 90.
[Image: azuw.jpg]

#16
It does work.. up till cg_fov 80..

cg_fov 90 is out of bounds, you can get fov to 90 by doing cg_fov 80 and cg_fovscale 1.125. (1.125 * 80 = 90)

edit: zxz ninja edited lol
[Image: MaEIQ.png]

#17
Thanks @fallensouls and @Pozzuh, FOV 90 should now work
[Image: azuw.jpg]

#18
Do not use ChatType.ChatAll, change this to ChatType.ChatContinue
ChatType.ChatAll may use the last plugin (but even better to use ChatType.ChatGame)

#19
(01-08-2012, 18:58)Yurio Wrote: Do not use ChatType.ChatAll, change this to ChatType.ChatContinue
ChatType.ChatAll may use the last plugin (but even better to use ChatType.ChatGame)

ChatType.ChatAll is basically ChatType.ChatContinue and ChatType.ChatGame together.
[Image: azuw.jpg]

#20
(01-08-2012, 19:03)zxz0O0 Wrote: ChatType.ChatAll is basically ChatType.ChatContinue and ChatType.ChatGame together.

That is true but it still poses a problem.
Say someone is using your plugin and then another (ex. PM Manager)

Someone in the chat types:
Code:
!pm lalal some message
Usually that would not be seen by anyone else, but since your plugin uses ChatType.ChatAll it will force that to be shown in the chat.

I'd advise to use ChatType.ChatContinue
[Image: b_560_95_1.png]



Possibly Related Threads…
Thread Author Replies Views Last Post
Rainbow [Release] Plugin ReservedSlot v1.3 frst_ 1 5,028 11-08-2018, 19:17
Last Post: frst_
Tongue [Release] MW3 Shop plugin Dude 56 51,547 03-25-2018, 05:18
Last Post: [email protected]
  [Release] Permission plugin Pozzuh 202 164,887 05-01-2017, 15:41
Last Post: W4R||The Hyper
  [Release] FIXED SPEED PLUGIN hillbilly 2 5,685 06-02-2016, 20:23
Last Post: clacki
  [Release] Bots Plugin For Users Casper 22 39,994 08-22-2015, 17:45
Last Post: SnapBacks
  [Release] God Plugin v5.0 [Ingame Rcon Tool] OzonE 464 337,849 06-27-2015, 15:38
Last Post: bluedot
  [Release] Anti Hardscope Plugin 8q4s8 26 27,771 06-20-2015, 22:44
Last Post: urj88419
  [Release] ProMod Plugin zxz0O0 875 765,558 03-25-2015, 22:02
Last Post: kris
  [Release] [Discontinued] Speed Plugin Pozzuh 164 122,860 10-06-2014, 12:56
Last Post: Nekochan
  [help]how create a ping plugin clacki 3 5,125 09-13-2014, 01:23
Last Post: clacki

Forum Jump:


Users browsing this thread:
2 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2026 Melroy van den Berg.