Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function ParseCommand(id,txt)
- local p = totable(txt)
- local cmd = tostring(p[1])
- if cmd =="!m" then
- if rp_Adminlevel[id] >= money_lv 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
- gmsg2(pl,"000255000",player(id,"name").." Gave you "..money.."$")
- gmsg2(id,"000255000","You gave "..money.." to "..player(pl,"name"))
- updatehud(pl)
- end
- end
- else
- gmsg2(id,"255000000","You don't have premission.")
- end
- elseif cmd == "!s" then
- if rp_Adminlevel[id] >= speed_lv then
- local pl = tonumber(p[2])
- local speed = tonumber(p[3])
- if (pl ~= nil) and (speed ~= nil) then
- if player(pl,"exists") then
- parse("speedmod "..pl.." "..speed)
- gmsg2(id,"000255000","You gave "..speed.." speedmod to "..player(pl,"name"))
- gmsg2(pl,"000255000","Your speed have been changed. ")
- end
- end
- else
- gmsg2(id,"255000000","You don't have premission.")
- end
- elseif cmd == "!k" then
- if rp_Adminlevel[id] >= kill_lv then
- local pl = tonumber(p[2])
- if (pl ~= nil) then
- if player(pl,"exists") then
- parse("killplayer "..pl)
- gmsg2(id,"000255000","You killed "..player(pl,"name"))
- gmsg2(pl,"000255000","You got killed by a RCon user!")
- end
- end
- else
- gmsg2(id,"255000000","You don't have premission.")
- end
- elseif cmd == "!ban" then
- if rp_Adminlevel[id] >= ban_lv 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")
- gmsg("255000000",player(id,"name").." has banned "..player(pl,"name"))
- if ip then
- parse("banip "..ip)
- end
- if usgn then
- parse("banusgn "..usgn)
- end
- end
- end
- else
- gmsg2(id,"255000000","You don't have premission.")
- end
- elseif cmd == "!i" then
- if rp_Adminlevel[id] >= info_lv then
- local pl = tonumber(p[2])
- if pl ~= nil then
- if player(pl,"exists") then
- gmsg2(id,"000255000","Name : "..player(pl,"name"))
- gmsg2(id,"000255000","USGN : "..player(pl,"usgn"))
- gmsg2(id,"000255000","IP : "..player(pl,"ip"))
- gmsg2(id,"000255000","Money : "..rp_money[pl])
- gmsg2(id,"000255000","Speed : "..player(pl,"speedmod"))
- gmsg2(id,"000255000","Position : "..player(pl,"x")..","..player(pl,"y"))
- if rp_license[id] ==0 then
- gmsg2(id,"000255000","Level : Citizen")
- elseif rp_license[id] == 1 and rp_vip[id] == 0 then
- gmsg2(id,"000255000","Level : Licensed")
- elseif rp_vip[id] == 1 and (not rp_ct[id] == true )then
- gmsg2(id,"000255000","Level : VIP")
- elseif rp_Adminlevel[id] == 1 then
- gmsg2(id,"000255000","Level : Mod")
- elseif rp_Adminlevel[id] == 2 then
- gmsg2(id,"000255000","Level : Supervisor")
- elseif rp_Adminlevel[id] == 3 then
- gmsg2(id,"000255000","Level : Admin")
- elseif rp_Adminlevel[id] == 4 then
- gmsg2(id,"000255000","Level : RCon")
- end
- end
- end
- else
- gmsg2(id,"255000000","You don't have premission.")
- end
- elseif cmd =="!a" then
- if rp_Adminlevel[id] >= arrest_lv 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][1]) parse("killplayer "..pl)
- elseif cell == 2 then
- parse("setpos "..pl.." "..Config.AP[2][1].." "..Config.AP[2][2]) parse("killplayer "..pl)
- elseif cell == 3 then
- parse("setpos "..pl.." "..Config.AP[3][1].." "..Config.AP[4][2]) parse("killplayer "..pl)
- elseif cell == 4 then
- parse("setpos "..pl.." "..Config.AP[4][1].." "..Config.AP[5][2]) parse("killplayer "..pl)
- elseif cell == 5 then
- parse("setpos "..pl.." "..Config.AP[5][1].." "..Config.AP[5][2]) parse("killplayer "..pl)
- elseif cell == 6 then
- parse("setpos "..pl.." "..Config.AP[6][1].." "..Config.AP[6][2]) parse("killplayer "..pl)
- end
- rp_arrest[pl]=true
- end
- end
- else
- gmsg2(id,"255000000","You don't have premission.")
- end
- elseif cmd =="!f" then
- if rp_Adminlevel[id] >= free_lv 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
- else
- gmsg2(id,"255000000","You don't have premission.")
- end
- elseif cmd == "!unct" then
- if rp_Adminlevel[id] >= makect_lv then
- local pl = tonumber(p[2])
- if pl ~= nil then
- if player(pl,"exists") then
- parse("maket "..pl.."")
- gmsg2(pl,"000000255","You can no longer join the CT forces!")
- gmsg2(id,"000000255","He can no longer join the CT forces!")
- rp_ct[pl] = false
- end
- end
- else
- gmsg2(id,"255000000","You don't have premission.")
- end
- elseif cmd == "!ct" then
- if rp_Adminlevel[id] >= makect_lv then
- local pl = tonumber(p[2])
- if pl ~= nil then
- if player(pl,"exists") then
- parse("makect "..pl.."")
- gmsg2(pl,"000000255","You can now join the CT forces!")
- gmsg2(id,"000000255","He can now join the CT forces!")
- rp_ct[pl] = true
- end
- end
- else
- gmsg2(id,"255000000","You don't have premission.")
- end
- elseif cmd == "!vip" then
- if rp_Adminlevel[id] >= makect_lv then
- local pl = tonumber(p[2])
- if pl ~= nil then
- if player(pl,"exists") then
- gmsg2(pl,"000000255","You are now a VIP!")
- gmsg2(id,"000000255","He is now a VIP!")
- rp_vip[pl] = true
- end
- end
- else
- gmsg2(id,"255000000","You don't have premission.")
- end
- elseif cmd =="!b" then
- if rp_Adminlevel[id] >= bring_lv 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
- gmsg2(id,"255000000","This player does not exist!")
- end
- end
- else
- gmsg2(id,"255000000","You don't have premission.")
- end
- elseif cmd =="!bringall" then
- if rp_Adminlevel[id] >= bring_all_lv then
- for pl = 1,32 do
- if player(pl,"exists") then
- parse("setpos "..pl.." "..player(id,"x").." "..player(id,"y"))
- end
- end
- else
- gmsg2(id,"255000000","You don't have premission.")
- end
- elseif cmd == "!h" then
- if rp_Adminlevel[id] >= heal_lv then
- parse("spawnitem 64 "..player(id,"tilex").." "..player(id,"tiley"))
- else
- gmsg2(id,"255000000","You don't have premission.")
- end
- elseif cmd == "!g" then
- if rp_Adminlevel[id] >= goto_lv 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
- gmsg2(id,"255000000","This player does not exist!")
- end
- end
- else
- gmsg2(id,"255000000","You don't have premission.")
- end
- elseif cmd == "!kick" then
- if rp_Adminlevel[id] >= kick_lv then
- local pl = tonumber(p[2])
- if pl ~= nil then
- if player(pl,"exists") then
- gmsg("255000000",player(id,"name").." has kicked "..player(pl,"name"))
- parse("kick "..pl)
- end
- end
- else
- gmsg2(id,"255000000","You don't have premission.")
- end
- elseif cmd == "!slapme" then
- parse("slap "..id)
- --elseif cmd == "!msg" then
- -- local pl = tonumber(p[2])
- -- local msging = tostring(p[3])
- -- if pl ~= nil then
- -- if player(pl,"exists") then
- -- gmsg2(id,"000255000","Message sent to "..player(pl,"name").." ")
- -- gmsg2(pl,"000255000",player(id,"name").." told you: "..msging.." ")
- --
- -- else
- -- gmsg2(id,"255000000","This player does not exist!")
- -- end
- -- else
- -- gmsg2(id,"255000000","Player ID is needed! !msg <id> <txt>!")
- -- end
- --else
- --gmsg2(id,"255000000"," @C")
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement