[MW3] Server Addons [Update 08.02.2012] | #1 | |
Join Date: Mar 2010 Posts: 220 |
Hey Leute, hier werden ausschließlich Plugins für MW3 Server gepostet. What can you do with this plugin: - Clients can set clientdvars - Safe and autoload the dvars when joining the server again - No ammo warning - No red crosshair - FilmTweak Presets - No ViewBob Current version: v1.7 Requirements: @"Nukem"'s dedicated server addon V1.206+ sv_config.ini entries: This plugin is using the section called DVARS with these variables: -CompetitiveMod If this is set to 1, the other options won't work. It will use the default variables. If you set it to 0, players will be notified. For league you must set to 1! (default 1) -forceClientDvars Force clientdvars when client connects (default none) -forbiddenClientDvars Forbid clients changing dvars (default none) -AllowFPSUnlock Set to 0 if you don't want people to set their maxFPS to 0 (default 0) -ThrowbackEnabled Enable throwback of grenades and pickup throwing knife (default 0) -SentryEnabled Enable using sentires (Example: Bakaara chopper) (default 0) TEXT Code:
Enable saving of clientdvars: If you want to save the dvars a client sets you need to create a folder called "dvar" in the folder addon (addon\dvar). For each client there will be a xml file (named with client's xuid) and when he connects again it will load the variables he set. If the folder does not exist, dvars won't save. Available commands: TEXT Code:
The plugin should load the dvars when the player connects but some dvars (like cg_fovscale) reset when player joins team. So you either need to type the dvars again or use !load to load all dvars again. Note: maxfps can only be set up to 100. But since we can set it to 0 you can go over 100. There is an option to forbid players chaning fps to 0 though. Also if you want no fx (smoke in bakara, rain, ambient sound etc.) you will have to do fast_restart after setting !clientsideeffects to 0! Pictures: [spoiler="Original:"] [/spoiler] [spoiler="No smoke in bakaara:"] [/spoiler] [spoiler="Teamcolors:"] [/spoiler] [spoiler="FilmtweakPreset 0 (original):"] [/spoiler] [spoiler="FilmtweakPreset 1:"] [/spoiler] [spoiler="FilmtweakPreset 2:"] [/spoiler] [spoiler="FilmtweakPreset 3:"] [/spoiler] [spoiler="FilmtweakPreset 4:"] [/spoiler] [spoiler="FilmtweakPreset 5:"] [/spoiler][/spoiler] How to use: Download the MW3_ProMod.zip file from attachement and put the MW3_ProMod.dll in your plugins folder. I recommend to use the sv_config.ini I added in the zip. Changelog: v1.0: Initial release - Renamed plugin to ProMod Plugin - Fixed and optimized code TEXT Code:
- Disabled "No Ammo" text - Disabled Grenade Throwback - Fixed FOV changing on round start Sets the following dvars: TEXT Code:
- Most code rewritten - Optimized and fixed - Added command !resetpromod - Added command !clientsideeffects - Added sort of security for forceClientDvars - Added option ThrowbackEnabled (see sv_config.ini entries) - Added FilmTweakPresets 1-5 (see pictures) - Added command !scoreboardItemHeight - Disabled ViewBob - Added option to enable sentries (Ex. Bakaara chopper) - Removed red crosshair - Changed team color (scoreboard, killfeed, chat) (see pictures) - Teamnames changed to Attack/Defense - Added option CompetitiveMod - Added aliases for !ftweakpreset (!filmtweak, !ftweak, !ft) - Disabled enemy crosshairnames - Added new filmtweakpreset 6 - Removed !cl_maxpackets (forced to 100) If you want me to add more dvars please give suggestions. But not all dvars work, some are cheat protected. Thanks zxz.. And thanks very much to @ninjadx and @makavel for beta testing!! __________________ |
|
TreffNix is offline |
using System; using System.Collections.Generic; using System.Text; using AdminPlugin; using Addon; namespace TestPlugin { //Since the AdminPlugin derives from CPlugin, //you only have to derive from AdminPlugin.Admin to call functions from both classes public class Test : Admin { public override void OnServerLoad() { //Load the admin.cfg and initialize all admins LoadAdmins(); ServerPrint("TestPlugin loaded."); } //This Function is called AFTER AdminPlugin checked the message for admin related commands public override ChatType OnSayAfterAP(string Message, ServerClient Client) { //Check if the Message starts with an command and check if the client is a admin if (Message.StartsWith("!") && isAdmin(Client)) { //Get the ServerAdmin object representing the admin ServerAdmin admin = GetAdminFromClient(Client); //Simply check if the admin is allowed to use the command if (admin.allowedToUse(Message.Split(' ')[0])) { TellClient(Client.ClientNum, "You are allowed to use this command.",true); } else { TellClient(Client.ClientNum, "You are not allowed to use this command.", true); } return ChatType.ChatNone; } else return ChatType.ChatContinue; } } }