Home   Help Search Login Register  

Author Topic: Admin only scripts  (Read 1766 times)

0 Members and 1 Guest are viewing this topic.

Offline surpher

  • Members
  • *
Admin only scripts
« on: 03 Jul 2004, 11:38:52 »
Hi All :wave:

 Just wondering is it possible to run scripts only on the admins machine?

Say your mission requires more than two parameters, you could have one of those dialog box things pop up at the beginning with all the parameters you need for your mission.


Offline Zombie

  • Members
  • *
  • Beware the night, the zombie walks among you
    • USI
Re:Admin only scripts
« Reply #1 on: 03 Jul 2004, 13:52:35 »
not sure about that, but just how many parameters do you need?  And will some of them always be the same, or are they all selectable?  If some of the params will always be the same, (score to win 5 for example), they can be defined with a variable in the init.sqs.
  I used to use selectable time of day and weather settings, but have since made them random, which makes the map different everytime it's played, and everyone seems to enjoy this concept.
  Let us know what params you need and perhaps we can come up with alternatives for you to try........

Offline Terox

  • Former Staff
  • ****
  • Follow the Sappers!
    • zeus-community.net
Re:Admin only scripts
« Reply #2 on: 03 Jul 2004, 14:10:45 »
there isnt a way to determine who the server admin is, ingame

you can of course determine who thew group leader is etc etc and give him the options
Zeus ARMA2 server IP = 77.74.193.124 :2302
Teamspeak IP = 77.74.193.123

Offline surpher

  • Members
  • *
Re:Admin only scripts
« Reply #3 on: 03 Jul 2004, 16:42:52 »
Thanks Guys :)

Was just thinking out loud really. I did not think it would be possible and I overlooked the fact that you can determine the leader. I'm going to try and do one now.

How would I test whether leader is a player or AI?

ponq

  • Guest
Re:Admin only scripts
« Reply #4 on: 03 Jul 2004, 19:22:54 »
run this on all machines:
?(player == leader player): playerisleader = true

if one of the machines set the playerisleader value to true, you have an human as leader.

Offline surpher

  • Members
  • *
Re:Admin only scripts
« Reply #5 on: 03 Jul 2004, 20:44:36 »
Thanks :thumbsup: :cheers:

Offline Terox

  • Former Staff
  • ****
  • Follow the Sappers!
    • zeus-community.net
Re:Admin only scripts
« Reply #6 on: 04 Jul 2004, 10:28:28 »
above works for each leader of each group m8,
  what might be better, if you want an overall leader is a more complex system, which is basically made up of an array and each time a player dies / respawns, the array changes

You havent said exactly what you want this leader to do that no other can do
Zeus ARMA2 server IP = 77.74.193.124 :2302
Teamspeak IP = 77.74.193.123

Offline CrashDome

  • Members
  • *
Re:Admin only scripts
« Reply #7 on: 08 Jul 2004, 00:09:53 »
If you know the names of the admins then hard-code it in the init.sqs with

? (name player == "John Smith") : <exec dialog>

I used that successfully in MP and I know CoC has a debug script that does similar thing (where I got the idea from :) )

Problem is downloaders of the pbo cannot easily change the names so providing the source is not a bad idea. It is also very unsecure since others can join up forging your name when you are not there

Edit: bah... nevermind my idea... checking group leader is probably more fitting for your problem
« Last Edit: 08 Jul 2004, 00:11:11 by CrashDome »

Offline Chris Death

  • Former Staff
  • ****
  • Finally Death's gonna get ya
    • OFPEC
Re:Admin only scripts
« Reply #8 on: 08 Jul 2004, 14:46:56 »
Another thingy, i made once a while ago:

You can have a script only installed on the server, where
you gonna compare their playable unit's names versus the
manually filled list of possible admins. If one or more names
match, you can do further stuff then.
You need to check for the correct use of path names, when
executing the script (i need to have a look onto my ACS when
back home from work how exactly it has to be);

it's either: \missions\scriptname.sqs
or: missions\scriptname.sqs
or: missions/scriptname.sqs
or: /missions/scriptname.sqs

i can't remember exactly right now  ::)


You will need an array of all your playable units, and you will
need an array of all possible admin names.
Also you will need to check that the script will be only executed
on the server, to ensure nobody's getting a strange: "xx.sqs" not found error.

I've been using this technique for ACS (anti cheat system), and
i could succesfully determine, who has got rights to open up
a dialogue and who not.

The good thing with scripts only existing on the server is:

nobody else than one with direct server access can hack them
+ you can manually alter the admins list, while the game is running

+ you could even do that with all scripts, running on serverside
only (to improve network traffic).
:last one is a bit off topic for your situation

~S~ CD
Dont argue with idiots....they will bring you down to their level and beat you there with experience.

How to use Waypoint type Scripted