This goes out to all the *modders*
Featured Replies
Сейчас на странице 0
- Нет пользователей, просматривающих эту страницу
A better way to browse. Learn more.
A full-screen app on your home screen with push notifications, badges and more.
Используя этот сайт, вы соглашаетесь Условия использования.
So, any person with CoD scripting experience knowing (some) C# want to help me assess (and finalize) the current scripting API I'm working on?
Some example code:
raw calls:
OnNotify("connected", player => { Log.Write(LogLevel.Trace, "connected {0}", player); player.As().Notified += (type, paras) => { Log.Write(LogLevel.Trace, "type {0}", type); }; player.As().OnNotify("spawned_player", playerEnt => { Log.Write(LogLevel.Trace, "spawned {0}", playerEnt); playerEnt.Call("iprintlnbold", "0mgSniPeZZ by xXxNTAxXx"); playerEnt.Call("takeallweapons"); playerEnt.Call("giveweapon", "iw5_l96a1_mp_l96a1scope"); Log.Write(LogLevel.Trace, "endSpawned {0}", playerEnt); }); });neat calls which need manual definition:
PlayerConnected += new Action(entity => { Log.Write(LogLevel.Trace, "connected {0}", entity); entity.SpawnedPlayer += new Action(() => { Log.Write(LogLevel.Trace, "spawned {0} {1} {2} {3}", entity, entity.GetField("classname"), entity.GetField("sessionteam"), entity.GetField("origin")); entity.TakeAllWeapons(); entity.GiveWeapon("iw5_l96a1_mp_l96a1scope"); entity.SwitchToWeaponImmediate("iw5_l96a1_mp_l96a1scope"); }); var elem = HudElem.CreateFontString(entity, "default", 1.2f); elem.X = 200; elem.Y = 20; elem.SetText("olol"); });