English Commands for Hc.

5 replies
Goto Page
To the start Previous 1 Next To the start
15.06.18 09:30:40 pm
Up
ImQuiet
User
Offline Off
Hi everyone,

I have a lua of commands, if anybody can help me for covert commands into hc script commands so i will be very thankful to him and much appreciate him.

Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
This Script Created by My Friend -- KingShadow.
                      Don't forget for appreciate him.

PLAYER={} 



----Hooks-------
addhook("say","_say")
addhook("join","_join")
----------------

function _join(id)
msg2(id,"\169000255000Welcome To \169000255255" ..game('sv_name').." ! \169000255000Hope you Enjoy Here!")
PLAYER[id] = {}
PLAYER[id].name = player(id,"name") 
PLAYER[id].usgn = player(id,"usgn") 
PLAYER[id].ip = player(id,"ip") 
end

addhook("say","_say")
function _say(id,txt)
     if PLAYER[id].muted == true then
          error(id,txt,4)
          return 1
          end
if txt:sub(1,5)=="!kick" then
t = tonumber(txt:sub(7,8))
local r = txt:sub(9)
parse('kick '..t..' "'..r)
msg("\169255000000"..PLAYER[t].name.." \169255255255Has Been Kicked by  \169000255000#"..PLAYER[id].name.." \169255255000[Reason: "..r.."]")
return 1
end
if txt:sub(1,4)=="!ban" then     
t = tonumber(txt:sub(6,7))
local r = txt:sub(8)
parse('banip '..t..' "'..r)     
msg("\169255000000"..PLAYER[t].name.." \169255255255Has Been Banned by  \169000255000#"..PLAYER[id].name.." \169255255000[Reason: "..r.."]")
return 1
end
if txt:sub(1,5)=="!kill" then
t = tonumber(txt:sub(7,8))
r = txt:sub(9)
parse('killplayer '..t..' 0 "'..r)
msg("\169255000000"..PLAYER[t].name.." \169255255255Got Staff-Killed by  \169000255000#"..PLAYER[id].name.." \169255255000[Reason: "..r.."]")
return 1     
end
if txt:sub(1,6)=="!strip" then  --- To Remove ALL Weapons of player
t = tonumber(txt:sub(8,9))
parse('strip '..t..' all')
msg("\169255000000"..PLAYER[t].name.." \169255255255Got Stripped by  \169000255000#"..PLAYER[id].name.."")
return 1     
end
if txt:sub(1,6)=="!bring" then
t = tonumber(txt:sub(8,9))
parse("setpos "..t.." "..player(id,"x").." "..player(id,"y").."")
parse('effect "colorsmoke" '..player(id,'x')..' '..player(id,'y')..' 48 32 0 128 255')
msg("\169000255000"..PLAYER[id].name.." \169255255255Brought \169255000000#"..PLAYER[t].name.."")
return 1
end
if txt:sub(1,5)=="!goto" then
t = tonumber(txt:sub(7,8))
parse("setpos "..id.." "..player(t,"x").." "..player(t,"y").."")
parse('effect "colorsmoke" '..player(t,'x')..' '..player(t,'y')..' 48 32 0 128 255')
msg("\169000255000"..PLAYER[id].name.." \169255255255Teleported To \169255000000#"..PLAYER[t].name.."")
return 1
end
if txt:sub(1,7)=="!freeze" then
t = tonumber(txt:sub(9,10))
parse("speedmod "..t.." -100")
msg("\169255000000"..PLAYER[t].name.." \169255255255Got Freezed by  \169000255000#"..PLAYER[id].name.."")

return 1
end
if txt:sub(1,9)=="!unfreeze" then
t = tonumber(txt:sub(10,11))
parse("speedmod "..t.." 0")
msg("\169255000000"..PLAYER[t].name.." \169255255255Got UnFreezed by  \169000255000#"..PLAYER[id].name.."")
return 1
end
if txt:sub(1,5)=="!warn" then
t = tonumber(txt:sub(7,8))
r = txt:sub(9)
parse('slap '..t)
msg("\169255000000"..PLAYER[t].name.." \169255255255Has Been Warned by  \169000255000#"..PLAYER[id].name.." \169255255000[Reason: "..r.."]")
return 1
end
end


Pls help me for this, i will be very thankful for this favor.
edited 4×, last 16.06.18 11:24:37 am
FRiendly boYy.
16.06.18 02:36:14 am
Up
M3_Quick
User
Offline Off
Edit moderation lua


Code:
1
hc.add_say_command("kick", mod_kick_command, hc.RCON_LEVEL, "<id> <[reason]>", "Kick someone. You can also specify a reason.")


Code:
1
2
3
4
5
6
7
8
9
10
function hc.moderation.kick(p, _, item)
    local id = item.id
     local name = player(id, "name")
     local usgn = hc.get_usgn(id)
     local m = "ID #" .. id .. ": " .. name
    if hc.check_exists(id) then
        hc.moderation.kill_if_flag_bearer(id)
        hc.exec(p, "kick " .. id)
    end
end


√
16.06.18 02:56:24 am
Up
i told you dont remove credits from my lua in the first line × you dont deserve someone help you
16.06.18 03:49:58 am
Up
M3_Quick
User
Offline Off
@user KingShadow: Who do you mean?
16.06.18 06:03:36 am
Up
i mean thats my script
edited 1×, last 16.06.18 06:39:22 am
16.06.18 06:45:41 am
Up
ImQuiet
User
Offline Off
Thanks @user M3_Quick: But i want convert all command into hc admin script :v
FRiendly boYy.
To the start Previous 1 Next To the start