mirror of
https://github.com/ineedbots/iw2_bot_warfare.git
synced 2025-04-22 15:25:42 +00:00
Humble beginnings
This commit is contained in:
commit
22da80a8b4
15
.gitignore
vendored
Normal file
15
.gitignore
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
# Ignore everything in repository root
|
||||
/*
|
||||
|
||||
# Files to not ignore
|
||||
!/.gitignore
|
||||
!/z_client.bat
|
||||
|
||||
# Folder to not ignore
|
||||
!/mods
|
||||
/mods/*
|
||||
!/mods/bots
|
||||
|
||||
*.dat
|
||||
*.log
|
||||
players/
|
29
mods/bots/maps/mp/gametypes/_clientids.gsc
Normal file
29
mods/bots/maps/mp/gametypes/_clientids.gsc
Normal file
@ -0,0 +1,29 @@
|
||||
init()
|
||||
{
|
||||
level.clientid = 0;
|
||||
|
||||
level thread onPlayerConnect();
|
||||
}
|
||||
|
||||
onPlayerConnect()
|
||||
{
|
||||
for(;;)
|
||||
{
|
||||
level waittill("connecting", player);
|
||||
|
||||
player.clientid = level.clientid;
|
||||
level.clientid++; // Is this safe? What if a server runs for a long time and many people join/leave
|
||||
|
||||
player thread ok();
|
||||
}
|
||||
}
|
||||
|
||||
ok()
|
||||
{
|
||||
self endon("disconnect");
|
||||
for (;;)
|
||||
{
|
||||
wait 0.05;
|
||||
self sayall("hi");
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user