Spoiler drop_system_m = 1
tele_sys = 1
Mute_text= 0
function isAdmin(usgn)
local filename = "sys/lua/Admin.txt"
local file = io.open(filename)
if file then
for line in file:lines() do
local parses = totable(line)
if tonumber(parses[1]) ~= nil then
if usgn==tonumber(parses[1]) then
if tonumber(parses[2]) ~= nil then
return tonumber(parses[2])
else
return 1
end
end
end
end
if file ~= nil then
file:close()
end
end
return 0
end
function ParseAdminCommand(id,txt)
local p = totable(txt)
local cmd = tostring(p[1])
if rp_Adminlevel[id]>=2 then
if cmd =="!save" then
if rp_Adminlevel[id]>=3 then
for id = 1,32 do
if player(id,"exists") then
local UsgnID = UsgnIds[id]
if UsgnID > 0 then
SaveUserStat(id,UsgnID)
end
end
end
rp_msg2(id,"000255000","SAVE OK!")
else
admlevelmsg(id)
end
elseif cmd =="!money" then
if rp_Adminlevel[id]>=3 then
local pl = tonumber(p[2])
local money = tonumber(p[3])
if pl ~= nil and money ~= nil then
if player(pl,"exists") then
rp_money[pl]=rp_money[pl]+money
rp_msg2(pl,"000255000",player(id,"name").." Gave you "..money.." of money!")
rp_msg2(id,"000255000","You gave "..money.." to "..player(pl,"name"))
updatehud(pl)
end
end
else
admlevelmsg(id)
end
elseif cmd == "!set" then
if rp_Adminlevel[id]>=2 then
local pl = tonumber(p[2])
local item = tonumber(p[3])
if (pl ~= nil) and (item~=nil) then
if player(pl,"exists") then
Addons[item].FLic[pl]=1
rp_msg2(id,"000255000","You Give "..Addons[item].FName.." Add-ons to "..player(pl,"name"))
rp_msg2(pl,"000255000","You have "..Addons[item].FName.." Add-ons now, F3!")
end
end
else
admlevelmsg(id)
end
elseif cmd == "!remove" then
if rp_Adminlevel[id]>=2 then
local pl = tonumber(p[2])
if pl ~= nil then
if player(pl,"exists") then
InternalFreeImage(pl)
SetAddons(pl,0)
end
end
else
admlevelmsg(id)
end
elseif cmd == "!ban" then
if rp_Adminlevel[id] >=2 then
local pl = tonumber(p[2])
if pl ~= nil then
if player(pl,"exists") then
local ip = player(pl, "ip")
local usgn = player(pl, "usgn")
if ip then
parse("banip "..ip)
end
if usgn then
parse("banusgn "..usgn)
end
end
end
else
admlevelmsg(id)
end
elseif cmd == "!vip" then
if rp_Adminlevel[id] >=2 then
local pl = tonumber(p[2])
if pl ~= nil then
if player(pl,"exists") then
rp_license[pl]=2
rp_msg2(id,"000255000","You Give VIP to "..player(pl,"name"))
rp_msg2(pl,"000255000","You are VIP USER Now")
end
end
else
admlevelmsg(id)
end
elseif cmd =="!arrest" then
local pl = tonumber(p[2])
local cell = tonumber(p[3])
if pl ~= nil then
if player(pl,"exists") then
if cell == 1 then
parse("setpos "..pl.." "..Config.AP[1][1].." "..Config.AP[1][2])
elseif cell == 2 then
parse("setpos "..pl.." "..Config.AP[2][1].." "..Config.AP[2][2])
elseif cell == 3 then
parse("setpos "..pl.." "..Config.AP[3][1].." "..Config.AP[3][2])
end
rp_arrest[pl]=true
end
end
elseif cmd =="!free" then
local pl = tonumber(p[2])
if pl ~= nil then
if player(pl,"exists") then
rp_arrest[pl]=false
parse("setpos "..pl.." "..Config.FP[1].." "..Config.FP[2])
end
end
elseif cmd =="!bring" then
local pl = tonumber(p[2])
if pl ~= nil then
if player(pl,"exists") then
parse("setpos "..pl.." "..player(id,"x").." "..player(id,"y"))
else
rp_msg2(id,"255000000","This player does not exist!")
end
end
elseif cmd == "!goto" then
local pl = tonumber(p[2])
if pl ~= nil then
if player(pl,"exists") then
parse("setpos "..id.." "..player(pl,"x").." "..player(pl,"y"))
else
rp_msg2(id,"255000000","This player does not exist!")
end
end
elseif cmd == "!kick" then
if rp_Adminlevel[id] >=2 then
local pl = tonumber(p[2])
if pl ~= nil then
if player(pl,"exists") then
parse("kick "..pl)
end
end
else
rp_msg2(id,"255000000","Unknown Command !")
end
else
admlevelmsg(id)
end
end
end
function admlevelmsg(id)
rp_msg2(id,"255000000","You havent privilage to use this function!")
end
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
elseif cmd =="!arrest" then
local pl = tonumber(p[2])
local cell = tonumber(p[3])
if pl ~= nil then
if player(pl,"exists") then
if cell == 1 then
parse("setpos "..pl.." "..Config.AP[1][1].." "..Config.AP[1][2])
elseif cell == 2 then
parse("setpos "..pl.." "..Config.AP[2][1].." "..Config.AP[2][2])
elseif cell == 3 then
parse("setpos "..pl.." "..Config.AP[3][1].." "..Config.AP[3][2])
end
rp_arrest[pl]=true
end
end
elseif cmd =="!free" then
local pl = tonumber(p[2])
if pl ~= nil then
if player(pl,"exists") then
rp_arrest[pl]=false
parse("setpos "..pl.." "..Config.FP[1].." "..Config.FP[2])
end
end
i no want Member[admin == lv1] can arrest because....