You are not logged in.
Pages: 1
This is my FIRST script ever, it used to be a test because I wanted to learn how to make them.
Afterall it became a script that can be useful for a lot of server admins.
This script has been made to print server rules (defined inside the script by admins) to clients who will type /rules in their console.
I also added a feature to print a website URL (also defined in the script) when typing /website in the console.
There are a few comments in the script which will explain how to use it.
If you want any new features, just post them here.
Here's the download link :
Enjoy
Offline
Hello,
This is a great script :)matey.
Regards,
Adrian
Offline
Oops.
For broken links, don't forget to check ETMods.net "Downloads" section.
Here's the LUA Downloads section:
http://etmods.net/index.php/dl/category/2-lua-modules
By the way I have to add some new scripts that i made there
Offline
the lua download section is down,
and this script doesnt work http://etmods.net/downloads/lua/rules.lua gives a syntax error
this is the fixed script ( i just added at line 1 and 2 the -- )
-- Simple LUA Script to print Server rules and some other useful informations to the clients who type /rules or /website
-- Script by N!trox* - Report any bugs or post any suggestion on N!tmod forum : http://etmods.net/nitmod
-- Changelog :
-- Version 1.0
-- > Initial version
-- > /rules
-- > /website
--Refister the mod
function et_InitGame(levelTime,randomSeed,restart)
et.RegisterModname("Rules")
end
-- Set to 0 if you want to disable these commands
USE_RULES = 1
USE_WEBSITE = 1
-- Set NUMRULES to the number of rules that will be printed in the client console
NUMRULES = 4
-- Add a new line for each rule.
-- Make sure you set NUMRULES value above to the correct number of rules.
rules = {
"Rule # 1",
"Rule # 2",
"Rule # 3",
"Rule # 4"
}
-- Used for /website (print a website URL in the client's console)
-- Define your website URL below
WEBSITE = "http://etmods.net"
function et_ClientCommand(clientNum, command)
command = string.lower(command)
--If a client types "/rules" in his console
if (command == "rules") and (USE_RULES == 1) then
for i=1,(NUMRULES),1 do
et.trap_SendServerCommand(clientNum, "print \"" .. rules[i] .."^7\n\"")
end
return 1
--If a client types "/website in his console
elseif (command == "website") and (USE_WEBSITE == 1) then
et.trap_SendServerCommand(clientNum, "print \"" .. WEBSITE .."^7\n\"")
return 1
end
end
Offline
Pages: 1