Thread Rating:
  • 1 Vote(s) - 1 Average
  • 1
  • 2
  • 3
  • 4
  • 5
2 plugin help
#1
hi
Could you do me two plugin?
InfectedRestart v3
PHP Code:
using System;
using Addon;
using System.Threading;
 
namespace 
InfRestart
{
    
//"<class name> : CPlugin" is needed to inherit the functions
    
public class InfRestart CPlugin
    
{
 
        public 
override void OnServerLoad()
        {
            
ServerPrint("InfectedRestart by JariZ loaded (ThreadPools: zxz0O0, Recompile: Pieter)");
        }
 
        public 
override void OnMapChange()
        {
            
NumThreads++;
            
ThreadPool.QueueUserWorkItem(new WaitCallback(irth));
        }
 
        public 
override void OnFastRestart()
        {
            
OnMapChange();
        }
 
        
int NumThreads 0;
 
        
void irth(object o)
        {
            try
            {
                
Thread.Sleep(20000); //wait 20 seconds for enabling (to avoid fast_restart looping on mapchange 15 seconds)
                
while (NumThreads 2)
                {
                    
int axis 0;
                    
int allies 0;
                    foreach (
ServerClient client in GetClients())
                    {
                        if (
client.Team == Teams.Alliesallies++;
                        else if (
client.Team == Teams.Axisaxis++;
                    }
 
                    if (
allies && axis == 0)
                    {
                        
ServerSay("^2 ^1 ^2-   ^35 "true);
                        
Thread.Sleep(5000);
                        
ServerCommand("fast_restart");
                    }
                    
Thread.Sleep(30000); // run again after 30 seconds
                
}
            }
            catch (
ThreadAbortException) { }
            
NumThreads--;
        }
    }


NextMap v1.1
PHP Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Addon;
using System.Collections;
 
namespace 
nextmap
{
    public class 
nextmap CPlugin
    
{
        
ArrayList user = new ArrayList();
        public 
string dsr;
        public 
override void OnServerLoad()
        {
            
ServerPrint("NextMap Loaded Author:YAMRAJ");
            
dsr GetServerCFG("NextMap""DSR Name""");
        }
 
        public 
override ChatType OnSay(string MessageServerClient Client)
        {
            if (
Message.StartsWith("!nextmap"))
            {
                if (
user.Contains(Client.XUID))
                {
                    
TellClient(Client.ClientNum"^1  !!"true);
                }
                else
                {
                    
user.Add(Client.XUID);
                    if (
GetDvar("nextmap") == "mp_alpha " dsr)
                    {
                        
ServerSay("^3 (^1Lockdown^3)"false);
                    }
                    else if (
GetDvar("nextmap") == "mp_bravo " dsr)
                    {
                        
ServerSay("^3 (^1Mission^3)"false);
                    }
                    else if (
GetDvar("nextmap") == "mp_dome " dsr)
                    {
                        
ServerSay("^3 p(^1Dome^3)"false);
                    }
                    else if (
GetDvar("nextmap") == "mp_bootleg " dsr)
                    {
                        
ServerSay("^3 (^1Bootleg^3)"false);
                    }
                    else if (
GetDvar("nextmap") == "mp_radar " dsr)
                    {
                        
ServerSay("^3 (^1Outpost^3)"false);
                    }
                    else if (
GetDvar("nextmap") == "mp_plaza2 " dsr)
                    {
                        
ServerSay("^3 (^1Arcaden^3)"false);
                    }
                    else if (
GetDvar("nextmap") == "mp_mogadishu " dsr)
                    {
                        
ServerSay("^3 (^1Bakaraa^3)"false);
                    }
                    else if (
GetDvar("nextmap") == "mp_lambeth " dsr)
                    {
                        
ServerSay("^3 (^1Fallen^3)"false);
                    }
                    else if (
GetDvar("nextmap") == "mp_paris " dsr)
                    {
                        
ServerSay("^3 (^1Resistance^3)"false);
                    }
                    else if (
GetDvar("nextmap") == "mp_seatown " dsr)
                    {
                        
ServerSay("^3 (^1Seatown^3)"false);
                    }
                    else if (
GetDvar("nextmap") == "mp_underground " dsr)
                    {
                        
ServerSay("^3 (^1Underground^3)"false);
                    }
                    else if (
GetDvar("nextmap") == "mp_hardhat " dsr)
                    {
                        
ServerSay("^3 (^1Hardhat^3)"false);
                    }
                    else if (
GetDvar("nextmap") == "mp_exchange " dsr)
                    {
                        
ServerSay("^3 (^1Downturn^3)"false);
                    }
                    else if (
GetDvar("nextmap") == "mp_village " dsr)
                    {
                        
ServerSay("^3 (^1Village^3)"false);
                    }
                    else if (
GetDvar("nextmap") == "mp_interchange " dsr)
                    {
                        
ServerSay("^3 (^1Interchange^3)"false);
                    }
                    else if (
GetDvar("nextmap") == "mp_carbon " dsr)
                    {
                        
ServerSay("^3 (^1Carbon^3)"false);
                    }
                }
                return 
ChatType.ChatNone;
            }
            return 
ChatType.ChatContinue;
        }
        public 
override void OnMapChange()
        {
            
user.Clear();
        }
    }

Reply

#2
use my plugin maker to compile it :Sss
C++/Obj-Cdeveloper. Neko engine wip
Steam: Click
Reply

#3
(03-23-2012, 13:58)JayDi Wrote: use visual studio to compile it :Sss

FTFY
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
Wink Plugin with !ban !kick and !tampban clemi555 3 4,167 11-09-2013, 09:21
Last Post: clemi555
  AntiNoScope Plugin clemi555 5 4,745 11-08-2013, 19:13
Last Post: clemi555
  [Release] Bunker Plugin 1.3 archit 68 41,555 10-30-2013, 11:59
Last Post: clacki
  Help Modifying plugin maverigh 5 5,668 10-19-2013, 10:29
Last Post: Nekochan
Shocked [Request] Switch plugin axel-le-meilleur 6 5,177 10-19-2013, 06:59
Last Post: iRoNinja
  [Release] Yurio Map Plugin Yurio 101 62,276 09-26-2013, 13:38
Last Post: First_Semyon
Brick [Release] v1.1 ChangeMap/NextMap Plugin without any configuration milchshake 23 18,637 09-23-2013, 13:18
Last Post: SgtLegend
  Help !say Plugin (like the !say from GodPlugin) Hallla 0 2,711 09-13-2013, 09:31
Last Post: Hallla
Rainbow [Release] MW3: Random Weapon Plugin V1 Nekochan 50 33,274 09-11-2013, 15:11
Last Post: EnVi Sweden Rocks
  Search Plugin Fluid Killcam N3xT_974 1 3,063 09-10-2013, 20:27
Last Post: Nekochan

Forum Jump:


Users browsing this thread:
2 Guest(s)

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