ItsMods

Full Version: God Plugin v5.0 [Ingame Rcon Tool]
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I noticed that commands such as !warn and !kick seem to be public as well, would you consider making them private?

I kind of like to keep who is admin under the table in my server as it allows us to catch rule breakers if they don't know any admin is on.
@OzonE Hi, few days ago i request standalone plugin for map change, and you tell "its easy can you compile code?"


Well... now i can Happy cry


So... you can tell me now the code? Me Gusta
(04-20-2012, 05:58)Dumas Wrote: [ -> ]So... you can tell me now the code?

Like a sir

Here Is The Code .... Not sure if works but this worth a shot.
if it worked post the dll file here.

Code:
using System;
using System.Collections.Generic;
using System.Text;
using Addon;
using System.Threading;

namespace ServerAdmin
{
    class CommandClass : CPlugin
    {
        public override void OnServerLoad()
        {
            ServerPrint("Standalone Map Plugin Loaded!");
        }

        public Boolean execCommand(String Message, ServerClient issuer)
        {
            //Delimiters for splitting of messages
            Char[] delimit = { ' ' };
            //Splitting the message
            String[] split = Message.Split(delimit);
            //Makes sure a nullpointerException is not possible in this function
            if (split[0] == null)
            {
                return true;
            }
            String alias = cloaker.getAlias(split[0].ToLower());
            Message = Message.Replace(split[0], alias);
            split = Message.Split(' ');
            //Checks if a user has permission to issue a command
            if (Message.StartsWith("!") && !bouncer.canIssueCommand(issuer, split[0]))
            {
                TellClient(issuer.ClientNum, "^1You Cannot Use This.", true);
                return true;
            }
            else if (split[0].Equals("!mapdome")) // map change to every map
            {
                ServerCommand("map mp_dome");
                return true;
            }
            else if (split[0].Equals("!maplockdown"))
            {

                ServerCommand("map mp_alpha");
                return true;
            }
            else if (split[0].Equals("!mapbootleg"))
            {

                ServerCommand("map mp_bootleg");
                return true;
            }
            else if (split[0].Equals("!mapmission"))
            {

                ServerCommand("map mp_bravo");
                return true;
            }
            else if (split[0].Equals("!mapcarbon"))
            {

                ServerCommand("map mp_carbon");
                return true;
            }
            else if (split[0].Equals("!mapdownturn"))
            {

                ServerCommand("map mp_exchange");
                return true;
            }
            else if (split[0].Equals("!maphardhat")) // map change to hardhat
            {
                ServerCommand("map mp_hardhat");
                return true;
            }
            else if (split[0].Equals("!mapinterchange")) // map change to the map interchange
            {
                ServerCommand("map mp_interchange");
                return true;
            }
            else if (split[0].Equals("!mapfallen"))
            {

                ServerCommand("map mp_lambeth");
                return true;
            }
            else if (split[0].Equals("!mapbakaraa"))
            {

                ServerCommand("map mp_mogadishu");
                return true;
            }
            else if (split[0].Equals("!mapresistance"))
            {

                ServerCommand("map mp_paris");
                return true;
            }
            else if (split[0].Equals("!maparkaden"))
            {

                ServerCommand("map mp_plaza2");
                return true;
            }
            else if (split[0].Equals("!mapoutpost"))
            {

                ServerCommand("map mp_radar");
                return true;
            }
            else if (split[0].Equals("!mapseatown"))
            {

                ServerCommand("map mp_seatown");
                return true;
            }
            else if (split[0].Equals("!mapunderground"))
            {


                ServerCommand("map mp_underground");
                return true;
            }
            else if (split[0].Equals("!mapvillage"))
            {

                ServerCommand("map mp_village");
                return true;
            }

        }
    }
}
Some reports of !kick,!tempban and !ban suddenly stopped working. Anyone else seeing this?
(04-20-2012, 08:14)OzonE Wrote: [ -> ]
(04-20-2012, 05:58)Dumas Wrote: [ -> ]So... you can tell me now the code?

Like a sir

Here Is The Code .... Not sure if works but this worth a shot.
if it worked post the dll file here.

I got 2 errors

Code:
Error    1    The name 'cloaker' does not exist in the current context    C:\Users\Dumas\AppData\Local\Temporary Projects\testmap\Plugin.cs    27    28    testmap

Error    2    The name 'bouncer' does not exist in the current context    C:\Users\Dumas\AppData\Local\Temporary Projects\testmap\Plugin.cs    31    45    testmap


Confused






WHERE IS THE PLUGINS/ADDONS FOLDER I DONT HAVE IT!!!!!
(04-23-2012, 13:41)X8ReaperZ Wrote: [ -> ]WHERE IS THE PLUGINS/ADDONS FOLDER I DONT HAVE IT!!!!!

Don't type in capslock please...it's annoying Tongue
Also, you need @Nukem 's server mod for that, use the search function

@Dumas
You need the complete source to compile the plugin. The cloacker and bouncer classes are for the aliases and permissions functions
this looks like a cool plugin.
if the commands show up in chat that needs to be fixed
@bonemind so how can be that code standalone? Undecided

(04-24-2012, 03:04)Dumas Wrote: [ -> ]I Got 2 Errors

i removed the stuff about those :/