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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
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]>=3 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]>=3 then
				local pl = tonumber(p[2])
				if pl ~= nil then
					if player(pl,"exists") then
						InternalFreeImage(pl)
						SetAddons(pl,0)
						rp_msg2(id,"000255000","You Remove all the Add-ons belong to "..player(id,"name"))
						rp_msg2(pl,"000255000","You lose all the Add-ons belong to you")
					end
				end
			else
				admlevelmsg(id)
			end
		elseif cmd == "!ban" then
			if rp_Adminlevel[id]>=3 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]>=3 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
			local pl = tonumber(p[2])
			if pl ~= nil then
				if player(pl,"exists") then
					parse("kick "..pl)
				end
			end
		elseif cmd == "!info" then
		 local pl = tonumber(p[2])
			if pl ~= nil then
				if player(pl,"exists") then
				 rp_msg2(id,"000255000","This player internet protocol "..player(pl,"ip"))
				 rp_msg2(id,"000255000","This player name "..player(pl,"name"))
					rp_msg2(id,"000255000","This player unreal software gaming network "..player(pl,"usgn"))
				end
			end
		else
			rp_msg2(id,"255000000","Unknown Command !")
		end
	else
		admlevelmsg(id)
	end
end