Author Topic: soldat server/arsse question  (Read 1972 times)

0 Members and 1 Guest are viewing this topic.

Offline Chameleon

  • Major
  • *
  • Posts: 95
soldat server/arsse question
« on: August 20, 2006, 08:59:24 pm »
does anyone know how to program for arsse?

if so, could you help me out?

i want to make my server so people can password it with out an admin being there. (for scrims and stuff) but i am afraid that some people will forget to remove the password, so i want a script for if there is no one in the server, it removes the password.

someone suggested that i try this command, but it did not work.
if $SERVER_COUNT = 0
/password
endif


thanks in advance

i searched around the forums, and i couldnt find if this was already a topic. sorry if it already is.

Offline mar77a

  • Global Moderator
  • Veteran
  • *****
  • Posts: 1295
  • mad
    • random stuffs
Re: soldat server/arsse question
« Reply #1 on: August 20, 2006, 09:55:42 pm »
hm, i had this same problem when setting up the public private server. the idea was the same, and to solve the problem i made a php script to clear the password in case someone had forgotten to remove it.

Offline Chameleon

  • Major
  • *
  • Posts: 95
Re: soldat server/arsse question
« Reply #2 on: August 20, 2006, 11:38:25 pm »
i dont know much about php. do you think you (or someone else) can help me out?

also, i play survival mode, so /setteamX Y basicly respawns someone. so the !joinred/blue command can easily be abused, which i do not want to happen (someone dies, then !joinblue, and they are back again ready to fight).

i tryed doing this

if $MESSAGE = !joinblue
/setteam2 $PLAYER_NUM
/kill $PLAYER_NUM
endif

and it bugs and respawns the person, instead of killing them like the command should do. after puzzling over this for a while. i tryed doing this...

if $MESSAGE = !joinblue
/setteam2 $PLAYER_NUM
/kill $PLAYER_NUM
/kill $PLAYER_NUM
/kill $PLAYER_NUM
/kill $PLAYER_NUM
endif

(i hoped one of the /kill's would get him, but he stayed alive)

my theory is that if i can get it to do something like this, it would work...

if $MESSAGE = !joinblue
/setteam2 $PLAYER_NUM
wait 1 second
/kill $PLAYER_NUM
endif

only problem is, i do not know if there is a way to do that

Offline mar77a

  • Global Moderator
  • Veteran
  • *****
  • Posts: 1295
  • mad
    • random stuffs
Re: soldat server/arsse question
« Reply #3 on: August 20, 2006, 11:54:45 pm »
The php function can be found in the sticky: http://forums.soldat.pl/index.php?topic=237.0

Offline Chameleon

  • Major
  • *
  • Posts: 95
Re: soldat server/arsse question
« Reply #4 on: August 20, 2006, 11:56:24 pm »
cool, thanks alot.

anyone know of a way to help me solve my second problem?

Offline frito

  • Major(1)
  • Posts: 7
Re: soldat server/arsse question
« Reply #5 on: August 21, 2006, 12:50:10 am »
Consecutive /kill commands seem to be pretty instant (ive done quite a bit of malicious arsse coding ;D)
I thought that in survival mode when you change teams you have to wait until the next round.. maybe not. Why not just completely remove the !joinred/blue commands?

Offline Chameleon

  • Major
  • *
  • Posts: 95
Re: soldat server/arsse question
« Reply #6 on: August 21, 2006, 03:08:27 am »
in survival when you change teams, you come up dead. but when an admin setteams you, you come up alive, and since !joinred/blue uses /setteam, you come up alive.

i would remove the commands, except that sometimes theres this bug where you change team, and you get kicked. strange eh? the !joinred/blue removes the possibility of that bug, because it doesnt bug when you are /setteamed. so basicly the command is for the convenience of the people.

Offline KeFear

  • Soldier
  • **
  • Posts: 181
  • ARSSE Creator
Re: soldat server/arsse question
« Reply #7 on: August 21, 2006, 01:03:35 pm »
Hm, i will add a variable for the number of player's on the server.

$SERVER_COUNT is actually the number of Servers open in ARSSE.

there are variables for player count: $ALPHA_PLAYERS, $BRAVO_PLAYERS, etc. so you could use these like this:

if $ALPHA_SCORE = 0
if $BRAVO_SCORE = 0
if $CHARLIE_SCORE = 0
if $DELTA_SCORE = 0
/password
endif

you can use this in the OnPlayerLeave event. If you have a CTF/TDM/INF server, then this will work i guess.

Offline Chameleon

  • Major
  • *
  • Posts: 95
Re: soldat server/arsse question
« Reply #8 on: August 21, 2006, 07:11:19 pm »
i tryed that, and i also tryed

if $ALPHA_PLAYERS = 0
/password
endif

it didnt work :(

Offline KeFear

  • Soldier
  • **
  • Posts: 181
  • ARSSE Creator
Re: soldat server/arsse question
« Reply #9 on: August 22, 2006, 01:33:50 am »
then try it in the OnData event.

Offline Chameleon

  • Major
  • *
  • Posts: 95
Re: soldat server/arsse question
« Reply #10 on: August 23, 2006, 01:37:04 pm »
tryed that aswell :(

Date Posted: August 22, 2006, 08:40:07 PM
ok, well i restarted arsse, and the

if $PLAYER_COUNT = 0
/password
endif

worked. only thing is it seems to spam the logs, is there a way to make it so it only does it like every 5 minutes or something?

if $PLAYER_COUNT = 0
 if $TIME_LEFT = 10:00
/password
endif

i tryed that, and it didnt work, i was looking through the variables for it, and i couldnt find something for a *this* and *that* type scenerio, is there one that isnt listed? or am i just out of luck?