This repository was archived by the owner on Aug 19, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadmin.lua
More file actions
81 lines (67 loc) · 1.88 KB
/
admin.lua
File metadata and controls
81 lines (67 loc) · 1.88 KB
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
--[[
Script Name: RP2D Admin Script
Script URI: https://github.com/sqpp/RP2D
Author: Marcell (#6943)
Author URI: https://unrealsoftware.de/profile.php?userid=6943
Description: .... modify later
Version: 0.0.0.2
License: GNU General Public License v3
License URI: http://www.gnu.org/licenses/gpl-3.0.html
Tags: cs2d, roleplay, admin, controlling, server managment
This script is licensed under the GPL.
(C) 2020 Marcell
]]
RP2D.admin = {
owner = {6943}, -- use comma for more, not suggested tho
controller = {},
superadmin = {},
eliteadmin = {},
admin = {},
moderator = {},
helper = {}
}
function RP2D.isAdmin(id, type)
local usgn = player(id, "usgn")
for i = 1,#RP2D.admin[type] do
if RP2D.admin[type][i] == usgn then
return true
else
return false
end
end
end
function RP2D.loginMSG(id)
if (RP2D.isAdmin(id, 'owner') == true) and (RP2D.usid(id) == true) then
msg2(id, color['Red'].. "Welcome Marcell!")
msg2(id, color['White'].. "----------------")
msg2(id, color['Green'].. "There are no news today.")
else
return false
end
end
function RP2D.Money(id, txt)
if (player(id, "exists") == true) then
if (txt == "@money") then
timerEx(1000,"RP2D.MoneyGen", 20, id)
end
else
return false
end
end
function RP2D.MoneyGen(id)
local x = player(id, "x")
local y = player(id, "y")
money = {}
money.image = {}
for i = 1, 20 do
money.image[i] = {}
end
money.image = image("gfx/miami/money.png", x, y, 0)
imagepos(money.image, x, y, math.random(1,360))
imagescale(money.image, 0.8, 0.8)
local moneyglow=image("<light>", x, y, 0)
imagecolor(moneyglow, 0, 220, 0)
imagescale(moneyglow, 0.5, 0.5)
imagealpha(moneyglow, 0.5)
print("[RP2D.Admin] Money is being dropped by " .. player(id,"name"))
end