Code Modification Project - Kill All Players?
Code Modification Project - Kill All Players?
Hey everyone...
I recently setup a server which respawns a player after 4 seconds. (I have my reasons for this... don't ask )
Anyway, sometimes I want to restart the round because I changed size_factor. In order to do this, I have to completely quit the armagetronad-dedicated instance and restart it or kick everybody.
Is there a command to kill all players? Or can anyone give me some input on where and how I could modify the Armagetron source to allow to do this? Thanks.
I recently setup a server which respawns a player after 4 seconds. (I have my reasons for this... don't ask )
Anyway, sometimes I want to restart the round because I changed size_factor. In order to do this, I have to completely quit the armagetronad-dedicated instance and restart it or kick everybody.
Is there a command to kill all players? Or can anyone give me some input on where and how I could modify the Armagetron source to allow to do this? Thanks.
- Tank Program
- Forum & Project Admin, PhD
- Posts: 6711
- Joined: Thu Dec 18, 2003 7:03 pm
- Tank Program
- Forum & Project Admin, PhD
- Posts: 6711
- Joined: Thu Dec 18, 2003 7:03 pm
I'm not sure exactly where it is anymore. A quick fgrep reveals so that might be a place to start.
Code: Select all
./ePlayer.cpp:7254: if ( se_NeedsServer( "KILL", s, false ) )
- DDMJ
- Reverse Outside Corner Grinder
- Posts: 1882
- Joined: Thu Jun 08, 2006 12:15 am
- Location: LA, CA, USA, NA
- Contact:
make a file (named pwn.cfg) that contains the following:
where the last entry contains the same # that max_clients is set to.
Then, just type /admin include pwn.cfg and everyone will die!
bwahaha!
Code: Select all
/admin KILL 1
/admin KILL 2
/admin KILL 3
[...]
/admin KILL 16
Then, just type /admin include pwn.cfg and everyone will die!
bwahaha!
- Infa(mous)
- Round Winner
- Posts: 255
- Joined: Thu Aug 14, 2008 11:27 pm
Code: Select all
kill 1
kill 2
[...]
kill 16
CENTER_MESSAGE Admin Sneezes.
Hi again... I just decided to modify the dedicated server src to create a command called killall. It works fine. If anyone wants the code for it, I can send it (To save someone else the hassle).
Although I'm somewhat disappointed that I could've just done what Durka suggested. Oh well. Although, shouldn't this be something built-in already? It seems like a rather basic thing to have.
Although I'm somewhat disappointed that I could've just done what Durka suggested. Oh well. Although, shouldn't this be something built-in already? It seems like a rather basic thing to have.
- Tank Program
- Forum & Project Admin, PhD
- Posts: 6711
- Joined: Thu Dec 18, 2003 7:03 pm
-
- Average Program
- Posts: 61
- Joined: Fri Jul 25, 2008 11:24 am
Smoothice, please post , function is still useful as I thought the above was made obsolete in newer versions, as it proved confusing. How does the admin know that "KICK 2" kicks the spammer on slot 2, or the very nice person called simply '2'.DDMJ wrote:make a file (named pwn.cfg) that contains the following:where the last entry contains the same # that max_clients is set to.Code: Select all
/admin KILL 1 /admin KILL 2 /admin KILL 3 [...] /admin KILL 16
Kill All Players for 0.2.8 Branch
Ok guys, here's the patch for the 0.2.8 branch that creates a command to kill all players. (KILLALL)
I'd like to note that this code was made by maclover201 on my computer using screen sharing. It is currently implemented on all of my servers (smooth's network), and his (iD Tech). This is the first patch file I have ever created so if there are any problems with it, please tell me.
I'd like to note that this code was made by maclover201 on my computer using screen sharing. It is currently implemented on all of my servers (smooth's network), and his (iD Tech). This is the first patch file I have ever created so if there are any problems with it, please tell me.
- Attachments
-
- killallplayers-patch.zip
- 0.2.8 patch to create command KILLALL which kills all players. (Created by maclover201 and smoothice)
- (991 Bytes) Downloaded 168 times
Thanks for posting, Smoothice.
How it works... I just combined some of the player list code with the p->object->kill() function. It goes backwards through all the player objects on the server, and if it finds a living player kills it. I originally wrote it with something that shows which admin triggered it, but it got kind of glitchy because it would sometimes say that an AI or a non-admin triggered it.
How it works... I just combined some of the player list code with the p->object->kill() function. It goes backwards through all the player objects on the server, and if it finds a living player kills it. I originally wrote it with something that shows which admin triggered it, but it got kind of glitchy because it would sometimes say that an AI or a non-admin triggered it.