i have a question
how to freeze all of the players using speedmod
because i've tried
and i tried this too
Quote
speedmod 1,2,3,4,5,6,7,8,9,10 -100
Help Me Please Admin/mod comment
This is a script question. Moved. /DC 1
2
3
for _, id in pairs(player(0, "tableliving") do
	parse ("speedmod "..id.." -100")
end
Actually, the speedmod command it should work. Whenever you use a command in the server, first you must write the RCon password before using a command in the console on your server. Of course, you have to check carefully the ID of the player (not the U.S.G.N. ID one so don't confuse them), otherwise if you specify a random ID then it won't take effect.
Moreover when you write a command, you must write "rcon" first to take effect (only if you wrote the RCon Password).
Example:
GeoB99, I think you've misread his message. He wanted to freeze all players. speedmod -24.9999 and more = player can move
speedmod -25 and less = player can't move edited 1×, last 18.05.15 04:44:59 pm
@ Pagyra: speedmod has a range from -100 to +100. (Do you mean -100 and 100?)
@topic:
Maybe you want something like this? (Lua version)
1
2
3
4
5
for _, id in pairs(player(0, "tableliving") do
	if (player(id,"speedmod")~=0) then
		parse ("speedmod "..id.." -100")
	end
end
So, all players that do NOT have normal speed (which is 0) they will get freezed.
Edit:
To freeze people you need to use the "parse(cmd)" command.
This cmd is the same as in the in game console (open with ^).
The syntax of speedmod is:
speedmod <id> <speed value>
This means you need to edit every value manually.
So you need it to write this:
1
2
3
4
parse("speedmod 1 -100")
parse("speedmod 2 -100")
parse("speedmod 3 -100")
...
But of course we use "for" loops to make our life easier. (see Talented Doge s code)
Edit2:
this isnt about lua.
If you want to use only commands then you need to type EVERY ID manualy:
1
2
3
4
parse("speedmod 1 -100")
parse("speedmod 2 -100")
parse("speedmod 3 -100")
...
You cant do it on another way via cmd.
If you really want to freeze all players you should use lua. edited 1×, last 18.05.15 04:41:45 pm
@ Bowlinghead: i mean speedmod -25 = speedmode > -25
speedmod -24.9999 and more = player can move
speedmod -25 and less = player can't move Talented Doge has written
GeoB99, I think you've misread his message. He wanted to freeze all players.
I know right, that he want to freeze all players. My option is an alternative one that he can do it separately without a Lua script and yeah is a pain in the arse to do it so he can choose something more easier by other alternatives above by you and Bowlinghead. edited 2×, last 18.05.15 05:12:24 pm
Thanks Yuki And Bowlinghead
I typed it manually
At the lua thanks everyone Make a bind so you don't have to do it all the time. Will save a ton of time. At last i used these commands
its not easy to edit / add commands at hc admin script but
tadaa
Quote
hc.add_say_command("speedmod", hc.moderation.speedm_say_command, hc.MODERATOR1, "<id> <speed>", "Speed a player.")
Spoiler Quote
function hc.moderation.speedm_say_command(p, id)
hc.exec(p, "speedmod 1 " .. id)
hc.exec(p, "speedmod 2 " .. id)
hc.exec(p, "speedmod 3 " .. id)
hc.exec(p, "speedmod 4 " .. id)
hc.exec(p, "speedmod 5 " .. id)
hc.exec(p, "speedmod 6 " .. id)
hc.exec(p, "speedmod 7 " .. id)
hc.exec(p, "speedmod 8 " .. id)
hc.exec(p, "speedmod 9 " .. id)
hc.exec(p, "speedmod 10 " .. id)
hc.exec(p, "speedmod 11 " .. id)
hc.exec(p, "speedmod 12 " .. id)
hc.exec(p, "speedmod 13 " .. id)
hc.exec(p, "speedmod 14 " .. id)
hc.exec(p, "speedmod 15 " .. id)
end
I suggest you ask HappyCamper for this. 1
hc.add_say_command("s", hc.moderation.s_say_command, hc.MODERATOR1, "", "FREEZE", true)
1
2
3
4
5
function hc.moderation.s_say_command(p, arg)
	for _, id in pairs(player(0, "tableliving")) do
		parse("speedmod "..id.." -100")
	end
end
XoOt Super User Offline
Well he is busy with some stuff like his community. You could try to contact him there. @ XoOt:
oh you're right
my bad