Team Spartan Cookies & Milk Forums
  • Issue Tracker
  • Donations
  • Search
  • Member List
  • Help

Register

Team Spartan Cookies & Milk Forums Garry's Mod Starfall v
« Previous 1 … 10 11 12 13 14 … 18 Next »
Release [For SF Developers] Chat Command Library
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Linear Mode
Release [For SF Developers] Chat Command Library
09-01-2016, 05:02 AM, (This post was last modified: 09-01-2016, 10:18 PM by Red The Blue Color.)
#1
Red The Blue Color Offline
TSCM Super Donating Member
****
Posts: 422
Threads: 34
Joined: Feb 2015
[For SF Developers] Chat Command Library
I just finished a Chat Lib that makes Chat commands even more basic(Including basic permission system 1-10 levels)

Credit: Superplayer for the idea and some code off his shared Big Grin

Features:

Basic Permissions System: 1-10 levels Add a player with /add PlyName RankNumber (0 removes) Access in Lua with
 SaveFile.Permissions[PlyConfusedteamID()] 
Will return number rank

Player name saving: Useful for when players aren't in the server and you still want to show their names on Starfall Screens Access in Lua with
 SaveFile.Players[PlyConfusedteamID()] 

Chat Command Registering and Running: Register chat commands easily Example:
RTBC.registerCommand(StringName, RankNumber, function(Args, Player) end StringNmae is Whats typed into chat ex: /level, Args is a Table
with everything typed after /level, Player gives player that ran command

level 1 commands can be run by level 1 and higher etc etc, level 0 are global player commands which can be ran by anyone

RTBC.registerCommand("level", 0, function(chatStr, Ply) 
local Player, Who = nil
if chatStr[1] == nil then
Player = Ply
Who = "You have"
else
Player = find.playerByName(chatStr[1])
if IsValid(Player) then
Who = Player:name().." has"
end
end

if IsValid(Player) then
if SaveFile.Permissions[PlayerConfusedteamID()] == nil then
Lvl = 0
else
Lvl = SaveFile.Permissions[PlayerConfusedteamID()]
end
bot("p",Who.." level "..Lvl.." access", colors.defualt, Ply)
end
end)

Planned Features:

Better Saving system with more modular aspects

Get it on shared or in attachment.

Please give any tips and advice on how it can be improved and where Big Grin No negative posts *cough* T-17 *cough*, please only positive.


Big Grin Happy Coding! Big Grin


Attached Files
.txt   ChatCMDLib.txt (Size: 5.68 KB / Downloads: 13)

"with it's superior software, i have no doubt it will succeed in finding fuck all" - T-17, 2016

[Super Member] [ENCOM] т-ѕсм.Red The Blue Color™: server do you support Hitler?
[Server] srcds_linux: The probabilty is about 99.99%, so interpret that how you want to.
Find
Reply
« Next Oldest | Next Newest »


Messages In This Thread
[For SF Developers] Chat Command Library - by Red The Blue Color - 09-01-2016, 05:02 AM
RE: Chat Command Library - by TheOneAndOnlyTee - 09-01-2016, 12:16 PM
RE: [For SF Developers] Chat Command Library - by Blackhawk - 10-01-2016, 12:59 AM
RE: [For SF Developers] Chat Command Library - by Red The Blue Color - 10-01-2016, 01:19 AM
RE: [For SF Developers] Chat Command Library - by Liizzii - 11-01-2016, 10:01 AM
RE: [For SF Developers] Chat Command Library - by Yuri6037 - 11-01-2016, 11:53 AM

  • View a Printable Version
Forum Jump:


Users browsing this thread: 1 Guest(s)
Contact UsTeam Spartan Cookies & MilkReturn to TopLite (Archive) ModeMark all forums readRSS Syndication

Powered By MyBB, © 2002-2026 MyBB Group.