OldSchoolHack

Register / Login English

[MW3] Server Addons [Update 08.02.2012]


icon [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)

Spoiler
TEXT Code:
  1. [DVARS]
  2. CompetitiveMod=0
  3. forceClientDvars=cg_fov "80",cg_fovscale "1.125"
  4. forbiddenClientDvars=r_fog,r_detail
  5. AllowFPSUnlock=1
  6. ThrowbackEnabled=1
  7. SentryEnabled=0
You need to use the same format as in my example.

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:
  1. !ragdoll //Enable/disable ragdoll
  2. !cg_brass //Enable/disable shell ejection
  3. !snaps
  4. !r_distortion //Enable/disable distortion from weapons, explosions etc
  5. !cl_packetdup //Packet duplicates
  6. !pingtext //cg_scoreboardPingText
  7. !maxfps //com_maxfps
  8. !r_fog //Enable/disable fog
  9. !fov //Change FoV
  10. !wayPointSize //Size of WayPoints like [A] [B] [BOMB] etc.
  11. !compassObjectiveSize //Size of WayPoints on compass
  12. !removeConfig //Delete your saved config
  13. !load //Manually load saved dvars
  14. !help //Display all available commands
  15. -------------------------------------------
  16. !dynEnt_Active //Enable/disable dynamic environment (shoot computer etc.)
  17. !fx_drawClouds //Enable/disable weather (snow, rain, etc.)
  18. !corpseCount //Number of AI corpses
  19. !fastSkin //cache skin
  20. !r_detail //draw weapon skin, car skin etc.
  21. !dlightlimit //r_dlightlimit
  22.  
  23. !ftweakEnable //Enable/disable FilmTweak
  24. !ftweakDesaturation
  25. !ftweakLightTint
  26. !ftweakDarkTint
  27. !ftweakContrast
  28. !ftweakBrightness
  29. -------------------------------------------
  30. !promod //see changelog v1.2 to see what it does
  31. -------------------------------------------
  32. !resetpromod //resets the commands set by !promod
  33. !clientsideeffects //Enable/disable loading of _fx files (ambient sound, map smoke etc.) needs fast_restart after setting (!)
  34. !r_normalmap //Change between Flat/default (Flat has less details)
  35. -------------------------------------------
  36. !ftweakPreset alias !filmtweak alias !ftweak alias !ft //Choose between 6 filmtweak presets (see pictures)
  37. !scoreboardItemHeight //change item height in scoreboard

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.
http://img6.imageshack.us/img6/461/mw3fps.png
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
[spoiler="Original:"]
http://img834.imageshack.us/img834/5199/2012012000002.jpg
[spoiler="After using commands:"]
http://img337.imageshack.us/img337/7194/2012012000001t.jpg[/spoiler]

[spoiler="No smoke in bakaara:"]
http://img191.imageshack.us/img191/6580/2012013100001.jpg[/spoiler]

[spoiler="Teamcolors:"]
http://img840.imageshack.us/img840/7903/teamcolors.jpg[/spoiler]

[spoiler="FilmtweakPreset 0 (original):"]
http://img337.imageshack.us/img337/5210/ftweakpreset0.jpg[/spoiler]

[spoiler="FilmtweakPreset 1:"]
http://img857.imageshack.us/img857/4546/ftweakpreset1.jpg[/spoiler]

[spoiler="FilmtweakPreset 2:"]
http://img822.imageshack.us/img822/9359/ftweakpreset2.jpg[/spoiler]

[spoiler="FilmtweakPreset 3:"]
http://img815.imageshack.us/img815/5775/ftweakpreset3.jpg[/spoiler]

[spoiler="FilmtweakPreset 4:"]
http://img816.imageshack.us/img816/66/ftweakpreset4.jpg[/spoiler]

[spoiler="FilmtweakPreset 5:"]
http://img215.imageshack.us/img215/9695/ftweakpreset5.jpg[/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
Spoiler

- Renamed plugin to ProMod Plugin
- Fixed and optimized code
Spoiler

TEXT Code:
  1. !dynEnt_Active
  2. !fx_drawClouds
  3. !corpseCount
  4. !fastSkin
  5. !r_detail
  6. !dlightlimit
  7. !ftweakEnable
  8. !ftweakDesaturation
  9. !ftweakLightTint
  10. !ftweakDarkTint
  11. !ftweakContrast
  12. !ftweakBrightness
  13.  
- Added sv_config option "AllowFPSUnlock" see above for explanation
Spoiler

- Disabled "No Ammo" text
- Disabled Grenade Throwback
- Fixed FOV changing on round start
Spoiler

Sets the following dvars:
TEXT Code:
  1.  
  2. cg_fov 80
  3. cl_maxpackets 100
  4. r_fog 0
  5. fx_drawclouds 0
  6. r_distortion 0
  7. r_dlightlimit 0
  8. cg_brass 0
  9. snaps 30
  10. com_maxfps 100
  11. cg_scoreboardpingtext 1
  12. waypointIconWidth 13
  13. waypointIconHeight 13
  14. r_filmUseTweaks 1
  15. r_FilmTweakEnable 1
  16. r_filmTweakBrightness 0.2
Spoiler

- Most code rewritten
- Optimized and fixed
- Added command !resetpromod
- Added command !clientsideeffects
Spoiler

- 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)
Spoiler

- 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!!



http://no-haking.square7.ch/images/wbb3-header-logo.png


__________________

http://no-haking.square7.ch/images/wbb3-header-logo.png
icon #2

Join Date: Mar 2010

Posts: 220

AdminPlugin
Idea:
Plugins using commands which depend on admin checks, currently don't have many options on working with admin functionality.
The Idea was to give Plugin developers more freedom on using admins by simplyfying that and extending the abilitys of the addon.dll.

General Features:
- Classes which derive from AdminPlugin get all features from the addon + the additional admin features
- seperated admin.cfg (autogenerated with admin-examples if the admin.cfg is missing)

Command Features:
- !admins (list the names of all admins)
- !addadmin <name> <xuid> (simply add a admin)
- !reloadadmins (if you edit the admin.cfg file while the server is still running, you can call this command to update the admin table)

Classes:
- ServerAdmin (Class which holds information of an admin, similar to ServerClient)
- Admin (Main Class holding the AdminPlugin Features)

ServerAdmin Functions:
- allowedToUse(command) Check if the admin is allowed to use the command
- isImmuneToCmd(command) Check if the admin is immun against the command

Admin Functions:
- LoadAdmins() loads the admin.cfg and initializes all admins
- GetAdmins() returns a list of ServerAdmins representing the admins defined in the admin.cfg
- GetAdminFromClient(ServerClient) returns the Admin-Information of the Client
- AddAdmin(name, xuid) add a new admin (which is also added in the admin.cfg)
- isAdmin(ServerClient) check if the client is a admin
- OnSayAfterAP(Message, ServerClient) this overrideable function is called after the AdminPlugin checked for admin related commands
- The OnSay Function is sealed inside the AdminPlugin to ensure that derived classes don't get the event before the AdminPlugin

Because i limit the usage of the AdminPlugin for derived classes only and sealing the OnSay Function, i ensure that AdminPlugin comes first regardless of the Plugin-Names.

Additional Information:
- the admin.cfg file is saved under admin\admin.cfg
- just make a derived project, start the server and run loadAdmins() to generate the default admin.cfg

Changelog:
- v0.1.1 Beta | initial release

Requirements:
- @Nukem's Server Addon v1.190+

Usage:
To Use the AdminPlugin, you have to set it as a reference in your Project.
This is a simple Example how to use my Plugin:

Spoiler
TEXT Code:
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. using AdminPlugin;
  5. using Addon;
  6.  
  7. namespace TestPlugin
  8. {
  9. //Since the AdminPlugin derives from CPlugin,
  10. //you only have to derive from AdminPlugin.Admin to call functions from both classes
  11. public class Test : Admin
  12. {
  13. public override void OnServerLoad()
  14. {
  15. //Load the admin.cfg and initialize all admins
  16. LoadAdmins();
  17. ServerPrint("TestPlugin loaded.");
  18. }
  19.  
  20. //This Function is called AFTER AdminPlugin checked the message for admin related commands
  21. public override ChatType OnSayAfterAP(string Message, ServerClient Client)
  22. {
  23. //Check if the Message starts with an command and check if the client is a admin
  24. if (Message.StartsWith("!") && isAdmin(Client))
  25. {
  26. //Get the ServerAdmin object representing the admin
  27. ServerAdmin admin = GetAdminFromClient(Client);
  28.  
  29. //Simply check if the admin is allowed to use the command
  30. if (admin.allowedToUse(Message.Split(' ')[0]))
  31. {
  32. TellClient(Client.ClientNum, "You are allowed to use this command.",true);
  33. }
  34. else
  35. {
  36. TellClient(Client.ClientNum, "You are not allowed to use this command.", true);
  37. }
  38. return ChatType.ChatNone;
  39. }
  40. else
  41. return ChatType.ChatContinue;
  42. }
  43. }
  44. }

This Version is Beta and yet not tested on Linux.
EDIT: I'm currently installing a Linux virtual machine and mw3-server to test the AdminPlugin on Linux.

I hope there are some developers willing to try my Plugin ^^

http://www.abload.de/img/download_buttoncouux.png

Only registered and activated users can see links.



http://no-haking.square7.ch/images/wbb3-header-logo.png

__________________

http://no-haking.square7.ch/images/wbb3-header-logo.png
icon #3

Join Date: Mar 2010

Posts: 220

Ingame RCON tool [Version 0.5.0]

Hey guys,
A few days ago I started coding a plugin for the MW3 server addon by Nukem (check the correct thread for more info) and am posting it here. This is my first plugin and very much a work in progress, so if you encounter any bugs or have any feature requests, please let me know.

If you encounter any bugs, please tell me what triggered it and if it always happens. Any 'Stupid plugin no work' posts will be ignored if they dont contain any proper info.
Bugs can also be reported on http://94.75.245.138/forum/viewtopic.php...=447#p4288
That thread also contains a mirror to the most up to date plugin

Current version: 0.5.0 BETA
Using the !warn command without a playername will crash the server, dont have time to fix it until tuesday, in the mean time don't issue warn without a playername *Runs off ashamed*

Current features:
-Kick by clientname or number
-Ban by clientname or number
-Yell (Say somethin on a players HUD)
-Playerinfo, Displays clientID, XUID, number of warnings, and name
-Basic permissions support
-Fast restart
-Warn and unwarn
-Kick on set warnings number
-Remember warnings on player disconnect
-Xuid command accesible for every user
-Addadmin command ingame
-Warning abbreviations, i.e. !warn player l will result in Bad Language
-Language filter
-Rcon command (i.e !rcon map mp_dome) (iAegle's idea )
-Tempban (currently uses the sv_kickbantime parameter in the config file, not variable :/)
-Ping commands added
-PM Support
-Rules support (can be set up in sv_config using the variable pmRules true to pm the rules, false to broadcast to the server)
-Help command
-Define which commands are accesible to users
-Time to live for warnings (can be defined in sv_config using the variable warningTTL = time in hours)
-Reload configs on the fly (except for usercommands atm, will ERASE all current warnings)

Todo:
-Player connect messages
-Customizable text
-Review all methods for potential crashes
-(maybe) Multiple usergroups
-Immunity
-Switch maplist
-Command Aliases
-Customizable warnings trigger (i.e You hacker! --> warned for whining about hacking)
(All custom map control features are on hold until i figure out a viable way to do it)

Usage:
!help - Shows this list
!kick [Playername] (reason) - Kicks a player with optional reason
!ban [Playername] - Bans the player permanently
!banc [clientnumber] - Same as ban but with clientnumber
!kickc [clientnumber] (reason) - Kicks a player with optional reason
!tmpban [playername] (reason) - Tempban a player, ength is the time in sv_config.ini
!pm [Playername] [message] - Pm's the player with [message]
!ping (playername) - Displays the ping of (playername) or you is no playername is given
!maxping - Displays the player with the highest ping
!minping - Displays the player with the lowest ping
!pi [Playername] - Displays the players name, xuid, warnings, and clientnumber
!yell [Playername or all] [Message] - Displays message on the players hud
!warn [Playername] (reason) - Warns a player
!unwarn [Playername] (reason) - Removes a player's warning
!ver - Displays this plugin's version
!xuid - Displays your player XUID
!rcon [Command] - Executes [command] in the console
!resetconf - Resets the configuration to the defaults
!rel - Reloads all configs
!addadmin [Playername] - Adds player to the admin group
!addword [Word] (word) (word) etc. - Adds the word(s) to the language filter
!fastrestart - Quickly restart the map
if permissions is used:
!addadmin (part of) playername

If language filter is used:
!addword [badword] [badword] etc.

Disabling permissions:
set usepermissions in sv_config.ini to false
Disabling language filter:
set uselangfilter in sv_config.ini to false
Setting the warnings until kick:
set kickwarnigns to the number you want
First time setup:
Add your own XUID and name to the admins file in the serveradmin folder
(format: [XUID] [Name])
run !resetconf
restart the server

Changelog per 20-01-2012:
Made !ping take optional [playername] parameter
Fixed the crashes pesaregoloo was having (Note to self: uncomment any code you want in the release i.e user input checks xD)
Set the default value of resetconf to false for langfilter and permissions
Added rules support
Added pm support
Added !help command
Added basic dynamic config reload
Added override for usercommands
Warnings now are cleared after a certain time

Changelog per 19-01-2012:
Added ping commands
Made warning reasons case-insensitive
Fixed !ver not working with disabled built-in permissions

Changelog per 18-01-2012:
Fixed a potential crash (error handling might be a good idea  )
Added tempban command
Kick command no longer tempbans players

Changelog per 17-01-2012:
Removed pass variable in sv_config.ini since it was unused
Added language filter
Added !rcon command
Made commands case insensitive
Warnings now also work if the OnPlayerConnect event is not passed

Changelog per 16-01-2012:
Added warnings, supports warning abbreviations such as l for language
Moved the textfiles to serveradmin folder
Fixed a potential permissions exploit that would allow ignoring admin permissions
Added a !ver command that displays the version of the plugin
Fixed crash when trying to add someone that already is an admin
Replaced !reg by addadmin, this is safer than a default password
Reads variables from the sv_config.ini file

The permissions plugin is meant as a temporary solution until Pozzuh gets his to work properly on linux

Virusscan result [Version 0.5.0 BETA]:

MD5: 34dec7c47bc25029aa0017017e16574a

http://www.abload.de/img/download_buttoncouux.png

Only registered and activated users can see links.


http://no-haking.square7.ch/images/wbb3-header-logo.png

__________________

http://no-haking.square7.ch/images/wbb3-header-logo.png
icon #4

Join Date: Mar 2010

Posts: 220

Rules plugin v2

blablabla say !rules to see the rules blabla

Updates/features
- C#
- It PMs users the rules now, don't want this?
Add this to sv_config.ini and change it

TEXT Code:
  1. [RULES]
  2. pm=yes

- Change rules in addonules.txt
- Comes with free bananas

http://i.imgur.com/834vg.png

TEXT Code:
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using Addon;
  6. using System.IO;
  7.  
  8. namespace Rules
  9. {
  10. public class Rules : CPlugin
  11. {
  12. string[] rules = { "" };
  13. public override void OnServerLoad()
  14. {
  15. pm = GetServerCFG("RULES", "pm", "yes");
  16. rules = File.ReadAllLines("addon\ules.txt");
  17. ServerPrint("ohai. Rules v2 loaded");
  18. }
  19. string pm = string.Empty;
  20. public override ChatType OnSay(string Message, ServerClient Client)
  21. {
  22. if (Message.StartsWith("!rules"))
  23. {
  24. foreach (string rule in rules)
  25. if (pm == "yes")
  26. {
  27. foreach (ServerClient pl in GetClients())
  28. {
  29. TellClient(pl.ClientNum, rule, true);
  30. }
  31. }
  32. else
  33. ServerSay(rule, true);
  34. return ChatType.ChatNone;
  35. }
  36. return ChatType.ChatAll;
  37. }
  38. }
  39. }

http://www.abload.de/img/download_buttoncouux.png

Only registered and activated users can see links.


http://no-haking.square7.ch/images/wbb3-header-logo.png

__________________

http://no-haking.square7.ch/images/wbb3-header-logo.png
icon #5

Join Date: Mar 2010

Posts: 220

Unlimited ammo
Simply enables unlimited ammo.
Attachment at the bottom of the post

TEXT Code:
  1. using System;
  2. using System.Runtime.InteropServices;
  3. using System.Security;
  4. using Addon;
  5.  
  6. //Compile with /unsafe
  7. //And a reference to "addon/dist/addon.dll"
  8.  
  9. namespace unlimited_ammo
  10. {
  11. public class Program : CPlugin
  12. {
  13. [DllImport("kernel32.dll",SetLastError = true)]
  14. public static extern bool WriteProcessMemory(IntPtr hProcess, int lpBaseAddress, byte[] lpBuffer, int nSize, out int lpNumberOfBytesWritten);
  15.  
  16. unsafe public override void OnServerLoad()
  17. {
  18. ServerPrint("Plugin: Unlimited ammo by Nukem loaded.");
  19.  
  20. int dwout = 0;
  21. byte[] bytes = { 0x90, 0x90, 0x90, 0x90 };
  22.  
  23. WriteProcessMemory(((IntPtr)(-1)), 0x0042C6D2, bytes, 0x4, out dwout);
  24. }
  25.  
  26. }
  27. }



http://no-haking.square7.ch/images/wbb3-header-logo.png

__________________

http://no-haking.square7.ch/images/wbb3-header-logo.png
icon #6

Join Date: Mar 2010

Posts: 220

Ingame RCON tool [Version 0.5.5]
Hey guys,
A few days ago I started coding a plugin for the MW3 server addon by Nukem (check the correct thread for more info) and am posting it here. This is my first plugin and very much a work in progress, so if you encounter any bugs or have any feature requests, please let me know.

If you encounter any bugs, please tell me what triggered it and if it always happens. Any 'Stupid plugin no work' posts will be ignored if they dont contain any proper info.
Bugs can also be reported on http://94.75.245.138/forum/viewtopic.php...=447#p4288
That thread also contains a mirror to the most up to date plugin

Current version: 0.5.5 BETA

Current features:
-Kick by clientname or number
-Ban by clientname or number
-Yell (Say somethin on a players HUD)
-Playerinfo, Displays clientID, XUID, number of warnings, and name
-Basic permissions support
-Fast restart
-Warn and unwarn
-Kick on set warnings number
-Remember warnings on player disconnect
-Xuid command accesible for every user
-Addadmin command ingame
-Warning abbreviations, i.e. !warn player l will result in Bad Language
-Language filter
-Rcon command (i.e !rcon map mp_dome) (iAegle's idea )
-Tempban (currently uses the sv_kickbantime parameter in the config file, not variable :/)
-Ping commands added
-PM Support
-Rules support (can be set up in sv_config using the variable pmRules true to pm the rules, false to broadcast to the server)
-Help command
-Define which commands are accesible to users
-Time to live for warnings (can be defined in sv_config using the variable warningTTL = time in hours)
-Reload configs on the fly (except for usercommands atm, will ERASE all current warnings)

Todo:
-Player connect messages
-Customizable text
-(maybe) Multiple usergroups
-Immunity
-Switch maplist
-Command Aliases
-Customizable warnings trigger (i.e You hacker! --> warned for whining about hacking)
(All custom map control features are on hold until i figure out a viable way to do it)

Usage:
!help - Shows this list
!kick [Playername] (reason) - Kicks a player with optional reason
!ban [Playername] - Bans the player permanently
!banc [clientnumber] - Same as ban but with clientnumber
!kickc [clientnumber] (reason) - Kicks a player with optional reason
!tmpban [playername] (reason) - Tempban a player, ength is the time in sv_config.ini
!pm [Playername] [message] - Pm's the player with [message]
!ping (playername) - Displays the ping of (playername) or you is no playername is given
!maxping - Displays the player with the highest ping
!minping - Displays the player with the lowest ping
!pi [Playername] - Displays the players name, xuid, warnings, and clientnumber
!yell [Playername or all] [Message] - Displays message on the players hud
!warn [Playername] (reason) - Warns a player
!unwarn [Playername] (reason) - Removes a player's warning
!ver - Displays this plugin's version
!xuid - Displays your player XUID
!rcon [Command] - Executes [command] in the console
!resetconf - Resets the configuration to the defaults
!rel - Reloads all configs
!addadmin [Playername] - Adds player to the admin group
!addword [Word] (word) (word) etc. - Adds the word(s) to the language filter
!fastrestart - Quickly restart the map
if permissions is used:
!addadmin (part of) playername

If language filter is used:
!addword [badword] [badword] etc.

Disabling permissions:
set usepermissions in sv_config.ini to false
Disabling language filter:
set uselangfilter in sv_config.ini to false
Setting the warnings until kick:
set kickwarnigns to the number you want
First time setup:
Add your own XUID and name to the admins file in the serveradmin folder
(format: [XUID] [Name])
run !resetconf
restart the server

Changelog per 27-01-2012:
Commented and reorganized a large portion of the code
Made the plugin much more stable, it should not crash anymore on any invalid or missing input, files, etc.
Added a proper readme
Moved the changelog to a seperate text file, the most recent changelog can be found in this thread as well.

The permissions plugin is meant as a temporary solution until Pozzuh gets his to work properly on linux

Virusscan result [Version 0.5.5 BETA]:
https://www.virustotal.com/file/6db7c2ba...327683630/
MD5: 09641386e306c8cc688bc8aac7c180aa

External download: http://94.75.245.138/plugins/ServerAdmin.rar


Thanks to nukem for his AWESOME addon

http://no-haking.square7.ch/images/wbb3-header-logo.png



__________________

http://no-haking.square7.ch/images/wbb3-header-logo.png
icon #7

Join Date: Mar 2010

Posts: 220

[align=center]UPDATED[/align]
MW3 Addon Plugin Pack 1

This was a pack based on @jariz code, I recreated(recoded) this pack for the newest version of MW3 server addon :awesome:


How to install?
Copy the DLL to MW3 Server\plugins

Sourcecode
  1. This code is supposed to be used to help you start creating your own plugin, so re-rereleasing any of this code without a significant change is strictly forbidden
  2. When used, my credits must be included
  3. Have fun coding!


Requirements


This pack includes
  • FOV
    Changes FOV and FOVscale for every client in the server,
    fov defaults to 80, fovscale to 1.0
    Add this to addon\sv_config.ini in order to use a custom value for the fov amount:
    TEXT Code:
    1.  
    2. [FOV]
    3. fov=80
    4. fovscale=1.125
    5.  
    Where '80' is your amount of FOV and '1.125' your FOVscale offcourse
  • Welcomer
    Says 'Everybody welcome PLAYERNAME to the server!'
    Don't know how it's useful, just makes your server looks awesome i think
  • PlayerLog
    Logs all players who connect to the server in addon\logs\player.log
    It logs: Client ID, Name, XUID and Ping (at time of connection)
    Useful if you want to report someone or just find out who connected to your server.


Credits
-@Tylerd86(Coding)
- @jariz (Orginal codes and coding)
- @Nukem (Addon)

Plugin source code
Spoiler

Welcomer
TEXT Code:
  1. using System;
  2. using Addon;
  3.  
  4. namespace plugin_test
  5. {
  6. public class plugin_test : CPlugin
  7. {
  8. public override void OnServerLoad()
  9. {
  10. ServerPrint("Welcomer plugin by Tylerd86 loaded!");
  11. }
  12.  
  13. public override void OnPlayerConnect(ServerClient Client)
  14. {
  15. ServerSay("^7Welcomer: ^2Everyone welcome ^3" + Client.Name + " ^2to the server!", true);
  16. }
  17. }
  18. }
Fov
TEXT Code:
  1. using System;
  2. using Addon;
  3.  
  4. namespace fov
  5. {
  6. public class fov : CPlugin
  7. {
  8. public override void OnServerLoad()
  9. {
  10. ServerPrint("Fov plugin loaded! by Tylerd86 & JariZ");
  11. }
  12.  
  13. public override void OnPlayerConnect(ServerClient Client)
  14. {
  15. SetClientDvar(Client.ClientNum, string.Format("cg_fov \"{0}\"", GetServerCFG("FOV", "fov", "80")));
  16. SetClientDvar(Client.ClientNum, string.Format("cg_fovscale \"{0}\"", GetServerCFG("FOV", "fovscale", "1.125")));
  17. }
  18. }
  19. }
PlayerLog
TEXT Code:
  1. using System;
  2. using Addon;
  3. using System.IO;
  4.  
  5. namespace PlayerLog
  6. {
  7. public class PlayerLog : CPlugin
  8. {
  9. string logpath = "addon\\logs\\player.log";
  10. public override void OnServerLoad()
  11. {
  12. ServerPrint("PlayerLog loaded! by Tylerd86 & JariZ :D");
  13. }
  14.  
  15. void writeCollumns()
  16. {
  17. StreamWriter rw = new StreamWriter(logpath, false);
  18. rw.WriteLine("NUM NAME XUID RATE PING");
  19. rw.Close();
  20. }
  21.  
  22. public override void OnPlayerConnect(ServerClient Client)
  23. {
  24. try
  25. {
  26. if (File.Exists(logpath))
  27. {
  28. writeCollumns();
  29. if (File.ReadAllText(logpath) == string.Empty)
  30. writeCollumns();
  31. }
  32. StreamWriter sr = new StreamWriter(logpath, true);
  33. sr.WriteLine(Client.ClientNum + " " + Client.Name + " " + Client.XUID + " " + Client.Rate + " " + Client.Ping);
  34. sr.Close();
  35. }
  36. catch (Exception z) { ServerPrint("[PLAYERLOG] " + z.ToString()); }
  37. }
  38. }
  39. }

__________________

http://no-haking.square7.ch/images/wbb3-header-logo.png
icon #8

Join Date: Mar 2010

Posts: 220

Hi people, this is my first shit coded-compiled EVER. This is not much useful, but im happy releasing something
Also report bugs and   +rep   will help my reputation
EDIT: YOU NEED THE Pozzuh's ADMIN PLUGIN OR ALL PEOPLE WILL BE ABLE TO CHANGE IT
New version now out! Use !setupxp at the first time you use this version!
Usage:
TEXT Code:
  1.  
  2. !setupxp <= Use this at first time!!!
  3. !xp [Number Optional] <= XP Per Kill
  4. !hxp [Number Optional] <= XP Per HeadShot
  5. !sxp [Number Optional] <= XP Per Suicide
  6.  
Example:

!hxp <= This will show how many XP do you get per HeadShot.
             
!sxp 1000 <= You will get 1000 XP per suicide.

Source Code:
TEXT Code:
  1.  
  2. using Addon;
  3. using System;
  4. using System.IO;
  5. namespace xpmanager
  6. {
  7. public class xpmanagerclass : CPlugin
  8. {
  9. public override void OnServerLoad()
  10. {
  11. ServerPrint("XP Manager V1.75 Loaded Successfully. Author: slipknotignacio");
  12. }
  13. public override ChatType OnSay(string Message, ServerClient Client)
  14. {
  15. if (Message.StartsWith("!setupxp"))
  16. {
  17. if (GetDvar("scr_dm_score_kill") == "")
  18. {
  19. string[] files = Directory.GetFiles(Directory.GetCurrentDirectory(), "*.cfg");
  20. string Path = Directory.GetCurrentDirectory() + "/admin/server.cfg";
  21. foreach (string file in files)
  22. if (file.ToLower().EndsWith("server.cfg"))
  23. Path = file;
  24. string text = File.ReadAllText(Path) +
  25. "\nseta scr_dm_score_kill \"100\"";
  26. File.WriteAllText(Path, text);
  27. TellClient(Client.ClientNum, "Kill XP fixed. You need to restart the map.", true);
  28. }
  29. else
  30. {
  31. TellClient(Client.ClientNum, "You dont need to setup Kill XP. Its OK.", true);
  32. }
  33. if (GetDvar("scr_dm_score_headshot") == "")
  34. {
  35. string[] files = Directory.GetFiles(Directory.GetCurrentDirectory(), "*.cfg");
  36. string Path = Directory.GetCurrentDirectory() + "/admin/server.cfg";
  37. foreach (string file in files)
  38. if (file.ToLower().EndsWith("server.cfg"))
  39. Path = file;
  40. string text = File.ReadAllText(Path) +
  41. "\nseta scr_dm_score_headshot \"100\"";
  42. File.WriteAllText(Path, text);
  43. TellClient(Client.ClientNum, "HeadShot XP fixed. You need to restart the map.", true);
  44. }
  45. else
  46. {
  47. TellClient(Client.ClientNum, "You dont need to setup HeadShot XP. Its OK.", true);
  48. }
  49. if (GetDvar("scr_dm_score_suicide") == "")
  50. {
  51. string[] files = Directory.GetFiles(Directory.GetCurrentDirectory(), "*.cfg");
  52. string Path = Directory.GetCurrentDirectory() + "/admin/server.cfg";
  53. foreach (string file in files)
  54. if (file.ToLower().EndsWith("server.cfg"))
  55. Path = file;
  56. string text = File.ReadAllText(Path) +
  57. "\nseta scr_dm_score_suicide \"0\"";
  58. File.WriteAllText(Path, text);
  59. TellClient(Client.ClientNum, "Suicide XP fixed. You need to restart the map.", true);
  60. }
  61. else
  62. {
  63. TellClient(Client.ClientNum, "You dont need to setup Suicide XP. Its OK.", true);
  64. }
  65. return ChatType.ChatNone;
  66. }
  67. string lowMsg = Message.ToLower();
  68. if (lowMsg.StartsWith("!xp"))
  69. {
  70. string[] splitMsg = lowMsg.Split(' ');
  71. String xp = GetDvar("scr_dm_score_kill");
  72. if (splitMsg.Length == 1)
  73. TellClient(Client.ClientNum, "^1Your Current Kill XP Is: " + xp, true);
  74. else
  75. {
  76. try
  77. {
  78. int NewXPValue = Convert.ToInt32(splitMsg[1]);
  79. string qxp = NewXPValue.ToString();
  80. SetDvar("scr_dm_score_kill", qxp);
  81. TellClient(Client.ClientNum, "^1Kill XP Changed To: " + NewXPValue, true);
  82. }
  83. catch (Exception e)
  84. {
  85. TellClient(Client.ClientNum, "^1Invalid Kill XP Value!", true);
  86. }
  87. }
  88. return ChatType.ChatNone;
  89. }
  90.  
  91. if (lowMsg.StartsWith("!hxp"))
  92. {
  93. string[] splitMsg = lowMsg.Split(' ');
  94. String hxp = GetDvar("scr_dm_score_headshot");
  95. if (splitMsg.Length == 1)
  96. TellClient(Client.ClientNum, "^1Your Current HeadShot XP Is: " + hxp, true);
  97. else
  98. {
  99. try
  100. {
  101. int NewHXPValue = Convert.ToInt32(splitMsg[1]);
  102. string qhxp = NewHXPValue.ToString();
  103. SetDvar("scr_dm_score_headshot", qhxp);
  104. TellClient(Client.ClientNum, "^1HeadShot XP Changed To: " + NewHXPValue, true);
  105. }
  106. catch (Exception e)
  107. {
  108. TellClient(Client.ClientNum, "^1Invalid HeadShot XP Value!", true);
  109. }
  110. }
  111. return ChatType.ChatNone;
  112. }
  113.  
  114. if (lowMsg.StartsWith("!sxp"))
  115. {
  116. string[] splitMsg = lowMsg.Split(' ');
  117. String sxp = GetDvar("scr_dm_score_suicide");
  118. if (splitMsg.Length == 1)
  119. TellClient(Client.ClientNum, "^1Your Current Suicide XP Is: " + sxp, true);
  120. else
  121. {
  122. try
  123. {
  124. int NewSuicideXPValue = Convert.ToInt32(splitMsg[1]);
  125. string qsxp = NewSuicideXPValue.ToString();
  126. SetDvar("scr_dm_score_suicide", qsxp);
  127. TellClient(Client.ClientNum, "^1Suicide XP Changed To: " + NewSuicideXPValue, true);
  128. }
  129. catch (Exception e)
  130. {
  131. TellClient(Client.ClientNum, "^1Invalid Suicide XP Value!", true);
  132. }
  133. }
  134. return ChatType.ChatNone;
  135. }
  136. return ChatType.ChatContinue;
  137. }
  138. }
  139. }
  140.  

Changelog V1.75
TEXT Code:
  1.  
  2. Fixed major bug when the commands doesnt work if you dont have already set the values in your server.cfg
  3. Code optimized
  4.  

Changelog V1.00
TEXT Code:
  1.  
  2. Initial Release
  3.  

Credits:
Me => Obvious
Users of ItsMods => To Releasing their source code and I studied it
Pozzuh and iAegle => For the big help

Virus Scan: Only registered and activated users can see links.

MD5: 9AB2204C6BBDAED70E87275A7F265764

__________________

http://no-haking.square7.ch/images/wbb3-header-logo.png
icon #9

Join Date: Jan 2012

Posts: 17

wollte mal fragen wie man denn source code wie z.B
TEXT Code:
  1.  
  2. using System;
  3. using Addon;
  4.  
  5. namespace plugin_test
  6. {
  7. public class plugin_test : CPlugin
  8. {
  9. public override void OnServerLoad()
  10. {
  11. ServerPrint("Welcomer plugin by Tylerd86 loaded!");
  12. }
  13.  
  14. public override void OnPlayerConnect(ServerClient Client)
  15. {
  16. ServerSay("^7Welcomer: ^2Everyone welcome ^3" + Client.Name + " ^2to the server!", true);
  17. }
  18. }
  19. }
  20.  


in eine dll programieren kann
sorry bin da noch ziemlich neu auf dem gebiet
bin für jede hilfreiche antwort dankbar
icon #10

Join Date: Mar 2010

Posts: 220

Mit diesem tool geht es ganz einfach

I made fine ( useless ) my first program, which allowes you make plugins easier ( also who wants to make plugins )


How to use:
1) Open program
2) Wait untill checking will done
3) Type Plugin name ( with .dll )
4) BUG-FIX: Choose all events, then uncheck all ....
5) Choose event on which you want to do stuff
6) You can use example "chat" thing, or Press "Addon functions" and rewrite them ( i will add auto-rewriting in next version )
7) When you wrote code, press "Generate C# Code"
8) Wait 3 secs
9) Press "Compile!"
10) Check program's folder, you will see .dll file.... if not - you made mistake in code
In next version i will fix that bug.

Release Log:
Quote

V2c Features:
* Added function "Post on pastebin" ( thanks to @iAegle for code)
* Added function "View in fullscreen" (thanks to @iAegle again )
* Added official page ( Nukem's )
* Sorted menus
* Fixed checking
* New icon
* and more

V2 Features:
* Added C# Text Style
* Fixed 'Check on update' thing
* Now you can save files without errors, also in .cs file
* Easy to work with files
* Some help moved to 'Edit' menu

V1 Features:
* Plugin Compiling
* Fine Interface
* Mini-Help
* Fast opening/closing/compiling
* Server Addon Cmd list
* Example Codes
* Checking files on start
* Easy to use
* Save codes ( .pcode )
* Status Bar
* Checking for updates
* Special combinations! Check all, then uncheck all to get multiple code ( uuhm, can't explain.... bad english )


Video:


http://roflsaurus.com/users/public/j20704wrars175.png

What i will add:
* Automaticly code ( Now you need to rewrite some codes )
* Many other things!


Credits:
@Se7en - Creator
Google - C# Tutorials
Thanks to:
@master131 - .dll compiling thing
@jariz and @nukem for C# help

Download:
http://www.mediafire.com/download.php?meyx345t9llivco

__________________

http://no-haking.square7.ch/images/wbb3-header-logo.png
icon #11

Join Date: Jan 2012

Posts: 17

also irgend wie bekomme ich das mit dem program nicht hin
wolte es testen mit:
ServerPrint("Console print test");

erstellen tut er die dll ja aber er zeikt mir denn in der console nicht "Console print test" habe es so gemacht wie du es oben beschrieben hast und hatte mir auch schon ein youtube video angesehen und es genau so gemacht wie es da beschrieben steht und habe auch denn "Server Addon Plugin API " in mein mw ordner drin und da zeigt er mir bloß beim starten der console an das dass geladen wurde: Server timed messages successfully loaded!
also langsam bin ick am verzweifeln

icon #12

Join Date: Mar 2010

Posts: 220

kopier mal mit bitte den kompletten code von deinem dedi server

__________________

http://no-haking.square7.ch/images/wbb3-header-logo.png
icon #13

Join Date: Jan 2012

Posts: 17

//////////////////////////////////////////
//////Dedicated server addon enabled//////
////Created by Nukem | www.itsmods.com////
////CoD8HMod | www.cod6hmod.itshax.com////
//////////////////////////////////////////

Version 1.254
Bonemind's ingame RCON v0.7.0 BETA loaded
Server timed messages successfully loaded!

version 1.5.387
Connecting to online services....
Connected to online services.
Executing server config "ffatm.cfg"
Succeeded reading from ffatm.dspl
Loaded 1 map entries
Loading DSR "ffatm.dsr"...
Loading Succeeded for DSR "ffatm.dsr"
-----------------------------------
Spawning map: mp_exchange, gametype dm
Initializing Steam Game Server: game port 27015, auth port 8766, query port 27017, gamedir modernwarfare3, version 1.0.0.0
Steam Game Server initialized as Internet Server.
No Steam Master Servers found. Server will LAN visible only.
Steam Game Server connected. Local IP 192.168.2.102, Public IP xxx.xxx.xxx.xxx, Game Port 27015
Steam Game Server is VAC Secure
Spawn map (mp_exchange, dm) complete.
-----------------------------------
console: Visit our website @ cod6hmod.itshax.com for more info
Steam Master Servers found (2). Server will be Internet Server listed.



also das steht in der console obwohl ich ich die test.dll in denn plugin ordner kopiert habe

mit dem server addon hatte der server auch immer mit dem steam server verbunden seit dem das update da ist verbindet er auch nicht mehr mit dem steam server also steht das da "No Steam Master Servers found. Server will LAN visible only." und ich finde denn server noch nicht mal im lan
icon #14

Join Date: Mar 2010

Posts: 220

Habe das Problem gefunden du hast die Version 1.5 und die geht noch nicht richtig nehme die alte Steam Version 1.4.382 glaub da geht's eibandfrei.

__________________

http://no-haking.square7.ch/images/wbb3-header-logo.png
icon #15

Join Date: Jan 2012

Posts: 17

ne geht auch nicht
ick habe mal mit ein hexeditor die kompliererte dll datei die ick mit MW3Pluginmaker erstellt habe auf gemacht und da zeigt er mir denn code nicht an

und wenn ich die welcomer.dll von dem pluginpack mit dem hexeditor öffne denn steht da der code drin

und wenn ich die originale welcomer.dll aus dem pluginpack nehme und in denn plugin ordner von server version 1.5.387 denn zeigt er mir denn in der console an

das einzigste was ich wil ist ja das bei
ServerSay("^7Welcomer: ^2Everyone welcome ^3" + Client.Name + " ^2to the server!", true);

was anderes steht
icon #16

Join Date: Jul 2012

Posts: 1

i am can not download plugin  plz help me

icon #17

Join Date: Apr 2013

Posts: 1

Quote from TreffNix
Ingame RCON tool [Version 0.5.0]
Only registered and activated users can see links.

---------------------------------------------





link does not work, you have another link???
icon #18

Join Date: Jul 2013

Posts: 1

hi please upload again.
and give me link.
tnx
Last edited by KN4CK3R (Mon 2. Jun 2014, 00:31)

Reason: no reason given