Jump to content

  • Log in with Facebook Log in with Twitter Log In with Google Log In with Steam Sign In
  • Create Account
Photo

Custom commands.


  • Please log in to reply
7 replies to this topic

#1
OFFLINE   makavelii

makavelii

    Member

  • Members
  • PipPip
  • 49 posts
35
Getting Better

Another question, yes im total noob:P

I would like to add new commands to my server, eg. !Afk which puts you spec/ !forum which shows the forum.
I've recieved this kind of template from one of my friends but not able to use it..
[command]
command =
exec =
desc =
levels =

Hope you can help.



#2
OFFLINE   TheSilencerPL

TheSilencerPL

    Advanced Member

  • Management
  • PipPipPipPip
  • 3097 posts
216
On the road to fame
  • LocationPoland

Here are examples:

[command]
command  = hasta
exec     = playsound sound/ksl/teasing/hasta.wav; cp ^1hasta la vista [k]!!
desc     = don't spam
syntax   = 
levels   = 2 3 4 5 

[command]
command  = maxbots
exec     = bot maxbots [1]; cp ^2Number of bots has been changed: ^1[1] ^2:); playsound sound/misc/referee.wav
desc     = changes max bots in game [0/32]
syntax   = 
levels   = 3 4 5 

[command]
command  = kickbotsa
exec     = bot minbots 0; bot maxbots 0; bot kickall; cp ^2Bots hass been kicked from the server ^2:); playsound sound/misc/referee.wav
desc     = ^2kicks bots from the server
syntax   = 
levels   = 3 4 5 

[command]
command  = maxpanzer
exec     = team_maxPanzers [1]; cp ^2Max panzers allowed has been changed: ^1[1] ^2:); playsound sound/misc/referee.wav
desc     = ^2Changes max allowed panzas per team [0/999]
syntax   = 
levels   = 3 4 5 

[command]
command  = headshotm
exec     = g_headshot [1]; cp ^2HEADSHOT MODE HAS BEEN SET TO: ^1[1]; playsound sound/misc/referee.wav
desc     = ^2 SETTING OF HEADSHOT MODE [1/2] [1]KILLS [2]KILLS AND GIBS :)
syntax   = 
levels   = 3 4 5 

[command]
command  = knifewar
exec     = g_knifeonly [1]; g_maxKnives [1] ; cp ^2KNIFE WAR HAS BEEN TURNED ON! KNIVES: ^1[1]; playsound sound/misc/referee.wav
desc     = ^2TURNS ON KNIFEWAR and sets knives number
syntax   = 
levels   = 3 4 5 

command = name of the command
exec = what to execute, actual command code
desc = description
levels = which shrubbot levels can execute the command

 

 

And place the commands in the shrubbot.cfg file in the silent/database directory.



#3
OFFLINE   gaoesa

gaoesa

    Advanced Member

  • Management
  • PipPipPipPip
  • 4391 posts
341
Will become famous
  • LocationFinland

Don' forget to read the documentation http://mygamingtalk....ot#shrubbot.cfg



#4
OFFLINE   makavelii

makavelii

    Member

  • Members
  • PipPip
  • 49 posts
35
Getting Better

and what type of exec would I need to make for command AFK, the one that puts the player in spec?



#5
OFFLINE   gaoesa

gaoesa

    Advanced Member

  • Management
  • PipPipPipPip
  • 4391 posts
341
Will become famous
  • LocationFinland

You can put into exec anything that you can do with rcon.

 

Might work for placing one player to spec, but I didn't test this.

exec = !putteam "[1?]" s



#6
OFFLINE   makavelii

makavelii

    Member

  • Members
  • PipPip
  • 49 posts
35
Getting Better

You can put into exec anything that you can do with rcon.

 

Might work for placing one player to spec, but I didn't test this.

exec = !putteam "[1?]" s

nope doesnt work :/



#7
OFFLINE   gaoesa

gaoesa

    Advanced Member

  • Management
  • PipPipPipPip
  • 4391 posts
341
Will become famous
  • LocationFinland

Sorry, I didn't read the question carefully and the example was a redundant command anyway. This should work for your case.

exec = putteam "[n]" s

I'm not sure if it needs the '!' in front or not. Be sure you have the "-characters in place. That way the command will not get confused if the name includes spaces in between.



#8
OFFLINE   makavelii

makavelii

    Member

  • Members
  • PipPip
  • 49 posts
35
Getting Better

Thanks! It works :)






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users