01-12-2012, 12:16
(01-12-2012, 11:56)makavel Wrote: Hi
How to make the default fov 90 on the server??
Hello,
Need to wait for @Nukem to release update for addon
|
Release FOV Plugin
|
|
01-12-2012, 12:16
(01-12-2012, 11:56)makavel Wrote: Hi Hello, Need to wait for @Nukem to release update for addon
01-14-2012, 17:24
Here is my Version of the FoV Plugin.
If a Player sets his FoV, it saves in sv_config. If he connects the next time to the server, he has his FoV from beginning. Requires @Nukem's dedicated server addon V1.190+ PHP Code: using System;
using Addon;
namespace Fov
{
public class FoV : CPlugin
{
public override void OnServerLoad()
{
ServerPrint("\n FoVPlugin loaded \n Edited by Bob \n Created by zxz0O0");
}
public override void OnPlayerConnect(ServerClient Client)
{
string fov = GetServerCFG("FoV", Client.XUID , "");
if (!(GetServerCFG("FoV", Client.XUID, "") == ""))
setdata(Client, fov);
}
void savedata(String xuid, String fov)
{
SetServerCFG("FoV", xuid, fov);
}
void setdata(ServerClient Client,String fov)
{
SetClientDvar(Client.ClientNum, "cg_fov \" "+ fov + "\"");
SetClientDvar(Client.ClientNum, "cg_fovscale \"1\"");
}
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)
{
if (Convert.ToInt32(split[1]) <= 90 && Convert.ToInt32(split[1]) > 80)
{
Int32 fov = Convert.ToInt32(split[1]);
float fovscale = (float)fov / 80;
SetClientDvar(Client.ClientNum, "cg_fov \" 80 \"");
SetClientDvar(Client.ClientNum, "cg_fovscale \"" + fovscale + "\"");
savedata(Client.XUID, Convert.ToString(fov));
}
else
{
SetClientDvar(Client.ClientNum, "cg_fov \"" + split[1] + "\"");
SetClientDvar(Client.ClientNum, "cg_fovscale \"1\"");
savedata(Client.XUID, split[1]);
}
TellClient(Client.ClientNum, "PM: FOV changed and saved 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.ChatContinue;
}
}
}
01-14-2012, 17:35
(01-14-2012, 17:24)masterbob Wrote: Here is my Version of the FoV Plugin. Good job, that's what I wanted to add. Though I would have used another file (not sv_config.ini)
02-14-2012, 11:40
fov 90 is not working, it will reset when server loads the map ( i.e new round in Search and destroy)
02-14-2012, 12:48
(02-14-2012, 11:40)RuneRuler Wrote: fov 90 is not working, it will reset when server loads the map ( i.e new round in Search and destroy) Blame the game.
02-15-2012, 00:30
02-20-2012, 19:25
!fov command dont work for me
running last Nukem addon
02-20-2012, 19:52
(02-20-2012, 19:25)xcondex Wrote: !fov command dont work for me It works for me. You either have other plugins installed or Server Addon doesn't run.
02-26-2012, 03:20
fixed in TG 2.6 - fov 90 for all.
04-12-2012, 08:12
I know this post is old, but incase anyone is wondering this still works.
|
| Possibly Related Threads… | |||||
| Thread | Author | Replies | Views | Last Post | |
|
|
Plugin with !ban !kick and !tampban | clemi555 | 3 | 6,491 |
11-09-2013, 09:21 Last Post: clemi555 |
| AntiNoScope Plugin | clemi555 | 5 | 7,589 |
11-08-2013, 19:13 Last Post: clemi555 |
|
| [Release] Bunker Plugin 1.3 | archit | 68 | 55,804 |
10-30-2013, 11:59 Last Post: clacki |
|
| Help Modifying plugin | maverigh | 5 | 7,643 |
10-19-2013, 10:29 Last Post: Nekochan |
|
|
|
[Request] Switch plugin | axel-le-meilleur | 6 | 8,295 |
10-19-2013, 06:59 Last Post: iRoNinja |
| [Release] Yurio Map Plugin | Yurio | 101 | 82,036 |
09-26-2013, 13:38 Last Post: First_Semyon |
|
|
|
[Release] v1.1 ChangeMap/NextMap Plugin without any configuration | milchshake | 23 | 25,156 |
09-23-2013, 13:18 Last Post: SgtLegend |
| Help !say Plugin (like the !say from GodPlugin) | Hallla | 0 | 3,654 |
09-13-2013, 09:31 Last Post: Hallla |
|
|
|
[Release] MW3: Random Weapon Plugin V1 | Nekochan | 50 | 44,650 |
09-11-2013, 15:11 Last Post: EnVi Sweden Rocks |
| Search Plugin Fluid Killcam | N3xT_974 | 1 | 3,974 |
09-10-2013, 20:27 Last Post: Nekochan |
|
| Users browsing this thread: |
| 1 Guest(s) |