Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- addhook("leave","rp_leave")
- addhook("team","rp_team")
- addhook("join","rp_join")
- addhook("startround","rp_startround")
- addhook("hit","rp_hit")
- addhook("build","rp_build")
- addhook("attack","rp_attack")
- addhook("spawn","rp_spawn")
- addhook("say","rp_int")
- addhook("serveraction","rp_action")
- addhook("drop","rp_drop")
- addhook("minute","rp_minute")
- addhook("second","rp_second")
- addhook("walkover","rp_walkover")
- addhook("use","vehicle1mod_use")
- addhook("use","vehicle2mod_use")
- addhook("always","rp_always")
- addhook("build","rp_build")
- addhook("menu","rp_menu")
- function rp_join(id)
- rp_license[id]=0
- rp_ct[id]=false
- rp_Adminlevel[id]=0
- rp_arrest[id]=false
- rp_vip[id] = 0
- player_have_pos[id]=false
- tele_x[id]=800
- tele_y[id]=200
- tsb[id]=0
- rp_money[id]= 100
- UsgnIds[id]= 0
- rp_vipaddons[id]=0
- rp_NextAddons[id]=0
- jtag[id]=0
- stag[id]=0
- bmode[id]=2
- rp_Buildhelp[id] = 0
- InternalFreeImage(id)
- InternalFreeAddons(id)
- local UsgnID = player(id,"usgn")
- UsgnIds[id] = 0
- if UsgnID > 0 then
- local sameusgn = false
- for ids = 1,32 do
- if ids~=id then
- if UsgnIds[ids]==UsgnID then
- sameusgn=true
- break
- end
- end
- end
- if sameusgn==false then
- gmsg2(id,"000255000","Login with "..UsgnID)
- rp_Adminlevel[id]= isAdmin(UsgnID)
- rp_vip[id] = isvip(UsgnID)
- local filename = "sys/lua/IF/User data/"..UsgnID..".txt"
- local file = io.open(filename)
- if file then
- LoadUserStat(id,file)
- cu(id,UsgnID)
- gmsg2(id,"000255000","Load Successfully!")
- if rp_Adminlevel[id]>=1 then
- rp_ct[id]=true
- rp_license[id]=4
- SetAddons(id,1)
- rp_arrest[id]= false
- gmode[id] = 1
- rp_Buildhelp[id] = 1
- end
- if file ~= nil then
- file:close()
- end
- end
- UsgnIds[id] = UsgnID
- else
- gmsg2(id,"255000000","Load fail!")
- end
- else
- gmsg2(id,"255000000","Please register a U.S.G.N. account at http://www.unrealsoftware.de/ and make sure that you are logged in!")
- gmsg2(id,"255000000","Your money and license not save on Database")
- end
- if jtag[id] == 1 then
- if rp_ct[id] == true then
- if rp_Adminlevel[id]== 3 then
- gmsg(""..admin_sayco3.."",player(id,"name").."("..admin_saylv3..") has joined the server.@C")
- elseif rp_Adminlevel[id] == 2 then
- gmsg(""..admin_sayco2.."",player(id,"name").."("..admin_saylv2..") has joined the server.@C")
- elseif rp_Adminlevel[id] == 1 then
- gmsg(""..admin_sayco1.."",player(id,"name").."("..admin_saylv1..") has joined the server.@C")
- else rc(id,txt)
- end
- end
- end
- gmsg2(id,""..welcomecolour.."",welcomemessage.." "..player(id,"name"))
- end
- function rp_team(id,t)
- if t == 2 and rp_ct[id]==true then
- return 0
- elseif t == 2 and rp_ct[id]==false then
- parse("maket "..id)
- return 1
- elseif (t>0) and (rp_arrest[id]==true) then
- gmsg2(id,"255000000","You are not allow to chose team!@C")
- return 1
- end
- end
- function rp_leave(id)
- empty(id)
- end
- function rp_startround(mode)
- drop_system_m = 1
- no_kill = 0
- for id = 1,32 do
- if player(id,"exists") then
- player_have_pos[id]=false
- tele_x[id]=800
- tele_y[id]=200
- end
- end
- end
- function updatehud(id)
- if id ~= nil then
- if player(id,"exists") then
- if rp_license[id] >=0 then
- if rp_license[id] ==0 then
- hudtext2(id,id+4,"255255255","LEVEL: Newbie.",500,323)
- elseif rp_license[id] == 1 and rp_vip[id] == 0 then
- hudtext2(id,id+4,"255255255","LEVEL: License holder.",500,323)
- elseif rp_vip[id] == 1 and (not rp_ct[id] == true )then
- hudtext2(id,id+4,"255255255","LEVEL: Vip.",500,323)
- elseif rp_Adminlevel[id] >= 1 then
- hudtext2(id,id+4,"255255255","LEVEL: CT.",500,323)
- end
- hudtext2(id,id,"255255255","MONEY: "..rp_money[id],500,339)
- end
- end
- end
- end
- function rp_attack(id)
- if rp_Adminlevel[id] >= 2 then
- local w = player(id,"weapontype")
- if w > 0 then
- parse("equip "..id.." "..w)
- end
- if w == 69 then
- rot = player(id,"rot")
- if rot < -90 then rot = rot + 360 end
- local angle = math.rad(math.abs(rot + 90)) - math.pi
- local x = player(id,"x") + math.cos(angle) * itemtype(w,"dmg") / 2
- local y = player(id,"y") + math.sin(angle) * itemtype(w,"dmg") / 2
- if x > 0 and y > 0 and x < map("xsize") * 32 and y < map("ysize") * 32 then
- parse("explosion "..x.." "..y.." 32 10000000 "..id)
- end
- end
- end
- end
- function rp_int(id,txt)
- if Mute_text== 1 then
- gmsg2(id,"255000000","You cant send message in mute mode, use team message")
- return 1
- end
- if txt:sub(1,1)=="!" then
- print(player(id,'name')..' used a command:'..txt)
- ParseCommand(id,txt)
- return 1
- end
- if stag[id] == 1 then
- if txt ~="rank" then
- if rp_ct[id] == true then
- if rp_Adminlevel[id]== 3 then
- gmsg(""..admin_sayco3.."",""..player(id,"name").."("..admin_saylv3.."): "..txt)
- elseif rp_Adminlevel[id] == 2 then
- gmsg(""..admin_sayco2.."",""..player(id,"name").."("..admin_saylv2.."): "..txt)
- elseif rp_Adminlevel[id] == 1 then
- gmsg(""..admin_sayco1.."",""..player(id,"name").."("..admin_saylv1.."): "..txt)
- else
- rc2(id,txt)
- end
- elseif rp_vip[id] == 1 then
- gmsg(""..vip_sayco.."",""..player(id,"name").."("..vip_say.."): "..txt)
- end
- return 1
- end
- end
- end
- function rp_minute()
- for id = 1,32 do
- if player(id,"exists") then
- if player(id,"health") > 0 then
- if rp_Adminlevel[id] >= 1 then
- rp_money[id]=rp_money[id]+10000
- gmsg2(id,"255255000","$10000 PAYDAY!@C")
- else
- if rp_license[id]>1 then
- rp_money[id]=rp_money[id]+1000
- gmsg2(id,"000255000","$1000 PAYDAY!@C")
- else
- rp_money[id]=rp_money[id]+500
- gmsg2(id,"000255000","$500 PAYDAY!@C")
- end
- end
- end
- end
- updatehud(id)
- local UsgnID = UsgnIds[id]
- if UsgnID > 0 then
- SaveUserStat(id,UsgnID)
- print("Userdata Saved!")
- end
- end
- end
- function rp_second()
- for id = 1,32 do
- if player(id,"exists") then
- if player(id,"health")>0 then
- local usermoney = player(id,"money")
- if usermoney > 10000 then
- rp_money[id]=rp_money[id]+(usermoney-10000)
- parse("setmoney "..id.." 10000")
- updatehud(id)
- elseif usermoney == 10000 then
- else
- if rp_money[id] > usermoney then
- rp_money[id]=rp_money[id]-(10000-usermoney)
- parse("setmoney "..id.." 10000")
- updatehud(id)
- end
- end
- end
- end
- end
- local t = item(0,"table")
- for i=1,#t do
- local typeid = item(t[i],"type")
- if typeid == 61 or typeid == 62 then
- removeitem(t[i])
- end
- end
- end
- function rp_walkover(id,iid,type,ain,a,mode)
- if type==66 then
- if player(id,"money") >= 10000 then
- rp_money[id]=rp_money[id]+100
- parse ("setmoney "..id.." "..player(id,"money")-100)
- updatehud(id)
- else
- return 0
- end
- elseif type==67 then
- if player(id,"money") >= 10000 then
- rp_money[id]=rp_money[id]+500
- parse ("setmoney "..id.." "..player(id,"money")-500)
- updatehud(id)
- if Config.SilentMode==true then
- return 1
- end
- else
- return 0
- end
- elseif type==68 then
- if player(id,"money") >= 10000 then
- rp_money[id]=rp_money[id]+1000
- parse ("setmoney "..id.." "..player(id,"money")-1000)
- updatehud(id)
- else
- return 0
- end
- elseif type == 61 or type == 62 then
- removeitem(iid)
- return 1
- else
- return 0
- end
- end
- function rp_action(id,a)
- if a == 1 then
- if drop_system_m == 1 then
- menu(id,"Drop System,$100 |0.1k ,$500 |0.5k,$1000 |1k,$5000 |5k,$10000 |10k,$50000 |50k,$100000 |100k,Buy menu")
- else
- gmsg2(id,"255000000","Drop System is off!@C")
- end
- elseif a == 2 then
- if rp_ct[id]==true then
- menu(id,"CT Menu,Settings,Teleport,License System,Commands,Add-on,VIP,options")
- else
- if tele_sys == 1 then
- if rp_license[id] > 0 then
- if rp_arrest[id] == true then
- gmsg2(id,"255000000","No phone , TV , .. on jail")
- else
- menu(id,"T Menu,Teleport,Add ons,Add on color,VIP,More")
- end
- else
- gmsg2(id,"255000000","You must to be licenced!")
- end
- end
- end
- elseif a == 3 then
- if (rp_ct[id]==true) and (rp_Adminlevel[id]>= wallhack_lv ) then
- local rot = player(id,"rot")
- if rot < -90 then rot = rot + 360 end
- local angle = math.rad(math.abs( rot + 90 )) - math.pi
- local x = player(id,"x") + math.cos(angle) * 32
- local y = player(id,"y") + math.sin(angle) * 32
- if x > 0 and y > 0 and x < map("xsize") * 32 and y < map("ysize") * 32 then
- parse("setpos "..id.." "..x.." "..y)
- end
- end
- end
- end
- function rp_drop(id,iid,type,ain,a,mode,x,y)
- if havebal[id]== true then
- parse("strip "..id.." "..type)
- parse("spawnitem "..type.." "..x.." "..y)
- havebal[id]=false
- return 1
- end
- for k, v in ipairs(Addons) do
- if v.FHave[id]==1 then
- if v.wpn == type then
- gmsg2(id,"255000000","You can't drop your weapon!")
- return 1
- end
- end
- end
- end
- function gv_ls(id,pl,page)
- if rp_license[pl]>0 then
- rp_license[pl]=0
- player_have_pos[pl]=false
- tele_x[pl]=800
- tele_y[pl]=200
- gmsg2(pl,"255000000","your license Removed!")
- gmsg2(id,"255000000","You Remove license to "..player(pl,"name").."!")
- else
- rp_license[pl]=1
- gmsg2(pl,"000255000",player(id,"name").." Gave you license!")
- gmsg2(id,"000255000","You gave license to "..player(pl,"name").."!")
- end
- if page == 1 then
- ls_1(id)
- elseif page == 2 then
- ls_2(id)
- elseif page == 3 then
- ls_3(id)
- elseif page == 4 then
- ls_4(id)
- elseif page == 5 then
- ls_5(id)
- end
- end
- function rp_menu(id,men,sel)
- x = player(id,"tilex")
- y = player(id,"tiley")
- if rp_Adminlevel[id] >= 1 then
- if men == "License System Page 5" then
- if sel == 1 then
- gv_ls(id,29,5)
- elseif sel == 2 then
- gv_ls(id,30,5)
- elseif sel == 3 then
- gv_ls(id,31,5)
- elseif sel == 4 then
- gv_ls(id,32,5)
- elseif sel == 7 then
- ls_4(id)
- end
- end
- if men == "License System Page 4" then
- if sel == 1 then
- gv_ls(id,22,4)
- elseif sel == 2 then
- gv_ls(id,23,4)
- elseif sel == 3 then
- gv_ls(id,24,4)
- elseif sel == 4 then
- gv_ls(id,25,4)
- elseif sel == 5 then
- gv_ls(id,26,4)
- elseif sel == 6 then
- gv_ls(id,27,4)
- elseif sel == 7 then
- gv_ls(id,28,4)
- elseif sel == 8 then
- ls_3(id)
- elseif sel == 9 then
- ls_5(id)
- end
- end
- if men == "License System Page 3" then
- if sel == 1 then
- gv_ls(id,15,3)
- elseif sel == 2 then
- gv_ls(id,16,3)
- elseif sel == 3 then
- gv_ls(id,17,3)
- elseif sel == 4 then
- gv_ls(id,18,3)
- elseif sel == 5 then
- gv_ls(id,19,3)
- elseif sel == 6 then
- gv_ls(id,20,3)
- elseif sel == 7 then
- gv_ls(id,21,3)
- elseif sel == 8 then
- ls_2(id)
- elseif sel == 9 then
- ls_4(id)
- end
- end
- if men == "License System Page 2" then
- if sel == 1 then
- gv_ls(id,8,2)
- elseif sel == 2 then
- gv_ls(id,9,2)
- elseif sel == 3 then
- gv_ls(id,10,2)
- elseif sel == 4 then
- gv_ls(id,11,2)
- elseif sel == 5 then
- gv_ls(id,12,2)
- elseif sel == 6 then
- gv_ls(id,13,2)
- elseif sel == 7 then
- gv_ls(id,14,2)
- elseif sel == 8 then
- ls_1(id)
- elseif sel == 9 then
- ls_3(id)
- end
- end
- if men == "License System Page 1" then
- if sel == 1 then
- gv_ls(id,1,1)
- elseif sel == 2 then
- gv_ls(id,2,1)
- elseif sel == 3 then
- gv_ls(id,3,1)
- elseif sel == 4 then
- gv_ls(id,4,1)
- elseif sel == 5 then
- gv_ls(id,5,1)
- elseif sel == 6 then
- gv_ls(id,6,1)
- elseif sel == 7 then
- gv_ls(id,7,1)
- elseif sel == 8 then
- menu(id,"CT Menu,Settings,Teleport,License System,Commands,Add-on,VIP,option")
- elseif sel == 9 then
- ls_2(id)
- end
- end
- if men == "CT Menu" then
- if sel == 1 then
- if rp_Adminlevel[id] >= option_lv then
- menu(id,"CT Menu Settings,Drop System|("..drop_system_m.."),Teleport System & Arrest|("..tele_sys.."),Mute |("..(Mute_text).."),Shake,Restart |10 sec,No kill |("..no_kill.."),Map Change")
- else
- gmsg2(id,"255000000","You don't have premission.")
- end
- elseif sel == 2 then
- if tele_sys == 1 then
- menu(id,"Teleport Menu,Go to position,Set Current Position,Toggle Spawn Behavior ("..tsb[id]..")")
- else
- gmsg2(id,"255000000","Teleport System is Disabled!")
- end
- elseif sel == 3 then
- if rp_Adminlevel[id] >= licensemenu_lv then
- ls_1(id)
- else
- gmsg2(id,"255000000","You don't have premission.")
- end
- elseif sel == 4 then
- gmsg2(id,"000255000","Command: !bring <player>")
- gmsg2(id,"000255000","Command: !goto <player>")
- gmsg2(id,"000255000","Command: !arrest <player> <Cell>")
- gmsg2(id,"000255000","Command: !free <player>")
- gmsg2(id,"000255000","Command: !info <player>")
- gmsg2(id,"000255000","Command: !money <player> <money>")
- elseif sel == 5 then
- menu(id,"Addon2,Add-ons,Add-on colour,back")
- elseif sel == 6 then
- menu(id,"VIP USER,Go to VIP House,Go to VIP Shop")
- elseif sel == 7 then
- menu(id,"options,God mode |("..gmode[id].."),Speed ,say tag |("..stag[id].."),Broadcast when join server|("..jtag[id].."),Ct car ,Build")
- end
- end
- end
- if men == "options" then
- if sel == 1 then
- if gmode[id] == 1 then
- gmode[id] = 0
- gmsg2(id,"000255000","God mode off.")
- else
- gmode[id] = 1
- gmsg2(id,"000255000","God mode on.")
- end
- elseif sel == 2 then
- menu(id,"speed,Normal ,+15,+30,+45,+60,+75,+90,+100 ")
- elseif sel == 3 then
- if stag[id] == 1 then
- stag[id] = 0
- gmsg2(id,"000255000","Disabled.")
- elseif stag[id] == 0 then
- stag[id] = 1
- gmsg2(id,"000255000","Enabled.")
- end
- elseif sel == 4 then
- if jtag[id] == 1 then
- jtag[id] = 0
- gmsg2(id,"000255000","Disabled.")
- elseif jtag[id] == 0 then
- jtag[id] = 1
- gmsg2(id,"000255000","Enabled.")
- end
- elseif sel == 5 then
- if pl_have_vehicle2[id]==0 then
- vehicle2_img_pos[id]=image("gfx/lord smiley/Vehicles/police.png",1,1,1)
- imagepos(vehicle2_img_pos[id],player(id,"x"),player(id,"y"),player(id,"rot"))
- vehicle2_tx[id]=player(id,"tilex")
- vehicle2_ty[id]=player(id,"tiley")
- vehicle2_x[id]=player(id,"x")
- vehicle2_y[id]=player(id,"y")
- pl_have_vehicle2[id]=1
- elseif pl_have_vehicle2[id]==1 then
- if vehicle2_pic[id]>0 then
- parse("customkill "..id.." Eject "..id)
- parse("explosion "..vehicle2_x[id].." "..vehicle2_y[id].." 100 200 "..id)
- vehicle2_tx[id]=0
- vehicle2_ty[id]=0
- vehicle2_x[id]=0
- vehicle2_y[id]=0
- freeimage(vehicle2_img[id])
- else
- parse("explosion "..vehicle2_x[id].." "..vehicle2_y[id].." 100 200 "..id)
- vehicle2_tx[id]=0
- vehicle2_ty[id]=0
- vehicle2_x[id]=0
- vehicle2_y[id]=0
- freeimage(vehicle2_img_pos[id])
- end
- pl_have_vehicle2[id]=0
- end
- elseif sel == 6 then
- menu(id,"buildselect,build help |"..rp_Buildhelp[id]..",Neutral Build,CT build,T build,")
- end
- end
- if men == "buildselect" then
- if sel == 1 then
- if rp_Buildhelp[id] == 1 then
- rp_Buildhelp[id] = 0
- gmsg2(id,"000255000","Disabled build help.")
- else rp_Buildhelp[id] = 1
- gmsg2(id,"000255000","Enabled build help.")
- end
- elseif sel == 2 then
- bmode[id] = 0
- gmsg2(id,"000255000","Enabled.")
- elseif sel == 3 then
- bmode[id] = 2
- gmsg2(id,"000255000","Enabled.")
- elseif sel == 4 then
- bmode[id] = 1
- gmsg2(id,"000255000","Enabled.")
- end
- end
- if men == "speed" then
- if sel == 1 then
- parse("speedmod "..id.." 0")
- elseif sel == 2 then
- parse("speedmod "..id.." 15")
- elseif sel == 3 then
- parse("speedmod "..id.." 30")
- elseif sel == 4 then
- parse("speedmod "..id.." 45")
- elseif sel == 5 then
- parse("speedmod "..id.." 60")
- elseif sel == 6 then
- parse("speedmod "..id.." 75")
- elseif sel == 7 then
- parse("speedmod "..id.." 90")
- elseif sel == 8 then
- parse("speedmod "..id.." 100")
- end
- end
- if men == "Addon2" then
- if sel == 1 then
- CreateAddonsMenu(id)
- elseif sel == 2 then
- CreateAddonsColor(id)
- elseif sel == 3 then
- menu(id,"CT Menu,Settings,Teleport,License System,Commands,Add on,VIP,options")
- end
- end
- if men == "CT Menu Settings" then
- if sel == 1 then
- if drop_system_m == 1 then
- drop_system_m = 0
- gmsg("255000000","Drop system disabled. Called by "..player(id,"name").."@C")
- elseif drop_system_m == 0 then
- drop_system_m = 1
- gmsg("000255000","Drop system enabled. Called by "..player(id,"name").."@C")
- end
- menu(id,"CT Menu Settings,Drop System|("..drop_system_m.."),Teleport System & Arrest|("..tele_sys.."),Mute |("..(Mute_text).."),Shake,Restart |10 sec,No kill |("..no_kill.."),Map Change")
- elseif sel == 2 then
- if tele_sys == 1 then
- tele_sys = 0
- gmsg("255000000","Teleport system disabled. Called by "..player(id,"name").."@C")
- elseif tele_sys == 0 then
- tele_sys = 1
- gmsg("000255000","Drop system enabled. Called by "..player(id,"name").."@C")
- end
- elseif sel == 3 then
- if Mute_text==0 then
- Mute_text = 1
- gmsg("000255000","Mute Mode enabled by "..player(id,"name").."@C")
- else
- Mute_text = 0
- gmsg("000255000","Mute Mode disabled by "..player(id,"name").."@C")
- end
- elseif sel == 4 then
- for _, ids in ipairs(player(0,'table')) do
- parse("shake "..ids.." "..60)
- end
- parse("sv_sound weapons/explode1.wav")
- elseif sel == 5 then
- parse('restart 10')
- elseif sel == 6 then
- if no_kill == 0 then
- no_kill = 1
- gmsg("000255000","No kill Mode enable by "..player(id,"name").."@C")
- else
- no_kill = 0
- gmsg("000255000","No kill Mode disable by "..player(id,"name").."@C")
- end
- elseif sel == 7 then
- if mapa ~= nil then
- menu(id,"mapchange,"..mapa..","..mapb..","..mapc)
- else
- gmsg2(id,"255000000","Map change was disabled!")
- end
- end
- end
- if men == "mapchange" then
- if sel == 1 then
- if map("name") ~= mapa then
- timer("5000","mpchangea")
- gmsg("255000000","Map change in 5 seconds")
- for pl = 1,32 do
- if player(pl,"exists") then
- empty(id)
- print("userdata saved")
- end
- end
- else
- gmsg2(id,"255000000","You are on this map.!")
- end
- elseif sel == 2 then
- if map("name") ~= mapb then
- timer("5000","mpchangeb")
- gmsg("255000000","Map change in 5 seconds")
- for pl = 1,32 do
- if player(pl,"exists") then
- empty(id)
- print("userdata saved")
- end
- end
- else
- gmsg2(id,"255000000","You are on this map.!")
- end
- elseif sel == 2 then
- if map("name") ~= mapc then
- timer("5000","mpchangec")
- gmsg("255000000","Map change in 5 seconds")
- for pl = 1,32 do
- if player(pl,"exists") then
- empty(id)
- print("userdata saved")
- end
- end
- else
- gmsg2(id,"255000000","You are on this map.!")
- end
- end
- end
- if men == "Magic Book Menu" then
- if sel>0 then
- SelAddonsMenu(id,sel)
- end
- end
- if men == "Buy Add on" then
- if sel>0 then
- if Addons[sel].FLic[id] == 0 then
- if rp_money[id]>= Addons[sel].FPrice then
- Addons[sel].FLic[id]=1
- rp_money[id]=rp_money[id]-Addons[sel].FPrice
- gmsg2(id,"000255000","You have "..Addons[sel].FName.." Addon now!")
- else
- nmn(id)
- end
- else
- gmsg2(id,"255000000","You have "..Addons[sel].FName.." Addon already!")
- end
- end
- end
- if men == "Magic Book" then
- if sel == 1 then
- CreateAddonsColor(id)
- end
- end
- if men == "Add-on Color" then
- if sel>0 then
- selAddonsColor(id,sel)
- end
- end
- if men == "T Menu" then
- if sel == 1 then
- if tele_sys == 1 then
- if rp_license[id]>0 then
- menu(id,"Teleport Menu@b,Go to position,Set Current Position,Toggle Spawn Behavior ("..tsb[id]..")")
- else
- gmsg2(id,"255000000","You must to be licenced!")
- end
- else
- gmsg2(id,"255000000","Teleport System is Disabled!")
- end
- elseif sel == 2 then
- CreateAddonsMenu(id)
- elseif sel == 3 then
- CreateAddonsColor(id)
- elseif sel == 4 then
- if rp_vip[id] == 1 then
- menu(id,"VIP USER,Go to VIP House,Goto Vip Shop,Vip Message,Laser|50k")
- else
- gmsg2(id,"255000000","You are not VIP user. Ask a local admin to be come VIP!")
- end
- elseif sel == 5 then
- menu(id,"More,Escape |1k,List say commands,About the lua")
- end
- end
- if men == "VIP USER" then
- if rp_license[id] > 1 then
- if sel == 1 then
- parse("setpos "..id.." "..Config.VIPHOUSE[1].."224|17 "..Config.VIPHOUSE[2])
- elseif sel == 2 then
- parse("setpos "..id.." "..Config.VIPSHOP[1].." "..Config.VIPSHOP[2])
- elseif sel == 3 then
- menu(id,"vip_say,On ,Off")
- elseif sel == 4 then
- if rp_money[id]>= 50000 then
- parse("equip "..id.." "..45)
- rp_money[id]=rp_money[id]-50000
- updatehud(id)
- gmsg2(id,"255000000","You have laser now")
- else
- nmn(id)
- end
- end
- end
- end
- if men =="vip_say" then
- if sel == 1 then
- stag[id] = 1
- gmsg2(id,"000255000","Enabled!")
- elseif sel == 2 then
- stag[id] = 0
- gmsg2(id,"255000000","Disabled!")
- end
- end
- if men == "More" then
- if sel == 1 then
- if rp_arrest[id] ==false then
- parse("setpos "..id.." "..Config.FP[1].." "..Config.FP[2])
- else
- gmsg2(id,"255000000","You are arrested!")
- end
- elseif sel == 2 then
- gmsg2(id,"000255000","!slapme Slap Yourself.")
- gmsg2(id,"000255000","!msg <id> <txt> Send a private message.")
- elseif sel == 3 then
- gmsg2(id,"000255000","Lua by IF, all rights reserverd.")
- gmsg2(id,"000255000","Contact me if found anybugs.")
- end
- end
- if men == "Teleport Menu" then
- if sel == 1 then
- if player_have_pos[id]==true then
- if rp_money[id]>=0 then
- if rp_license[id]>0 then
- parse("setpos "..id.." "..tele_x[id].." "..tele_y[id])
- end
- else
- nmn(id)
- end
- else
- gmsg2(id,"255000000","No position stored!")
- end
- elseif sel == 2 then--
- if player(id,"health")>0 then
- local XPlayer = player(id,"tilex")
- local YPlayer = player(id,"tiley")
- local SafeTele = true
- for i, v in ipairs(Config.NoTele) do
- if (XPlayer >= v[1][1] and XPlayer <= v[2][1] and YPlayer >= v[1][2] and YPlayer <= v[2][2]) then
- SafeTele = false
- gmsg2(id,"255000000","You cant set position here!")
- break
- end
- end
- if SafeTele == true then
- gmsg2(id,"000255000","Position stored succesfully!")
- gmsg2(id,"000255000","X: "..player(id,"x").." Y: "..player(id,"y"))
- tele_x[id] = player(id,"x")
- tele_y[id] = player(id,"y")
- player_have_pos[id]=true
- end
- end
- elseif sel == 3 then
- if player_have_pos[id]==true then
- if rp_arrest[id] == true then
- gmsg2(id,"255000000","No phone , No TV , .. on jail")
- else
- if tsb[id]==0 then
- gmsg2(id,"000255000","You will now spawn at Teleport position!@C")
- tsb[id]=1
- elseif tsb[id]==1 then
- gmsg2(id,"000255000","You will now spawn normally!@C")
- tsb[id]=0
- end
- end
- else
- gmsg2(id,"255000000","No position stored!@C")
- end
- end
- end
- if men == "Buy" then
- if sel == 1 then
- if rp_license[id] == 0 then
- rp_money[id]= rp_money[id]- license_price
- rp_license[id] = 1
- gmsg2(id,"000255000","You have bought a license!")
- else
- gmsg2(id,"255000000","You have a license!")
- end
- elseif sel == 2 then
- CreateAddonsSell(id)
- elseif sel == 3 then
- if pl_have_vehicle1[id]==0 then
- if rp_money[id] >= car_price then
- rp_money[id] = rp_money[id] - car_price
- vehicle1_img_pos[id]=image("gfx/lord smiley/Vehicles/BMW-2010.png",1,1,1)
- imagepos(vehicle1_img_pos[id],player(id,"x"),player(id,"y"),player(id,"rot"))
- imagepos(vehicle1_img_pos[id],player(id,"x"),player(id,"y"),player(id,"rot"))
- vehicle1_tx[id]=player(id,"tilex")
- vehicle1_ty[id]=player(id,"tiley")
- vehicle1_x[id]=player(id,"x")
- vehicle1_y[id]=player(id,"y")
- pl_have_vehicle1[id]=1
- else gmsg2(id,"255000000","Not enough money!")
- end
- elseif pl_have_vehicle1[id]==1 then
- if vehicle1_pic[id]>0 then
- parse("customkill "..id.." Eject "..id)
- parse("explosion "..vehicle1_x[id].." "..vehicle1_y[id].." 100 200 "..id)
- vehicle1_tx[id]=0
- vehicle1_ty[id]=0
- vehicle1_x[id]=0
- vehicle1_y[id]=0
- freeimage(vehicle1_img[id])
- else
- parse("explosion "..vehicle1_x[id].." "..vehicle1_y[id].." 100 200 "..id)
- vehicle1_tx[id]=0
- vehicle1_ty[id]=0
- vehicle1_x[id]=0
- vehicle1_y[id]=0
- freeimage(vehicle1_img_pos[id])
- end
- pl_have_vehicle1[id]=0
- end
- elseif sel == 4 then
- if rp_ct[id] == true then
- menu(id,"insta2,Super Armour |Free,Laser |Free,Machete |Free,Deagle |Free,m4a1 |Free")
- else
- menu(id,"insta,Armour |10k,Grenade |1k,Ak47 |10k,Deagle |5k")
- end
- end
- end
- if men == "insta2" then
- if sel == 1 then
- parse("equip "..id.." 83")
- elseif sel == 2 then
- parse("equip "..id.." 45")
- elseif sel == 3 then
- parse("equip "..id.." 69")
- elseif sel == 4 then
- parse("equip "..id.." 3")
- elseif sel == 5 then
- parse("equip "..id.." 10")
- end
- end
- if men == "insta" then
- if sel == 1 then
- if rp_money[id] >= 10000 then
- rp_money[id] = rp_money[id]-10000
- parse("equip "..id.." 81")
- else gmsg2(id,"255000000","Not enough money!")
- end
- elseif sel == 2 then
- if rp_money[id] >= 1000 then
- rp_money[id] = rp_money[id]-1000
- parse("equip "..id.." 51")
- else gmsg2(id,"255000000","Not enough money!")
- end
- elseif sel == 3 then
- if rp_money[id] >= 10000 then
- rp_money[id] = rp_money[id]-10000
- parse("equip "..id.." 30")
- else gmsg2(id,"255000000","Not enough money!")
- end
- elseif sel == 4 then
- if rp_money[id] >= 5000 then
- rp_money[id] = rp_money[id]- 5000
- parse("equip "..id.." 3")
- else gmsg2(id,"255000000","Not enough money!")
- end
- end
- end
- if men == "Drop System" then
- if sel == 1 then
- if rp_money[id]>= 100 then
- parse("spawnitem 66 "..x.." "..y)
- rp_money[id]=rp_money[id]-100
- else
- nmn(id)
- end
- elseif sel == 2 then
- if rp_money[id]>= 500 then
- parse("spawnitem 67 "..x.." "..y)
- rp_money[id]=rp_money[id]-500
- else
- nmn(id)
- end
- elseif sel == 3 then
- if rp_money[id]>= 1000 then
- parse("spawnitem 68 "..x.." "..y)
- rp_money[id]=rp_money[id]-1000
- else
- nmn(id)
- end
- elseif sel == 4 then
- if rp_money[id]>= 5000 then
- for i = 1,5 do
- parse("spawnitem 68 "..x.." "..y)
- rp_money[id]=rp_money[id]-1000
- end
- else
- nmn(id)
- end
- elseif sel == 5 then
- if rp_money[id]>= 10000 then
- for i = 1,10 do
- parse("spawnitem 68 "..x.." "..y)
- rp_money[id]=rp_money[id]-1000
- end
- else
- nmn(id)
- end
- elseif sel == 6 then
- if rp_money[id]>= 50000 then
- for i = 1,50 do
- parse("spawnitem 68 "..x.." "..y)
- rp_money[id]=rp_money[id]-1000
- end
- else
- nmn(id)
- end
- elseif sel == 7 then
- if rp_money[id]>= 100000 then
- for i = 1,100 do
- parse("spawnitem 68 "..x.." "..y)
- rp_money[id]=rp_money[id]-1000
- end
- else
- nmn(id)
- end
- elseif sel == 8 then
- menu(id,"Buy,License |"..license_price..",Add-on,Car |"..car_price..",Instant equip")
- end
- end
- updatehud(id)
- end
- function rp_build(id,type,x,y)
- if (rp_ct[id]==true) and (rp_Buildhelp[id] > 0) then
- if type == 8 then
- if not entity(x,y,"exists") then
- parse("spawnobject 12 "..x.." "..y.." "..player(id,"rot").." 0 "..bmode[id].." "..id)
- return 1
- end
- elseif type == 21 then
- return 0
- else
- if not entity(x,y,"exists") then
- parse("spawnobject "..type.." "..x.." "..y.." "..player(id,"rot").." 0 "..bmode[id].." "..id)
- return 1
- end
- end
- elseif (rp_Buildhelp[id] == 0) then
- if rp_license[id]>0 then
- if rp_money[id]> 10000 then
- if type == 6 then
- gmsg2(id,"255000000","You are not allowed to build this@C")
- return 1
- elseif type == 8 then
- return 1
- elseif type == 9 then
- return 1
- end
- else
- nmn(id)
- return 1
- end
- else
- gmsg2(id,"255000000","You must to be licensed to build this!@C")
- return 1
- end
- end
- updatehud(id)
- end
- function rp_spawn(id)
- if rp_arrest[id]==false then
- if rp_license[id]>0 then
- if tsb[id]==1 then
- parse("setpos "..id.." "..tele_x[id].." "..tele_y[id])
- end
- for k, v in ipairs(Addons) do
- if v.FHave[id]==true then
- parse("speedmod "..id.." 10")
- break
- end
- end
- end
- parse("equip "..id.." 74")
- else
- parse("setpos "..id.." "..Config.AP[1][1].." "..Config.AP[1][2])
- end
- StateUser(id)
- InternalFreeImage(id)
- end
- function rp_hit(id,source,wpn,hpdmg)
- if wpn == 1 and rp_Adminlevel[source] >= 3 then
- parse("setpos "..id.." "..player(source,"x").." "..player(source,"y"))
- return 1
- end
- if (gmode[id] == 1) then
- return 1
- elseif no_kill == 1 then
- return 1
- end
- if wpn == 2 then
- parse("sethealth "..id.." "..player(id,"health")+math.random(10,20))
- gmsg2(id,"255255000","You have been healed by "..player(source,"name"))
- gmsg2(source,"255255000","You have healed "..player(id,"name"))
- return 1
- elseif wpn == 74 then
- return 1
- end
- end
- function rp_always()
- if max_money == true then
- if rp_money[id] > max_money2 then
- rp_money[id] = max_money2
- gmsg2(id,"255000000","You have reached the max amount of money. ")
- end
- end
- for id = 1,32 do
- if player(id,"exists") then
- if player(id,"health")>0 then
- local rot = player(id,[[rot]])
- if rot < -90 then rot = rot + 360 end
- local angle = math.rad(math.abs( rot + 90 )) - math.pi
- local x = player(id,"x") + math.cos(angle) * 5
- local y = player(id,"y") + math.sin(angle) * 5
- if x > 0 and y > 0 and x < map("xsize") * 32 and y < map("ysize") * 32 then
- if tile(math.ceil(x / 32)-1,math.ceil(y / 32)-1,"walkable") then
- if vehicle1_pic[id]>0 then
- parse("setpos "..id.." "..x.." "..y)
- vehicle1_tx[id]=player(id,"tilex")
- vehicle1_ty[id]=player(id,"tiley")
- vehicle1_x[id]=x
- vehicle1_y[id]=y
- elseif
- vehicle2_pic[id]>0 then
- parse("setpos "..id.." "..x.." "..y)
- vehicle2_tx[id]=player(id,"tilex")
- vehicle2_ty[id]=player(id,"tiley")
- vehicle2_x[id]=x
- vehicle2_y[id]=y
- end
- elseif pl_have_vehicle1[id]==1 then
- if vehicle1_pic[id]>0 then
- parse("customkill "..id.." Car "..id)
- parse("explosion "..vehicle1_x[id].." "..vehicle1_y[id].." 100 200 "..id)
- gmsg2(id,"255000000","Drive carefully. ")
- vehicle1_tx[id]=0
- vehicle1_ty[id]=0
- vehicle1_x[id]=0
- vehicle1_y[id]=0
- freeimage(vehicle1_img[id])
- freeimage(vehicle1_img[id])
- parse("speedmod "..id.." 0")
- vehicle1_pic[id]=0
- end
- pl_have_vehicle1[id]=0
- elseif pl_have_vehicle2[id] == 1 then
- if (car_crash_killct == true) then
- if vehicle2_pic[id]>0 then
- parse("customkill "..id.." Car "..id)
- parse("explosion "..vehicle2_x[id].." "..vehicle2_y[id].." 100 200 "..id)
- gmsg2(id,"255000000","Drive carefully. ")
- vehicle2_tx[id]=0
- vehicle2_ty[id]=0
- vehicle2_x[id]=0
- vehicle2_y[id]=0
- freeimage(vehicle2_img[id])
- freeimage(vehicle2_img[id])
- parse("speedmod "..id.." 0")
- vehicle2_pic[id]=0
- end
- pl_have_vehicle2[id]=0
- end
- end
- end
- end
- end
- end
- end
- function vehicle1mod_use(id,data,x,y)
- if vehicle1_pic[id] == 0 then
- if player(id,"tilex")==vehicle1_tx[id] and player(id,"tiley")==vehicle1_ty[id] then
- freeimage(vehicle1_img_pos[id])
- vehicle1_pl_speed[id]=player(id,"speedmod")
- vehicle1_img[id]=image("gfx/lord smiley/Vehicles/Open/BMW-2010-Open.png",1,1,200+id)
- parse("speedmod "..id.." -100")
- vehicle1_pic[id]=1
- end
- elseif vehicle1_pic[id]==1 then
- freeimage(vehicle1_img[id])
- parse("speedmod "..id.." "..vehicle1_pl_speed[id])
- vehicle1_tx[currentvehicle1[id]]=player(id,"tilex")
- vehicle1_ty[currentvehicle1[id]]=player(id,"tiley")
- vehicle1_img_pos[id]=image("gfx/lord smiley/Vehicles/BMW-2010.png",1,1,1)
- imagepos(vehicle1_img_pos[id],player(id,"x"),player(id,"y"),player(id,"rot"))
- vehicle1_pic[id]=0
- end
- end
- function vehicle2mod_use(id,data,x,y)
- if vehicle2_pic[id] == 0 then
- if player(id,"tilex")==vehicle2_tx[id] and player(id,"tiley")==vehicle2_ty[id] then
- freeimage(vehicle2_img_pos[id])
- vehicle2_pl_speed[id]=player(id,"speedmod")
- vehicle2_img[id]=image("gfx/lord smiley/Vehicles/police.png",1,1,200+id)
- parse("speedmod "..id.." -100")
- vehicle2_pic[id]=1
- end
- elseif vehicle2_pic[id]==1 then
- freeimage(vehicle2_img[id])
- parse("speedmod "..id.." "..vehicle2_pl_speed[id])
- vehicle2_tx[currentvehicle2[id]]=player(id,"tilex")
- vehicle2_ty[currentvehicle2[id]]=player(id,"tiley")
- vehicle2_img_pos[id]=image("gfx/lord smiley/Vehicles/police.png",1,1,1)
- imagepos(vehicle2_img_pos[id],player(id,"x"),player(id,"y"),player(id,"rot"))
- vehicle2_pic[id]=0
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement