Jump to content

Custom commands.


makavelii

Recommended Posts

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.

Link to comment
Share on other sites

  • Management

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.

Link to comment
Share on other sites

  • Management

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...