I had this working last month, but for some reason cant get it to go this month. I dont recall what all I did, but is the map image supposed to be the .map file name or the .png file name?
Map image nameSolved
Disregard. I had to fix some code to get this to work. The reset part was failing.
Commented out the following
/*
void ccmdResetmap(ConsoleSystem.Arg arg)
{
if (arg.Connection != null) return;
SendReply(arg, "Map reset Confirmed! Creating a new image load order with ImageLibrary");
LoadImages();
LoadMapImage();
}
*/
Added the following to replace the above code.
void ccmdResetmap(ConsoleSystem.Arg arg)
{
if (arg.Connection != null) return;
SendReply(arg, "Map reset Confirmed! Creating a new image load order with ImageLibrary");
Puts("Starting image loading...");
LoadImages();
LoadMapImage();
Puts("Image loading complete.");
}
LMUI_control threw error too, so changed that..
Commented out;
/*
[ConsoleCommand("LMUI_Control")]
private void cmdLustyControl(ConsoleSystem.Arg arg)
{
if (!activated) return;
var player = arg.Connection.player as BasePlayer;
if (player == null)
return;
var user = GetUser(player);
if (user == null) return;
switch (arg.Args[0].ToLower())
{
case "map":
user.ToggleMain();
return;
case "shrink":
user.ToggleMapType(MapMode.None);
return;
case "expand":
if (user.Zoom() > 0)
user.ToggleMapType(MapMode.Complex);
else user.ToggleMapType(MapMode.Minimap);
return;
case "zoomin":
user.Zoom(true);
break;
case "zoomout":
user.Zoom(false);
return;
default:
return;
}
}
*/
Replaced with;
[ConsoleCommand("LMUI_Control")]
private void cmdLustyControl(ConsoleSystem.Arg arg)
{
if (!activated || arg == null || arg.Connection == null || arg.Connection.player == null)
return;
var player = arg.Connection.player as BasePlayer;
if (player == null)
return;
var user = GetUser(player);
if (user == null)
return;
if (arg.Args == null || arg.Args.Length == 0)
return;
switch (arg.Args[0].ToLower())
{
case "map":
user.ToggleMain();
return;
case "shrink":
user.ToggleMapType(MapMode.None);
return;
case "expand":
if (user.Zoom() > 0)
user.ToggleMapType(MapMode.Complex);
else
user.ToggleMapType(MapMode.Minimap);
return;
case "zoomin":
user.Zoom(true);
break;
case "zoomout":
user.Zoom(false);
return;
default:
return;
}
}
Locked automatically