Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
please help me = question's
#1
Rainbow 
hi guys ...
1) How i compile a plugin (i use pluginmaker4)
when i will compile a plugin (yurio plugin=in itsmods) give me error :
default parameter specifiers not permitted
line : 62 & error cod : cs0241
how i fixed this...
please help

Youri plugin is :
Code:
using System;
    using System.Collections.Generic;
    using System.IO;
    using Addon;
    
    namespace YuMap
    {
    public class PluPack : CPlugin
    {
    const int MAPS = 16;
    bool haveadmin = false;
    List<string> admins = new List<string>();
    string[] mapdev = { "mp_alpha", "mp_bootleg", "mp_bravo", "mp_carbon", "mp_dome", "mp_exchange", "mp_hardhat", "mp_interchange", "mp_lambeth", "mp_mogadishu", "mp_paris", "mp_plaza2", "mp_radar", "mp_seatown", "mp_underground", "mp_village" };
    string[] mapuser = { "lockdown", "bootleg", "mission", "carbon", "dome", "downturn", "hardhat", "interchange", "fallen", "bakaara", "resistance", "arkaden", "outpost", "seatown", "underground", "village" };
    int[] maprange = new int[MAPS];
    int range;
    int nextmap = -1;
    string dspl, dsr;
    Random rnd = new Random(unchecked((int)DateTime.Now.Ticks));
    
    void GetAdmins()
    {
    string xuids = GetServerCFG("Yu", "xuids", "");
    if (xuids != "")
    foreach (string x in xuids.Split(new char[] { ',', ' ' }, StringSplitOptions.RemoveEmptyEntries))
    admins.Add(x);
    if (admins.Count > 0) { haveadmin = true; }
    }
    
    bool Admin(string id)
    {
    foreach (string a in admins)
    if (id.ToLowerInvariant().Contains(a.ToLowerInvariant())) { return true; }
    return false;
    }
    
    void GetRotation()
    {
    dspl = GetServerCFG("Yu", "dspl", "default") + ".dspl";
    dsr = GetServerCFG("Yu", "dsr", "FFA_default");
    string[] weights = GetServerCFG("Yu", "weights", "3, 2, 5, 3, 5, 2, 5, 3, 2, 5, 5, 3, 2, 3, 2, 5").Split(new char[] { ',', ' ' }, StringSplitOptions.RemoveEmptyEntries);
    for (int i = 0; i < MAPS; i++)
    {
    range += int.Parse(weights[i]);
    maprange[i] = range;
    }
    }
    
    int FindMap(int r)
    {
    for (int i = 0; i < MAPS; i++)
    if (r <= maprange[i])
    return i;
    return -1;
    }
    
    void SetMap(string map)
    {
    File.WriteAllText(@"admin\" + dspl, map + "," + dsr + ",1");
    }
    
    int GetMapByName(string map, bool dev = false)
    {
    string[] m = dev ? mapdev : mapuser;
    for (int i = 0; i < MAPS; i++)
    if (m[i].StartsWith(map, StringComparison.InvariantCultureIgnoreCase))
    return i;
    return -1;
    }
    
    public override void OnServerLoad()
    {
    ServerPrint("Yurio Map Plugin v1.0 loaded");
    GetAdmins();
    GetRotation();
    }
    
    public override void OnMapChange()
    {
    int prevmap = GetMapByName(GetDvar("mapname"), true);
    repeat:
    nextmap = FindMap(1 + rnd.Next(range));
    if (prevmap == nextmap) { goto repeat; }
    SetMap(mapdev[nextmap]);
    }
    
    public override ChatType OnSay(string Message, ServerClient Client)
    {
    string[] parsed = Message.Split(null as char[], StringSplitOptions.RemoveEmptyEntries);
    bool admin = haveadmin && Admin(Client.XUID);
    if (Message.StartsWith("!map", StringComparison.InvariantCultureIgnoreCase))
    {
    if (!admin) { return ChatType.ChatGame; }
    if (parsed.Length > 1)
    {
    int map = GetMapByName(parsed[1]);
    if (map != -1) { ServerCommand("map " + mapdev[map]); }
    }
    return ChatType.ChatNone;
    }
    if (Message.StartsWith("!nextmap", StringComparison.InvariantCultureIgnoreCase))
    {
    if (admin && parsed.Length > 1)
    {
    int map = GetMapByName(parsed[1]);
    if (map != -1)
    {
    nextmap = map;
    SetMap(mapdev[nextmap]);
    }
    }
    ServerSay("Next map is: ^3" + mapuser[nextmap].ToUpperInvariant(), true);
    ServerPrint("Next map is: ^3" + mapuser[nextmap].ToUpperInvariant());
    return ChatType.ChatNone;
    }
    return ChatType.ChatContinue;
    }
    }
    }
_______________________________________________________________

2) I have 4 plugin source how compile and made this plugins to 1 plugin..?[/quote]
Nyan Cat You can't teach an old dog new tricks Nyan Cat
Nyan Cat You can't teach grandmother to suck eggs Nyan Cat
Reply

#2
fuck pluginmaker , use Visualstudio.
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
Question Help Mw2 weapon skin question FroxIVx4 1 2,965 10-13-2013, 16:54
Last Post: hmann
  [Request] Might be a silly question... regarding SetPlayerData camxxcore 4 3,926 08-10-2013, 21:50
Last Post: camxxcore
  A question about the Call of Duty Black Ops king_dom 1 3,750 07-08-2013, 05:26
Last Post: DidUknowiPwn
  Help Mw2 weapon skin question FroxIVx4 1 2,936 07-06-2013, 19:22
Last Post: surtek
  Question on how to "Spawn" a flying rocket as a player? akillj 8 5,581 06-04-2013, 01:54
Last Post: rotceh_dnih
  bot question meisking 1 2,063 04-13-2013, 11:02
Last Post: SuperNovaAO
  Help [QUESTION][IDEA] Invisible Wall 99IRock 8 5,532 03-03-2013, 14:37
Last Post: Nekochan
Wink Help question [HARD] Tony. 12 8,054 03-02-2013, 22:54
Last Post: JariZ
  A Question supernuke 2 2,300 02-22-2013, 15:45
Last Post: supernuke
Rainbow The question of SpawnModel xtreme2010 9 5,660 01-06-2013, 18:37
Last Post: xtreme2010

Forum Jump:


Users browsing this thread:
1 Guest(s)

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