Release Yurio Map Plugin
#71
THX Yurio for your work Big Grin
But it does not work for me.

exemple:when i do !nextmap it say next map is seatown but it load a random map

if i write !nextmap seatown it say next map is seatown but it load a random map

if i write !nextmap seatown GG it say next map is seatown GG but it load a random map and mode

if i write !mode GG it say next mod is GG but it load a random mode

if i write !map Seatown it load a random map

can you help me?


Version 1.204
Permission plugin . Author: Pozzuh. Version 1.0 Beta
ProMod Plugin 1.10 Author: zxz0O0
Plugin: PM Manager Author: Nukem
ohai. Rules v2
Bonemind's ingame RCON v0.7.0 BETA
Yurio Map Plugin v1.2












Attached Files
.rar   sv_config.rar (Size: 908 bytes / Downloads: 81)
Reply

#72
First check your xuids in sv_config.ini and check sv_maprotation in server.cfg
Reply

#73
it's ok now I have solved my problem.

thxTongue
Reply

#74

Quote:exemple:when i do !nextmap it say next map is seatown but it load a random map

if i write !nextmap seatown it say next map is seatown but it load a random map

if i write !map Seatown it load a random map
can you help me?

doing the same for me, says next map is, village, and it loads a total different map

[Image: b_560_95_1.png]


[Image: b_560_95_1.png]

Reply

#75
!map bak ( dspl ?


I have this promblem too if i write !map bak it's change to random map
Sorry for bad English. If I did mistake...tell me I wil learn...
Reply

#76
I need to. What would all the cards were on the queue.

My default.dspl

mp_alpha, tunngle, 1
mp_bootleg, tunngle, 1
mp_bravo, tunngle, 1
mp_carbon, tunngle, 1
mp_dome, tunngle, 1
mp_exchange, tunngle, 1
mp_hardhat, tunngle, 1
mp_interchange, tunngle, 1
mp_lambeth, tunngle, 1
mp_mogadishu, tunngle, 1
mp_paris, tunngle, 1
mp_plaza2, tunngle, 1
mp_radar, tunngle, 1
mp_seatown, tunngle, 1
mp_underground, tunngle, 1
mp_village, tunngle, 1

My sv_config.ini

[Yu]
dspl = default
/ / Your dspl-file
dsr = tunngle,
/ / Your dsr-file (files)
weights = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
/ / Your map weights
xuids =
/ / Your admin GUIDs
Reply

#77
Tell me what to do. What would all the cards were on the queue.
Reply

#78
!nextmap gives me random maps, which aren't in my weights:
Code:
dspl=default // your dspl-file dsr= esl_tdm // your dsr-file (files) weights= 12, 13, 4, 7, 1, 12, 13, 4, 7, 1, 12, 13, 4, 7, 1, 12 // your map weights xuids=xuids, // your admin GUIDs

I've noticed default.dspl only has 1 line, which changes at every mapchange (so, when I change to bootleg, it will only contain mp_bootleg,esl_tdm,1).

seta sv_maprotation "default" has been set in my server.cfg.

Besides Yurio, I use God RCON, Permission Plugin, ProMod and Nukem Mod.
Reply

#79
Any chance the new maps can be added to this plugin? Thanks.
Reply

#80
Decided to learn a thing or 2. Updated and compiled it myself thanks to the great info on itsmods.com. Seems to be working. Remember if i missed something here i'm a noob and have no idea how to code. LOL

Thanks:
@JariZ for how to compile for noobs
@Yurio for the great plugin


Code:
using System; using System.Collections.Generic; using System.IO; using Addon; namespace YuMap { public class PluPack : CPlugin { const int MAPS = 20; 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", "mp_overwatch", "mp_park", "mp_italy", "mp_morningwood" }; string[] mapuser = { "lockdown", "bootleg", "mission", "carbon", "dome", "downturn", "hardhat", "interchange", "fallen", "bakaara", "resistance", "arkaden", "outpost", "seatown", "underground", "village", "overwatch", "liberation", "piazza", "blackbox" }; int[] maprange = new int[MAPS]; int range; int nextmap = -1; string dspl, dsr; string[] dsrlist; Random rnd = new Random(unchecked((int)DateTime.Now.Ticks)); int max, counter; bool mult = false; 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"; dsrlist = GetServerCFG("Yu", "dsr", "FFA_default").Split(new char[] { ',', ' ' }, StringSplitOptions.RemoveEmptyEntries); max = dsrlist.Length; if (max == 1) dsr = dsrlist[0]; else { counter = 0; mult = true; } string[] weights = GetServerCFG("Yu", "weights", "3, 2, 5, 3, 5, 2, 5, 3, 2, 5, 5, 3, 2, 3, 2, 5, 3, 5, 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 WriteDSPL(string map) { File.WriteAllText(@"admin\" + dspl, map + "," + dsr + ",1"); } void GetNextMode() { dsr = dsrlist[counter]; counter++; if (counter == max) { counter = 0; } } 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; } int GetModeByName(string mode) { for (int i = 0; i < max; i++) if (dsrlist[i].StartsWith(mode, StringComparison.InvariantCultureIgnoreCase)) return i; return -1; } void SetMode(string[] p, int n = 2) { if (mult && p.Length > n) { int mode = GetModeByName(p[n]); if (mode != -1) { dsr = dsrlist[mode]; counter = mode + 1; if (counter == max) { counter = 0; } } } } public override void OnServerLoad() { ServerPrint("Yurio Map Plugin v1.2 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; } if (mult) { GetNextMode(); } WriteDSPL(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("!mode", StringComparison.InvariantCultureIgnoreCase) && mult) { if (admin) { SetMode(parsed, 1); WriteDSPL(mapdev[nextmap]); } string msg = "Next map is ^3" + mapuser[nextmap].ToUpperInvariant() + " ^7(^3" + dsr.ToUpperInvariant() + "^7)"; ServerSay(msg, true); ServerPrint(msg); return ChatType.ChatNone; } if (Message.StartsWith("!map", StringComparison.InvariantCultureIgnoreCase)) { if (!admin) { return ChatType.ChatGame; } if (parsed.Length > 1) { int map = GetMapByName(parsed[1]); if (map != -1) { nextmap = map; SetMode(parsed); WriteDSPL(mapdev[nextmap]); ServerCommand("map_rotate"); } } return ChatType.ChatNone; } if (Message.StartsWith("!nextmap", StringComparison.InvariantCultureIgnoreCase)) { if (admin && parsed.Length > 1) { int map = GetMapByName(parsed[1]); if (map != -1) { nextmap = map; SetMode(parsed); WriteDSPL(mapdev[nextmap]); } } string m = (mult) ? " ^7(^3" + dsr.ToUpperInvariant() + "^7)" : String.Empty; string msg = "Next map is ^3" + mapuser[nextmap].ToUpperInvariant() + m; ServerSay(msg, true); ServerPrint(msg); return ChatType.ChatNone; } return ChatType.ChatContinue; } } }
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
Wink Plugin with !ban !kick and !tampban clemi555 3 6,492 11-09-2013, 09:21
Last Post: clemi555
  AntiNoScope Plugin clemi555 5 7,592 11-08-2013, 19:13
Last Post: clemi555
  [Release] Bunker Plugin 1.3 archit 68 55,806 10-30-2013, 11:59
Last Post: clacki
  Help Modifying plugin maverigh 5 7,643 10-19-2013, 10:29
Last Post: Nekochan
Shocked [Request] Switch plugin axel-le-meilleur 6 8,295 10-19-2013, 06:59
Last Post: iRoNinja
Brick [Release] v1.1 ChangeMap/NextMap Plugin without any configuration milchshake 23 25,160 09-23-2013, 13:18
Last Post: SgtLegend
  Help !say Plugin (like the !say from GodPlugin) Hallla 0 3,655 09-13-2013, 09:31
Last Post: Hallla
Rainbow [Release] MW3: Random Weapon Plugin V1 Nekochan 50 44,653 09-11-2013, 15:11
Last Post: EnVi Sweden Rocks
  Search Plugin Fluid Killcam N3xT_974 1 3,975 09-10-2013, 20:27
Last Post: Nekochan
  [Release] AntiCamp Plugin zxz0O0 34 36,040 09-07-2013, 22:34
Last Post: axel-le-meilleur

Forum Jump:


Users browsing this thread:
1 Guest(s)

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