-
Notifications
You must be signed in to change notification settings - Fork 1
/
bot_console.pas
60 lines (47 loc) · 1.63 KB
/
bot_console.pas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
{
BOT.DLL for Need For Kill
(c) 3d[Power]
http://www.3dpower.org
unit: bot_console
purpose: handling console commands
}
unit bot_console;
interface
uses Windows, SysUtils, bot_util;
procedure DLL_CMD(s : string);
procedure CMD_Register;
implementation
uses bot_register, bot_defs;
// =========================
// Çàðåãåñòðèðîâàòü êîíñîëüíóþ êîìàíäó â nfk.exe
// =========================
procedure CMD_Register;
begin
RegisterConsoleCommand('addbot');
RegisterConsoleCommand('removebot');
end;
// =========================
// Console commands reaction
// =========================
procedure DLL_CMD(s : string);
var ls, par1, par2, par3: string;
i: byte;
begin
ls := lowercase(s);
par1 := strpar(ls,0);
// par2 := strpar(ls,1);
// par3 := strpar(ls,2);
// -------------------------------------
if par1 = 'addbot' then addmessage('^3There is no bots in this bot.dll, try to download another bot.dll from official website.');
// sys_CreatePlayer('bot', ModelList[random(ModelList.Count)], 0);
// -------------------------------------
if par1 = 'removebot' then addmessage('^3There is no bots in this bot.dll, try to download another bot.dll from official website.');
{ for i := 7 downto 0 do if players[i] <> nil then
if players[i].bot then begin
RemoveBot(players[i].DXID);
Break;
end;}
// -------------------------------------
// parse commands here...
end;
end.