| How to make a SIMPLE command script | |
|
+3Prodigy Bobbyfishstick5 naknak 7 posters |
Author | Message |
---|
naknak Administrator
Posts : 878 Join date : 2010-07-30
| Subject: How to make a SIMPLE command script July 31st 2010, 9: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, 12:28 pm; edited 1 time in total (Reason for editing : It needed more explaination) | |
|
| |
Bobbyfishstick5 Expert Scripter
Posts : 13 Join date : 2010-07-30 Age : 28
| Subject: Re: How to make a SIMPLE command script July 31st 2010, 10:34 am | |
| | |
|
| |
naknak Administrator
Posts : 878 Join date : 2010-07-30
| Subject: Re: How to make a SIMPLE command script July 31st 2010, 10: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, 10: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 : 878 Join date : 2010-07-30
| Subject: Re: How to make a SIMPLE command script July 31st 2010, 12:29 pm | |
| there, it is fixed (I think) | |
|
| |
blueymaddog Administrator
Posts : 1081 Join date : 2010-12-09 Age : 26
| Subject: Re: How to make a SIMPLE command script January 18th 2011, 7:29 am | |
| yep. This would give people a great start to chat commands! | |
|
| |
lukenuke75 Novice Scripter
Posts : 38 Join date : 2011-03-07 Age : 27
| Subject: Re: How to make a SIMPLE command script March 8th 2011, 5: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 : 878 Join date : 2010-07-30
| Subject: Re: How to make a SIMPLE command script March 8th 2011, 11: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 : 26
| Subject: Re: How to make a SIMPLE command script March 27th 2011, 6: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
| |
|
| |
naknak Administrator
Posts : 878 Join date : 2010-07-30
| Subject: Re: How to make a SIMPLE command script March 27th 2011, 9: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, 9: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 : 878 Join date : 2010-07-30
| Subject: Re: How to make a SIMPLE command script March 30th 2011, 7: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 : 26 Location : Holland
| Subject: Re: How to make a SIMPLE command script April 4th 2011, 8: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 : 878 Join date : 2010-07-30
| Subject: Re: How to make a SIMPLE command script April 4th 2011, 6: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 : 27
| Subject: Re: How to make a SIMPLE command script August 13th 2011, 3:57 pm | |
| Great tutorial, though you could explain it a lot better. I know what your tkling about but do you think others might? | |
|
| |
naknak Administrator
Posts : 878 Join date : 2010-07-30
| Subject: Re: How to make a SIMPLE command script August 16th 2011, 7:18 pm | |
| That is why it isn't in the beginners section. Of course who is to say what is what difficulty. | |
|
| |
lukenuke75 Novice Scripter
Posts : 38 Join date : 2011-03-07 Age : 27
| Subject: Re: How to make a SIMPLE command script August 19th 2011, 1:08 am | |
| True, thought I thought this was complicated when I first came here. So who can judge, I guess they can learn off of it. | |
|
| |
blueymaddog Administrator
Posts : 1081 Join date : 2010-12-09 Age : 26
| Subject: Re: How to make a SIMPLE command script November 20th 2011, 6:14 am | |
| - lukenuke75 wrote:
- 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 personally I think that his use for anonymous functions was fine, since he was only using the code in that function once! | |
|
| |
Sponsored content
| Subject: Re: How to make a SIMPLE command script | |
| |
|
| |
| How to make a SIMPLE command script | |
|