Author Topic: admin.dat custom commands  (Read 8686 times)

pvt.kitteh

  • Posts: 2
  • Turrets: +0/-0
admin.dat custom commands
« on: August 16, 2008, 06:01:49 am »
hello everyone, I have got a question about custom commands in the admin.dat file for a server
say for example, you know the CP command in the console? say I wanted admins ingame to go
!cp yo
and it would display yo in the center, is there a way to do that
say like
Code: [Select]
[command]
command = cp <argument>
exec    = cp <argument>
desc    = use the CP command ingame
levels  = 4 5
would the <argument> be picked up by the game, cause I tried this, and nothing happons, but I have other custom commands that do not take arguments, so I wondered if it can be done, I have NO clue about QVMS or what files to put in them, so I cannot do it that way, cause I do not know how ^^
so, any help is appreciated thank you.

kevlarman

  • Posts: 2737
  • Turrets: +291/-295
Re: admin.dat custom commands
« Reply #1 on: August 16, 2008, 06:15:47 am »
admin.dat command blocks can't take arguments, however lakitu7's game.qvm has !cp implemented as a full admin command.
Quote from: Asvarox link=topic=8622.msg169333#msg169333
Ok let's plan it out. Asva, you are nub, go sit on rets, I will build, you two go feed like hell, you go pwn their asses, and everyone else camp in the hallway, roger?
the dretch bites.
-----
|..d| #
|.@.-##
-----

pvt.kitteh

  • Posts: 2
  • Turrets: +0/-0
Re: admin.dat custom commands
« Reply #2 on: August 16, 2008, 07:58:06 am »
Ok, thanks, I saw a thing from the MC clan, but I do not quite understand the .PATCH and stuff, so I will look at this QVM instead, I had a few ideas ruined tho ^^ but if it isnt possible, it isn't possible(probley so admins cant easily abuse players...)

daenyth

  • Posts: 230
  • Turrets: +21/-26
Re: admin.dat custom commands
« Reply #3 on: August 19, 2008, 08:51:46 pm »
Currently the only way to get admin commands with arguments is to patch game.qvm's source for it.
Quote from: Bullislander05
It's like trying to take apple seeds out of a zebra to plant a giraffe tree.

googles

  • Posts: 219
  • Turrets: +30/-19
Re: admin.dat custom commands
« Reply #4 on: August 19, 2008, 10:11:05 pm »
kevlarman is correct, my !cp command was inherited into his QVM

Lakitu7

  • Tremulous Developers
  • *
  • Posts: 1002
  • Turrets: +120/-73
Re: admin.dat custom commands
« Reply #5 on: August 19, 2008, 11:16:34 pm »
kevlarman is correct, my !cp command was inherited into his QVM

I did increase its functionality several times over, though. But yeah, you're credited. :)

Amanieu

  • Posts: 647
  • Turrets: +135/-83
    • Amanieu
Re: admin.dat custom commands
« Reply #6 on: August 20, 2008, 12:45:47 am »
It can be done if you run tremulous-amanieu on your server. I do not know of any other qvm that has my patch for that.
Quote
< kevlarman> zakk is getting his patches from shady frenchmen on irc
< kevlarman> this can't be a good sign :P

{A}saxon

  • Posts: 49
  • Turrets: +9/-18
    • The Winebar is open
Re: admin.dat custom commands
« Reply #7 on: September 11, 2008, 11:11:07 pm »
Hi you can make a CP messge in your base folder like this.

open note pad and make a message you want your admins to have access to via a command.
i made a message like this for my server.

cp ^7Welcome to the ^1Winebar...
wait 200
cp ^7SD at ^245. ^7TL at ^260. ^7FF/Unlagged ^2OFF.
wait 200
cp ^7Play ^3Nice, ^7Be ^3Fair, ^7Have ^3Fun.

save as CP1.CFG and place it in your base folder. i believe its the hidden base folder in application data/tremulous/base.

now go to your admin.dat file and create a command line like so.

[command]
command = INFO                                                         (info is the name of the command)
exec    = exec cp1.cfg                                                 (exec cp1.cfg  this line executes the command)
desc    =
levels  = 5 4 3 6                                                          (this the admin levels that have the command)

now when you do !help in game you will see the new command as !INFO
make as many as you want like this just change cp1 with cp2 and so on.
remember to change the exec cp number as well if you make more commands this way.
Camping is part of the game. Campers never win anyway, Or do they ?