mirror of
https://github.com/ineedbots/iw2_bot_warfare.git
synced 2025-07-02 01:01:55 +00:00
Humble beginnings
This commit is contained in:
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");
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user