|
I decided to go ahead and work on my commands. I, unlike person299, am loading the commands from my model so if anyone abuses them I can just deactivate them. Anyways, so far I only have two commands but I have the saveData function and loadData function.
saveData(player, key, value, force)
loadData(player, key, value, force)
in loadData value is like "number", "instance", "string", "boolean". force can be nil but if its not than it autoforces the method to be wahtever example...
add("text","number");
loadData(player, "text", "string", true); --> auto force makes it use player:loadNumber("text");
Basically this function just uses knowledge of the value to determine which method of persistence to use. Nothing special really but ya... Current commands....
tban/player/time - bans a player for time(in mins)
set/player/key/value - sets a datapersistent value
Basically I am jsut wanting to discuss some ideas for this before I go any further. Anyone want to suggest some stuff? |
|
|
Admin commands?
I am working on one too. We're gonna have a competition! |
|
SamacadoJoin Date: 2008-02-16 Post Count: 25119 |
I made an item drop system in the spirit of TF2.
I just... don't have any items to drop... |
|
wiiplayJoin Date: 2008-05-28 Post Count: 17801 |
Why not use Person299's as a BASE! :D Then add a way to easily load extra commands into the script o3o |
|
|
@wii - YEAH THAT IS A GREA-
no. |
|
bombpawJoin Date: 2009-03-15 Post Count: 3484 |
Person has his encrypted and it will take to long to undo that :P |
|
sncplay42Join Date: 2008-11-27 Post Count: 11891 |
"Person has his encrypted"
Unless he actually made a new one, nope. |
|
oysi93Join Date: 2008-04-27 Post Count: 12469 |
Suddenly you want Person299's commands? I don't wanna' sound rude or
anythin', but his commands aren't really that good. ...At all... |
|
|
@oysi
No, they aren't anything brilliant, but he put a lot of tiime and effort into them, and they actually do do something (somewhat) useful =P
They are sorta like the omega commands (holy CRAP that's copied alot) they don't use overly advanced stuff, but they take the basics pretty afr.
Wow, several sentances for something that can be said in one, my work here is done =D |
|
|
@sncplay42 - His code is so messy that you can officially call it "encrypted". |
|
7rmb7Join Date: 2008-12-11 Post Count: 2096 |
@Snow
Agreed x 100.
It took me an hour to decipher it. |
|
|
I'm not gonnah use his as a base... I am gonnah take my own route and direction with this. I may make it easier on the creator and make a gui login with pass. |
|
bloccoJoin Date: 2008-08-14 Post Count: 29474 |
You lost me when you described your force parameter. |
|
|
I just now updated it to handle multiple command args.... example:
--parseMessage is a custom function.
cmd,players,value=parseMessage("hey/go,stop,walk,run/what");
print(cmd, players, value)
print(unpack(players))
--> Output
Wed Feb 16 19:25:44 2011 - Running Script 'Script'
hey table: 12744308 what
go stop walk run |
|
|
@Blocco, let me show you the saveData function.
function saveData(player, key, value, force)
local dataType=type(value);
local item=true;
if(force~=nil)then
dataType=autoSet[key]; --autoSet is a table
end
if(dataType=="string")then
player:saveString(key, value);
elseif(dataType=="boolean")then
player:saveBoolean(key, value);
elseif(dataType=="userdata")then
player:saveInstance(key, value);
elseif(dataType=="number")then
player:saveNumber(key, value);
else
item=false;
print(LibraryName..":", "Save Unknown Data Type - "..key..","..value);
end
return item;
end |
|
|
I added the login screen. Non-admins that aren't preset can say loginscreen and it will show a screen that they can enter the code in. If you don't want people to have access to the code than use UPPERCASE characters for the code variable. |
|
|
Oh ya but since I can't test it now I have positioned or sized the window yet I just set up its functions. |
|