• 9 Vote(s) - 4.56 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Release] MW3 Server Addon Extensions
What if get bots as ServerClients and "notify" them to change the team?
Like a gsc:
Code:
self notify("menuresponse", game["menu_team"], "allies");
C++/Obj-Cdeveloper. Neko engine wip
Steam: Click
  Reply
Error 4 The name 'ScriptFailuireByteCheckAddress' does not exist in the current context ???
[Image: b_560_95_1.png]


[Image: b_560_95_1.png]

  Reply
(01-03-2014, 01:28)hillbilly Wrote: Error 4 The name 'ScriptFailuireByteCheckAddress' does not exist in the current context ???

Sorry, I deleted a line by accident, check the main post again.

Also, got the bots to spawn properly, I've updated the example and added TestClients.cs to the main post.
[Image: 30xhrep.png]

A casual conversation between barata and I about Nukem.
  Reply
TestClients.AddTestClient


sorry noob attack here ??? how do ya get em to spawn?
[Image: b_560_95_1.png]


[Image: b_560_95_1.png]

  Reply
(01-03-2014, 02:10)hillbilly Wrote: TestClients.AddTestClient


sorry noob attack here ??? how do ya get em to spawn?

Check the example...
[Image: 30xhrep.png]

A casual conversation between barata and I about Nukem.
  Reply
i'm still getting error with the Timing.cs

Error 20 Using the generic type 'System.Action<T>' requires 1 type arguments

public static void OnNotify(string type, Action<Parameter, Parameter, Parameter, Parameter, Parameter, Parameter> action)
{
OnNotify(type, action, false, -1);
}
[Image: b_560_95_1.png]


[Image: b_560_95_1.png]

  Reply
(01-03-2014, 02:25)hillbilly Wrote: i'm still getting error with the Timing.cs

Error 20 Using the generic type 'System.Action<T>' requires 1 type arguments

public static void OnNotify(string type, Action<Parameter, Parameter, Parameter, Parameter, Parameter, Parameter> action)
{
OnNotify(type, action, false, -1);
}

Uncomment the code at the top, seems like .NET 3.5 is missing some of the overloads of Action<T>.
[Image: 30xhrep.png]

A casual conversation between barata and I about Nukem.
  Reply
Thanks now i can have bots walk in a circle and make people wonder.
~FYANB~ Servers Website

Primary Account:
[Image: 76561198070236721.png]
Secondary Account:
[Image: 76561198096107676.png]
Third Account:
[Image: 76561198164751656.png]
  Reply
ok got it working ty, any way to change the bots name, and while this is a massive step forward, the bots are somewhat docile.

also on map change they get stuck in spec still.
[Image: b_560_95_1.png]


[Image: b_560_95_1.png]

  Reply
(01-03-2014, 03:26)hillbilly Wrote: ok got it working ty, any way to change the bots name, and while this is a massive step forward, the bots are somewhat docile.

also on map change they get stuck in spec still.

Not sure about map change, they seem to be stuck in a connected state. Probably need to kick the bots and respawn them. As for changing bot name, not sure, you may way to tinker with the connectString, not sure if the game will recognise the player as a bot though.

Code:
public override void OnMapChange()
{
    _spawnedBots = false;
    foreach (var client in GetClients())
        if (client.Name.StartsWith("bot"))
            ServerCommand("kickclient " + client.ClientNum);
}

Code:
var connectString = string.Format(
    "connect {0} \"\\cg_predictItems\\1\\cl_anonymous\\0\\color\\4\\head\\default\\model\\multi\\snaps\\20\\rate\\5000\\name\\bot{0}\\protocol\\{1}\\checksum\\{2}\\statver\\{3} {4}\\qport\\{5}\"",
    "Poop", protocol, GetChecksum(),
    GetStatMajor(), (uint) GetStatMinor(),
    BotPort + 1);
[Image: 30xhrep.png]

A casual conversation between barata and I about Nukem.
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Help, server Admin largosik 0 2,067 02-02-2019, 18:09
Last Post: largosik
  Add a point shop to my server h1dexyz 1 2,828 03-04-2018, 22:36
Last Post: h1dexyz
Lightbulb Preview Weapon Classe For Infected Clasic Server groochu1982 0 2,213 02-19-2017, 08:35
Last Post: groochu1982
Exclamation Help HOW CAN I TURN OFF THE "CROSSHAIR" IN MY SERVER? Eliichong0 0 2,506 06-16-2016, 16:01
Last Post: Eliichong0
Bug Upload files to FTP server S3VDIT0 4 4,178 01-28-2016, 17:17
Last Post: S3VDIT0

Forum Jump:


Users browsing this thread: 1 Guest(s)