| | How to make a SIMPLE command script | |
|
|
| Author | Message |
|---|
naknak Administrator


Posts: 865 Join date: 2010-07-30
 | Subject: How to make a SIMPLE command script July 31st 2010, 6:22 am | |
| There really is know simple way to make a command script, but we can make a simplified one. Here is a short reset command script: | Code: | game.Players.PlayerAdded:connect(function(newPlayer) --when an new player enters... newPlayer.Chatted:connect(function(msg) --they can chat to activate the function... if msg:lower() == "reset" then --and if they said "reset"... if newPlayer.Character then --and they have a character, newPlayer.Character:BreakJoints() --then you die end end end) end) |
There are better ways to organize this kind of script if there are multiple commands, if you want to know how, please ask...
Last edited by naknak on July 31st 2010, 9:28 am; edited 1 time in total (Reason for editing : It needed more explaination) |
|
 | |
Bobbyfishstick5 Expert Scripter


Posts: 13 Join date: 2010-07-30 Age: 17
 | Subject: Re: How to make a SIMPLE command script July 31st 2010, 7:34 am | |
| |
|
 | |
naknak Administrator


Posts: 865 Join date: 2010-07-30
 | Subject: Re: How to make a SIMPLE command script July 31st 2010, 7:38 am | |
| I am the only one with any reputation right now :D |
|
 | |
Prodigy Administrator


Posts: 58 Join date: 2010-07-28
 | Subject: Re: How to make a SIMPLE command script July 31st 2010, 7:56 am | |
| Moved it to a better suited forum(The intermediate one).
You should break down and explain the script, so they don't just copy and paste. |
|
 | |
naknak Administrator


Posts: 865 Join date: 2010-07-30
 | Subject: Re: How to make a SIMPLE command script July 31st 2010, 9:29 am | |
| there, it is fixed (I think) |
|
 | |
blueymaddog Administrator


Posts: 1081 Join date: 2010-12-09 Age: 14
 | Subject: Re: How to make a SIMPLE command script January 18th 2011, 3:29 am | |
| yep. This would give people a great start to chat commands! _________________ blueymaddog Administrator • Moderator • Expert Scripter PM: blueymaddog<+1 post. ujelly?> |
|
 | |
lukenuke75 Novice Scripter


Posts: 38 Join date: 2011-03-07 Age: 16
 | Subject: Re: How to make a SIMPLE command script March 8th 2011, 1:26 pm | |
| Personally i would not have used an anonymous function. Mainly because it is not as neat as the declared functions. Plus, i think it would be easier to use the declared function instead. Thus giving you more room and less confusion over what goes where.
5/10 |
|
 | |
naknak Administrator


Posts: 865 Join date: 2010-07-30
 | Subject: Re: How to make a SIMPLE command script March 8th 2011, 7:39 pm | |
| If I wrote it, I know exactly what it says. My scripting style is just extremely messy. |
|
 | |
blueymaddog Administrator


Posts: 1081 Join date: 2010-12-09 Age: 14
 | Subject: Re: How to make a SIMPLE command script March 27th 2011, 3:31 am | |
| lol, most of the time my scripts don't make sense to people cuz my vats are abbreviated and shorted. eg: Player becomes pl. :P
_________________ blueymaddog Administrator • Moderator • Expert Scripter PM: blueymaddog<+1 post. ujelly?> |
|
 | |
naknak Administrator


Posts: 865 Join date: 2010-07-30
 | Subject: Re: How to make a SIMPLE command script March 27th 2011, 6:39 pm | |
| Workspace becomes "W", Lighting becomes "L", etc... If you were to read one of my more large scripts you wouldn't be able to get very far. |
|
 | |
Supernapalm Expert Scripter


Posts: 393 Join date: 2011-01-17
 | Subject: Re: How to make a SIMPLE command script March 29th 2011, 6:09 pm | |
| well my variables are declared in alphabetical order AND compressed. so if i declared Workspace, Lighting, SoundService all in order it would be something like this:
a=workspace b=game.Lighting c=game.SoundService
so my in line scripting would just keep going until it reaches the maximum length of the line. oh, and i count my code length in commands. and this script is 3 lines long |
|
 | |
naknak Administrator


Posts: 865 Join date: 2010-07-30
 | Subject: Re: How to make a SIMPLE command script March 30th 2011, 4:25 am | |
| if you used "a=workspace" then any smart virus could break that script ;) |
|
 | |
myrco919 Intermediate Scripter


Posts: 190 Join date: 2011-01-21 Age: 14 Location: Holland
 | Subject: Re: How to make a SIMPLE command script April 4th 2011, 5:38 am | |
| | naknak wrote: | | If I wrote it, I know exactly what it says. My scripting style is just extremely messy. |
Oh my. really? |
|
 | |
naknak Administrator


Posts: 865 Join date: 2010-07-30
 | Subject: Re: How to make a SIMPLE command script April 4th 2011, 3:39 pm | |
| Was that sarcasm? If not, yes I write very messy but as long as the job gets done, no one cares. |
|
 | |
lukenuke75 Novice Scripter


Posts: 38 Join date: 2011-03-07 Age: 16
 | Subject: Re: How to make a SIMPLE command script August 13th 2011, 12:57 pm | |
| Great tutorial, though you could explain it a lot better. I know what your tkling about but do you think others might? |
|
 | |
| | How to make a SIMPLE command script | |
|