Evildaddy
|
  |
| Joined: 17 Apr 2010 |
| Total Posts: 5142 |
|
|
| 13 Oct 2013 03:32 PM |
Will this script lag the game since every single command monitors when a player enters?
--PERMISSIONS-- GroupId = 968384 --Your group ID here GroupRank = 254 --MAP SETTINGS-- SF = game.ServerStorage.SwordFight Formation = game.ServerStorage.Form --SWORD FIGHT-- function SwordFight(message, player) if message == "startsf" and player:IsInGroup(GroupId) and player:GetRankInGroup(GroupId) >= GroupRank and script.LevelExist.Value==false then script.LevelExist.Value=true SF.Parent=game.Workspace end end game.Players.PlayerAdded:connect(function(player) player.Chatted:connect(function(message) SwordFight(message, player) end) end)
--FORMATION-- function Form(message, player) if message == "startform" and player:IsInGroup(GroupId) and player:GetRankInGroup(GroupId) >= GroupRank and script.LevelExist.Value==false then script.LevelExist.Value=true Formation.Parent=game.Workspace end end game.Players.PlayerAdded:connect(function(player) player.Chatted:connect(function(message) Form(message, player) end) end)
--STOP FUNCTION-- function Stop(message, player) if message == "end" and player:IsInGroup(GroupId) and player:GetRankInGroup(GroupId) >= GroupRank and script.LevelExist.Value==true then script.LevelExist.Value=false end end game.Players.PlayerAdded:connect(function(player) player.Chatted:connect(function(message) Stop(message, player) end) end)
|
|
|
| Report Abuse |
|
|
bohdan77
|
  |
| Joined: 10 Aug 2008 |
| Total Posts: 7944 |
|
| |
|
Victimize
|
  |
| Joined: 09 Jun 2013 |
| Total Posts: 1789 |
|
| |
|
Evildaddy
|
  |
| Joined: 17 Apr 2010 |
| Total Posts: 5142 |
|
|
| 13 Oct 2013 05:29 PM |
| Will you stop being rude? It's my first admin commands. |
|
|
| Report Abuse |
|
|
Evildaddy
|
  |
| Joined: 17 Apr 2010 |
| Total Posts: 5142 |
|
|
| 13 Oct 2013 05:30 PM |
| Instead of being rude, why don't you shut up and show me something better and tell me how I can improve? |
|
|
| Report Abuse |
|
|
|
| 13 Oct 2013 06:14 PM |
| Someone poke it. Maybe it'll run faster. |
|
|
| Report Abuse |
|
|
bohdan77
|
  |
| Joined: 10 Aug 2008 |
| Total Posts: 7944 |
|
|
| 13 Oct 2013 06:16 PM |
| evildaddy, Advise, Look at freemodel admin commands. Learn from them, and never come back here. Go to Scripting Helpers. |
|
|
| Report Abuse |
|
|
Evildaddy
|
  |
| Joined: 17 Apr 2010 |
| Total Posts: 5142 |
|
|
| 13 Oct 2013 06:22 PM |
@Boh
If you criticize you better be able to show that you can do better. Also, I can see I posted in the wrong spot my apologies. |
|
|
| Report Abuse |
|
|
MHebes
|
  |
| Joined: 04 Jan 2013 |
| Total Posts: 2278 |
|
|
| 13 Oct 2013 06:57 PM |
| Hold up, redoing this whole thing for you. |
|
|
| Report Abuse |
|
|
MHebes
|
  |
| Joined: 04 Jan 2013 |
| Total Posts: 2278 |
|
|
| 13 Oct 2013 07:04 PM |
It's still not as efficient as it could be, not very dynamic, and I'm not sure how high your competence level for scripting is so it may be confusing, but its a heck of a lot better than before:
--PERMISSIONS-- GroupId = 968384 --Your group ID here GroupRank = 254 --MAP SETTINGS-- SF = game.ServerStorage.SwordFight Formation = game.ServerStorage.Form --SWORD FIGHT-- local Commands = {
startsf = function() -- Removed unnecessary parameters script.LevelExist.Value=true SF.Parent=game.Workspace end,
--FORMATION-- startform = function() script.LevelExist.Value=true Formation.Parent=game.Workspace end,
--STOP FUNCTION-- ["end"] = function() -- Had to do that because `end` is a keyword script.LevelExist.Value=false end,
}
game.Players.PlayerAdded:connect(function(player) if player:IsInGroup(GroupId) and player:GetRankInGroup(GroupId) >= GroupRank and script.LevelExist.Value==true then player.Chatted:connect(function(message) for _,command in pairs(Commands) do if message == command then command(message,player) -- Notice that those commands will still get the message and player passed to them end end end) end end) |
|
|
| Report Abuse |
|
|
|
| 13 Oct 2013 07:32 PM |
'Instead of being rude, why don't you shut up and show me something better and tell me how I can improve?'
>'shut up' >'tell me how I can improve'
|
|
|
| Report Abuse |
|
|
999kko
|
  |
| Joined: 05 May 2012 |
| Total Posts: 235 |
|
| |
|
999kko
|
  |
| Joined: 05 May 2012 |
| Total Posts: 235 |
|
|
| 13 Oct 2013 08:54 PM |
| You might want to add a Anti-Laag script. I have one search 999kko you'll find it |
|
|
| Report Abuse |
|
|
|
| 13 Oct 2013 09:21 PM |
| Do what Bhodan said, and never come back here. |
|
|
| Report Abuse |
|
|
Evildaddy
|
  |
| Joined: 17 Apr 2010 |
| Total Posts: 5142 |
|
|
| 13 Oct 2013 09:22 PM |
@mh
Thanks, I'll see if I can. |
|
|
| Report Abuse |
|
|
Evildaddy
|
  |
| Joined: 17 Apr 2010 |
| Total Posts: 5142 |
|
| |
|
|
| 13 Oct 2013 09:25 PM |
| That's easier than you think with the click of a Report Button. |
|
|
| Report Abuse |
|
|
Evildaddy
|
  |
| Joined: 17 Apr 2010 |
| Total Posts: 5142 |
|
|
| 13 Oct 2013 09:26 PM |
@theawe
I can tell your too lazy to come out with a good comeback. |
|
|
| Report Abuse |
|
|
|
| 13 Oct 2013 09:28 PM |
I can tell you're too lazy to: 1) Learn how to spell correctly 2) Learn the concept of efficiency 3) Learn that this is the wrong forum section to post in |
|
|
| Report Abuse |
|
|
Evildaddy
|
  |
| Joined: 17 Apr 2010 |
| Total Posts: 5142 |
|
|
| 14 Oct 2013 09:36 AM |
@Ab
Humans make mistakes. I don't have 2 use grmer it nawt scewl umad bro. and for efficentaccyy i dont eunderstand wut usayingggg |
|
|
| Report Abuse |
|
|
|
| 14 Oct 2013 09:49 AM |
Get out.
I'm one of the nicer ones here, too. And if I'm saying that, that must mean the not-so-kind ones will be flaming you.
Learn the concept of efficiency, like the people above said. This is some of the most horrible code I've seen.
Now, get out, or Sorcus is going to relocate you to banland. PERMANENTLY. |
|
|
| Report Abuse |
|
|
|
| 14 Oct 2013 09:58 AM |
| "Someone poke it. Maybe it'll run faster." --This is a keeper. LOL |
|
|
| Report Abuse |
|
|
Evildaddy
|
  |
| Joined: 17 Apr 2010 |
| Total Posts: 5142 |
|
|
| 14 Oct 2013 10:00 AM |
| Guys, I'm sorry. I know I've been a jerk. Go here for a gift: www.roblox.com/care |
|
|
| Report Abuse |
|
|
|
| 14 Oct 2013 10:02 AM |
No, these are more suitable for the situation:
http://www.roblox.com/unnamed-item?id=118311535 http://www.roblox.com/unnamed-item?id=120456189 |
|
|
| Report Abuse |
|
|
Evildaddy
|
  |
| Joined: 17 Apr 2010 |
| Total Posts: 5142 |
|
|
| 14 Oct 2013 10:05 AM |
| Come on, rage more please. While you are having a fit, I'mma do something useful. |
|
|
| Report Abuse |
|
|