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
Threaded 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
09-01-2016, 12:16 PM,
#2
TheOneAndOnlyTee Offline
GMod Admin
Posts: 755
Threads: 47
Joined: Oct 2013
RE: Chat Command Library
should probably put "For SF Developers" somewhere so random 'people' don't ask me/you "how i ose dis".

Steam Profile
My Discord Server
Need help with E2 or SF? , just ask me and i'll try to help.
[Image: 98Dkcoz.gif]
Find
Reply
10-01-2016, 12:59 AM,
#3
Blackhawk Offline
GMod Admin
Posts: 204
Threads: 9
Joined: Sep 2013
RE: [For SF Developers] Chat Command Library
Nice idea and good job, I really need to play more gmod Big Grin
And for the negative comments, they are more useful than positive ones if they are constructive.
Find
Reply
10-01-2016, 01:19 AM,
#4
Red The Blue Color Offline
TSCM Super Donating Member
****
Posts: 422
Threads: 34
Joined: Feb 2015
RE: [For SF Developers] Chat Command Library
(10-01-2016, 12:59 AM)Blackhawk Wrote: Nice idea and good job, I really need to play more gmod Big Grin
And for the negative comments, they are more useful than positive ones if they are constructive.

Thanks, and when I said negative comments I meant the asshole ones Big Grin i love constructive criticism when it's helpful.

"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
11-01-2016, 10:01 AM,
#5
Liizzii Offline
Moderation Neko
*****
Posts: 130
Threads: 12
Joined: Sep 2013
RE: [For SF Developers] Chat Command Library
it's Lua, not LUA. Name, not acronym.

I've already fixed it in your main post.

Other than that looks pretty good, not sure if I'll use it myself because I have my own way of getting chat messages Smile

I like custard.
Sometimes I think I'm too sarcastic....
My site: http://www.theender.net
Website Find
Reply
11-01-2016, 11:53 AM,
#6
Yuri6037 Offline
TSCM Member
***
Posts: 216
Threads: 45
Joined: Feb 2015
RE: [For SF Developers] Chat Command Library
Good job, interesting function... You just copied my idea of storing user names for later demote !
Anyways, good for new SF debs that have never touched any other language. However for me command system is highly more complexe as I use a similarity algorithm on LanAI Next. Version not even tested yet...
Find
Reply
« Next Oldest | Next Newest »


  • View a Printable Version
Forum Jump:


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

Powered By MyBB, © 2002-2026 MyBB Group.