( search forums )
Server commands
Soldat Forums - Server Talk - Server Help
gips
December 29, 2005, 12:56 pm
Hi everyone!

My questions:
1)
Is there any possible server command, that would return player number by his name?
For example command "/pid gipson" that would return "1" if my numer on server is 1.
I need it for my program, that would use "/setteam5 X", where X is the number of player connected with specified nickname. "/setteam5 nickname" doesn't work, so i need to get player's numer first. How to do that?
2)
Is there any possible server command, that would move player in Deathmatch form Spectator mode to game, but without team. "/setteamX", where X is 1,2,3 or 4, moves player into team X even in Deathmatch (server 2.4.9 bug?). I tried "/setteam0 X", "/setteam6 X" and "/setteam X" but i reported no results exept disconnecting player X.
3)
Is there any possible solution to check in command line of dedicated server, is there any Spectator in the game?

Thanks!

Deleted User
December 29, 2005, 3:20 pm
BUGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGSSSSSSSSSSSSSSSS!

Ken the Great
December 29, 2005, 3:31 pm
1) the player number is shown in the F1 if you have the command line up.. if it's a program.. atleast ARSSE shows the player number aswell as the scripts accept $PLAYER_NUM for player number.. Not that good at this but that's as far as I know..

2) /setteam5 is the spectator team.. haven't had any problems with that..

3) ARSSE shows spectators.. but I don't know..

gips
December 29, 2005, 5:05 pm
To Ken the Great:
Can't you read? SERVER COMMAND not ARSSE! I'm not using Windows system to manage my server and after my first post i thought it goes without saying. I'm writing my own program in C and i don't know if i can get player number by his name in some way, or if i have to write function that will do that by myself.
1) I asked of SERVER COMMAND to show player number and you answered: "F1 if you have the command line up"... is this answer? Is this server command? N/C
2) I asked if there's any SERVER COMMAND to move player form Spectator to game (without team) and you answered: "/setteam5 is the sepctator team.. haven't had any problems with that.." - yeah.. you really answered me - thank's for info about /setteam5... pff
3) I asked if there is any possible solution to check IN COMMAND LINE OF DEDICATED SERVER, is there any Spectator in the game and you answered: "ARSSE shows spectators.. but I don't know.." - everything's clear for me again after answer like that... N/C
Sorry, but you didn'd help me at all. I think you don't even know what are you talking about. Apologise for that words, but after i read your answers i thought like you don't even read my questions.

To hunterz:
If you are crying because of bugs you should first wash oneself...

Denacke
December 29, 2005, 6:43 pm
Try to be more friendly to the ones giving you advice gips.

Command line wise this isn't possible. I believe you will have to get it by receiving the REFRESH packet from an admin connection to the server. I have no expirience in this so I hope people who made ARSSE or SARJ would have more tips & ideas about that.

The second point is not possible as far as I know. I'll forward it to Michal for a next version.

Command line wise it's not possible to check for spectators, you'll have to use either the REFRESH packet again, or the gamestat.txt.

gips
December 29, 2005, 7:23 pm
Thank you. That's just what i expected... i will have to write function that gives numbers to nicknames just like server do. If 2nd point isn's possible i'll have to make all players to play in one team. In 3rd point i also think that only way to check if there's Spectator in the game is to search in gamestat.txt for string: "-1" (that's number of deaths/frags of spectator) and if it's found that means that spectator is in the game.
Other solution is creating integer flag (spec) in program and implement algorithm like that:

spec = 0;
if "XXX has joined spectator"
spec = 1
if "XXX has joined alpha team"
spec = 0.
if "YYY has joined the game"
if spec = 1
kick YYY
else
/setteam5 YYY

... that should work :] I'll check both solutions and let you know if any of them works.

Still waiting for some advices.
Thanks!

P.S. What exactly do REFRESH command when it's sent do server? Does is refresh gamestat.txt?

Denacke
December 29, 2005, 8:50 pm
Sorry for not putting this in my original post:

You can find more information about the REFRESH packet under the development corner. More specifically this thread: http://archive.forums.soldat.pl/topic.php?topic_id=20999

Good luck with your program

gips
December 29, 2005, 9:13 pm
Thanks for your help. Still opened for suggestions...

Deleted User
December 30, 2005, 2:27 am
if you have a website with php i can help you with displaying the spectators (on a webpage).

quote:2)
Is there any possible server command, that would move player in Deathmatch form Spectator mode to game, but without team. "/setteamX", where X is 1,2,3 or 4, moves player into team X even in Deathmatch (server 2.4.9 bug?). I tried "/setteam0 X", "/setteam6 X" and "/setteam X" but i reported no results exept disconnecting player X.

i think you have it backwards it should be /setteam1-5 # or players EXACT name caps and all.

Denacke
December 30, 2005, 2:43 am
quote:Originally posted by deltaforce229if you have a website with php i can help you with displaying the spectators (on a webpage).

quote:2)
Is there any possible server command, that would move player in Deathmatch form Spectator mode to game, but without team. "/setteamX", where X is 1,2,3 or 4, moves player into team X even in Deathmatch (server 2.4.9 bug?). I tried "/setteam0 X", "/setteam6 X" and "/setteam X" but i reported no results exept disconnecting player X.

i think you have it backwards it should be /setteam1-5 # or players EXACT name caps and all.

You should really read his post as he continually refers x to player X and not team X

gips
December 30, 2005, 10:48 pm
deltaforce229:
quote:i think you have it backwards it should be /setteam1-5 # or players EXACT name caps and all.

/setteam1-5 # (# is number and only number i think. I tried to put player's name here, but it didn't work)

l33t lamZz0r c4mp3r
April 18, 2006, 10:57 am
Does anyone know how to creat personalized commands e.g "l33t lamZz0r c4mp3r: !pwn"
"[Server Message] YOU GOT PWNED BY l33t lamZz0r c4mp3r"

KeFear
April 18, 2006, 3:32 pm
l33t lamZz0r: you can use for example ARSSE (or some other admin tools) to create such commands.

Arklenao2
April 18, 2006, 8:11 pm
 Quote: Thanks for your help. Still opened for suggestions...
Learn English.