Currently the developers are putting their own money into JC2-MP to keep the servers online.

Please take a few seconds of your time and disable your AdBlock plugin for our website.

Ad revenue is not going to developers, it is used purely for covering our hosting costs.

 

You are also free to donate, which removes all ads from our website!

Patch 0.3 was just released! Full changelog here: https://t.co/4A50m6IKen

2 years ago

Advertisement
August 23, 2019, 11:58:14 pm

Author Topic: Admin Commands  (Read 2004 times)

Aephik

  • Donator
  • Newbie
  • *****
  • Posts: 1
    • View Profile
Admin Commands
« on: December 17, 2013, 01:38:47 am »
I've been porting my very basic admin commands over from Garry's Mod. These are very basic but functional and easy to edit for those who don't know too much Lua.

Installation Instructions
  • Download the admincommands.zip attachment from this post
  • Unzip the admincommands directory to your JC-MP scripts folder
  • Edit line 1 of /admincommands/server/admincommands.lua and throw in your own steam ID in the admin table. The second number is the rank for that player.
  • Type load admincommand in console or restart your server

Notes
  • You can script in your own commands by looking at the examples I've already written under the commands table.
  • Each command has its own rank. If you want anyone to use the command set the rank to 0. Otherwise, it will check to see if the user is in the admins table and if their rank is greater than or equal to the commands defined rank. This allows you to give certain commands to certain people.

Examples
Admins table:
local admins = {
   ["STEAM_0:0:25914952"] = 100,
   ["Another SteamID"] = 10,
   ["Yet another SteamID"] = 30,
}

To-Do
Add function to allow admin commands to be more easily added
« Last Edit: December 17, 2013, 01:41:33 am by Aephik »