-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathchatFrac.lua
131 lines (104 loc) · 4.62 KB
/
chatFrac.lua
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
function rpCharLocFrac(ThePlayer, cmd, ...)
local playerlist = getElementsByType("player")
local acc = getPlayerAccount(ThePlayer)
local accName = getAccountName(acc)
local acl = aclGetGroup ("Heal" )
if isObjectInACLGroup ("user."..accName, acl) then
for k, v in ipairs(playerlist) do
local arg = {...}
local text = table.concat( arg, " " )
local account = getPlayerAccount(v)
local accountName = getAccountName(account)
if isObjectInACLGroup ("user."..accountName, aclGetGroup ( "Heal" ) ) then
if ... then
local policeRank = 'Питух'
local idrang = getRang(ThePlayer)
for i,v in ipairs(rangs) do
if i == idrang then
rang =v
end
end
outputChatBox("#ff0000["..rang.."] "..getPlayerName(ThePlayer).."["..getElementData(ThePlayer,"ID").."]: "..text, v, 65, 105, 225,true)
end
end
end
end
end
addCommandHandler("r", rpCharLocFrac)
function nrpCharLocFrac(ThePlayer, cmd, ...)
local playerlist = getElementsByType("player")
local acc = getPlayerAccount(ThePlayer)
local accName = getAccountName(acc)
local acl = aclGetGroup ("Heal" )
if isObjectInACLGroup ("user."..accName, acl) then
for k, v in ipairs(playerlist) do
local arg = {...}
local text = table.concat( arg, " " )
local account = getPlayerAccount(v)
local accountName = getAccountName(account)
if isObjectInACLGroup ("user."..accountName, aclGetGroup ( "Heal" ) ) then
if ... then
local idrang = getRang(ThePlayer)
for i,v in ipairs(rangs) do
if i == idrang then
rang =v
end
end
outputChatBox("#ff0000(( NRP CHAT - ["..rang.."] "..getPlayerName(ThePlayer).."["..getElementData(ThePlayer,"ID").."]:#f5f5dc "..text.."#ff0000 ))", v, 65, 105, 225,true)
end
end
end
end
end
addCommandHandler("rb", nrpCharLocFrac)
function ceGovkaFrac(ThePlayer,cmd,...)
local account = getPlayerAccount(ThePlayer)
local accountName = getAccountName(account)
if isObjectInACLGroup ("user."..accountName, aclGetGroup ( "Heal" ) ) then
local arg = {...}
local text = table.concat( arg, " " )
if ... then
local idrang = getRang(ThePlayer)
if idrang <= 8 then
warnmsg(ThePlayer,'Вам запрещено сюда писать (с '..govMSG..' ранга)') return end
outputChatBox ("#00bfff[Новости "..FracGlobalNameChat.."] "..getPlayerName(ThePlayer).."["..getElementData(ThePlayer,"ID").."]:#00bfff "..text, root, 200, 0, 0, true)
end
end
end
addCommandHandler("gov",ceGovkaFrac)
function printMsgOuSheet(msg,ThePlayer)
for i,v in ipairs(getElementsByType("player")) do
if getElementData(v,"frac") then
if v == ThePlayer then return end
outputChatBox(msg,root,65, 105, 225,true)
end
end
end
function obChat(ThePlayer, cmd, ...)
local playerlist = getElementsByType("player")
local acc = getPlayerAccount(ThePlayer)
local accName = getAccountName(acc)
local acl = aclGetGroup ("Heal" )
if isObjectInACLGroup ("user."..accName, acl) then
for k, v in ipairs(playerlist) do
local arg = {...}
local text = table.concat( arg, " " )
local account = getPlayerAccount(v)
local accountName = getAccountName(account)
if isObjectInACLGroup ("user."..accountName, aclGetGroup ( "Heal" ) ) then
if ... then
local idrang = getRang(ThePlayer)
for i,v in ipairs(rangs) do
if i == idrang then
rang =v
end
end
if idrang <= 7 then
warnmsg(ThePlayer,'Вам запрещено сюда писать (с '..okRang..' ранга)') return end
printMsgOuSheet("#ff0000[ Общий чат ["..FracGlobalNameChat.."] ["..rang.."] "..getPlayerName(ThePlayer).."["..getElementData(ThePlayer,"ID").."]: "..text.." ]",ThePlayer)
end
end
end
end
end
addCommandHandler("ob", obChat)