Release Waypoint plugin for users
#1
It looks like zoomby leeched the addresses that I posted in the help section and asked zxz to make a plugin for him. but nvm, I will release the plugin that I made myself with a config option so everyone can use it.

sv_config
Code:
[POINTS] points=2 //point123,mapname,X,Y,iconNumber point1=mp_village,-1043,549,211 point2=mp_bootleg,-96,-44,211

only one point per map is possible.

You can obviously use the source code for other stuff too

use the !icon command to find a nice icon Wink
example: !icon 123

source code:
Code:
using System; using System.Collections.Generic; using System.Text; using Addon; namespace Point { public class VecXY { public float xVec; public float yVec; public int Icon; public VecXY(float x,float y, int icon) { xVec = x; yVec = y; Icon = icon; } } public class Class1 : CPlugin { IntPtr activate, icon,X,Y; int iconNum; float x; float y; Dictionary<string, VecXY> maps = new Dictionary<string, VecXY>(); public override void OnServerLoad() { activate = (IntPtr)Convert.ToInt32(0x01B1EE9C); icon = (IntPtr)Convert.ToInt32(0x01B1EEBC); X = (IntPtr)Convert.ToInt32(0x01B1EEA0); Y = (IntPtr)Convert.ToInt32(0x01B1EEA4); Config(); } public override void OnMapChange() { string map = GetDvar("mapname"); foreach (string key in maps.Keys) { if (key.Contains(map)) { x = maps[key].xVec; y = maps[key].yVec; iconNum = maps[key].Icon; Activate(); ChangeIcon(); SetPosition(); } } } void Config() { try { string points = GetServerCFG("POINTS", "points", ""); if (points != "0") { for (int i = 1; i <= int.Parse(points); i++) { string loc = GetServerCFG("POINTS", string.Format("point{0}", i), ""); if (loc != null) { string _mp = loc.Split(',')[0]; string _x = loc.Split(',')[1]; string _y = loc.Split(',')[2]; string _icon = loc.Split(',')[3]; maps.Add(_mp, new VecXY(float.Parse(_x), float.Parse(_y), int.Parse(_icon))); } } } } catch (Exception ex) { ServerPrint("Loading points failed: " + ex.Message); } } #region ---- unsafe public void Activate() { *(int*)activate = 1; } unsafe public void ChangeIcon() { *(int*)icon = iconNum; } unsafe public void Deactivate() { *(int*)activate = 0; } unsafe public void SetPosition() { *(float*)X = x; *(float*)Y = y; } #endregion public override unsafe ChatType OnSay(string Message, ServerClient Client) { if (Message.StartsWith("!icon")) { string[] split = Message.Split(' '); iconNum = int.Parse(split[1]); Activate(); ChangeIcon(); return ChatType.ChatNone; } return ChatType.ChatContinue; } } }


Attached Files
.zip   Waypoint.zip (Size: 3.02 KB / Downloads: 122)
Reply

#2
Nice release, Could be possible to have more than one for each map, will be cool if you can point all the flags in the minimap. Thanks for asnwering
Reply

#3
I already searched for something like that but it looks like only one is possible
Reply

#4
great job! but I found the address in memory and used them to OnAddonFrame, my server is SRASHED when I'm connected to it! Could you give a lesson in it's mods.com how to save and use the bytes in mw3 server addon? Thank you.
p.s i am used CI
[Image: 6iiLEmPSEm0.jpg]
skype egor2398los
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
Wink Plugin with !ban !kick and !tampban clemi555 3 6,491 11-09-2013, 09:21
Last Post: clemi555
  AntiNoScope Plugin clemi555 5 7,585 11-08-2013, 19:13
Last Post: clemi555
  [Release] Bunker Plugin 1.3 archit 68 55,804 10-30-2013, 11:59
Last Post: clacki
  Help Modifying plugin maverigh 5 7,641 10-19-2013, 10:29
Last Post: Nekochan
Shocked [Request] Switch plugin axel-le-meilleur 6 8,293 10-19-2013, 06:59
Last Post: iRoNinja
  [Release] Yurio Map Plugin Yurio 101 82,017 09-26-2013, 13:38
Last Post: First_Semyon
Brick [Release] v1.1 ChangeMap/NextMap Plugin without any configuration milchshake 23 25,156 09-23-2013, 13:18
Last Post: SgtLegend
  Help !say Plugin (like the !say from GodPlugin) Hallla 0 3,654 09-13-2013, 09:31
Last Post: Hallla
Rainbow [Release] MW3: Random Weapon Plugin V1 Nekochan 50 44,648 09-11-2013, 15:11
Last Post: EnVi Sweden Rocks
  Search Plugin Fluid Killcam N3xT_974 1 3,972 09-10-2013, 20:27
Last Post: Nekochan

Forum Jump:


Users browsing this thread:
1 Guest(s)

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