Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- it is 7 files
- this in folder called team boss:
- main.lua:
- nokill = 0
- --Lord Smiley's lua
- -- :D !smiley face!
- dofile("sys/lua/Team Boss/functions.lua")
- dofile("sys/lua/Team Boss/config.lua")
- dofile("sys/lua/Team Boss/addons.lua")
- dofile("sys/lua/Team Boss/Admin.lua")
- dofile("sys/lua/Team Boss/users.lua")
- dofile("sys/lua/Team Boss/setting.lua")
- dofile("sys/lua/Team Boss/funcFootbal.lua")
- dofile("sys/lua/Team Boss/buying_menu.lua")
- UpdateHudeImages()
- withd = Array(32,0)
- depos = Array(32,0)
- rp_balad = Array(32,0)
- h_card =Array(32,0)
- Bankmoney =Array(32,0)
- rp_ct = Array(32,false)
- rp_Adminlevel = Array(32,0)
- rp_license = Array(32,0)
- vehicle_license = Array(32,0)
- rp_money = Array(32,100)
- rp_arrest = Array(32,false)
- rp_vipaddons = Array(32,0)
- rp_vipmsg = Array(32,0)
- rp_NextAddons = Array(32,0)
- UsgnIds = Array(32, 0)
- PicImage = Array(32, 0)
- --footbal--
- team_no = Array(32,0)
- havebal = Array(32,false)
- FTWin = Array(2,1)
- -----------
- tsb = Array(32,0)
- player_have_pos = Array(32,false)
- tele_x = Array(32,0)
- tele_y = Array(32,0)
- rp_criminal = Array(32,false)
- ---houses---
- house1 = Array(32,0)
- house2 = Array(32,0)
- house3 = Array(32,0)
- house4 = Array(32,0)
- house5 = Array(32,0)
- house6 = Array(32,0)
- house7 = Array(32,0)
- house8 = Array(32,0)
- house9 = Array(32,0)
- house10 = Array(32,0)
- havehouse = Array(32,0)
- havehorse = Array(32,0)
- havehouse1 = Array(32,0)
- havehouse2 = Array(32,0)
- havehouse3 = Array(32,0)
- havehouse4 = Array(32,0)
- havehouse5 = Array(32,0)
- havehouse6 = Array(32,0)
- havehouse7 = Array(32,0)
- havehouse8 = Array(32,0)
- havehouse9 = Array(32,0)
- havehouse10 = Array(32,0)
- house1owner = "Empty"
- house2owner = "Empty"
- house3owner = "Empty"
- house4owner = "Empty"
- house5owner = "Empty"
- house6owner = "Empty"
- house7owner = "Empty"
- house8owner = "Empty"
- house9owner = "Empty"
- house10owner = "Empty"
- -- vehicles values --
- -- Vehicle 1 --
- vehicle1_tx = Array(32,0)
- vehicle1_ty = Array(32,0)
- vehicle1_x = Array(32,0)
- vehicle1_y = Array(32,0)
- vehicle1_pic = Array(32,0)
- vehicle1_pl_speed = Array(32,0)
- vehicle1_img = Array(32,0)
- vehicle1_img_pos = Array(32,0)
- currentvehicle1 = Array(32,0)
- pl_have_vehicle1 = Array(32,0)
- vehicle1_pl = Array(32,0)
- -- Vehicle 2 --
- vehicle2_tx = Array(32,0)
- vehicle2_ty = Array(32,0)
- vehicle2_x = Array(32,0)
- vehicle2_y = Array(32,0)
- vehicle2_pic = Array(32,0)
- vehicle2_pl_speed = Array(32,0)
- vehicle2_img = Array(32,0)
- vehicle2_img_pos = Array(32,0)
- currentvehicle2 = Array(32,0)
- pl_have_vehicle2 = Array(32,0)
- vehicle2_pl = Array(32,0)
- -- Vehicle 3 --
- vehicle3_tx = Array(32,0)
- vehicle3_ty = Array(32,0)
- vehicle3_x = Array(32,0)
- vehicle3_y = Array(32,0)
- vehicle3_pic = Array(32,0)
- vehicle3_pl_speed = Array(32,0)
- vehicle3_img = Array(32,0)
- vehicle3_img_pos = Array(32,0)
- currentvehicle3 = Array(32,0)
- pl_have_vehicle3 = Array(32,0)
- vehicle3_pl = Array(32,0)
- -- Vehicle 4 --
- vehicle4_tx = Array(32,0)
- vehicle4_ty = Array(32,0)
- vehicle4_x = Array(32,0)
- vehicle4_y = Array(32,0)
- vehicle4_pic = Array(32,0)
- vehicle4_pl_speed = Array(32,0)
- vehicle4_img = Array(32,0)
- vehicle4_img_pos = Array(32,0)
- currentvehicle4 = Array(32,0)
- pl_have_vehicle4 = Array(32,0)
- vehicle4_pl = Array(32,0)
- -- Vehicle 5 --
- vehicle5_tx = Array(32,0)
- vehicle5_ty = Array(32,0)
- vehicle5_x = Array(32,0)
- vehicle5_y = Array(32,0)
- vehicle5_pic = Array(32,0)
- vehicle5_pl_speed = Array(32,0)
- vehicle5_img = Array(32,0)
- vehicle5_img_pos = Array(32,0)
- currentvehicle5 = Array(32,0)
- pl_have_vehicle5 = Array(32,0)
- vehicle5_pl = Array(32,0)
- -- Vehicle 6 --
- vehicle6_tx = Array(32,0)
- vehicle6_ty = Array(32,0)
- vehicle6_x = Array(32,0)
- vehicle6_y = Array(32,0)
- vehicle6_pic = Array(32,0)
- vehicle6_pl_speed = Array(32,0)
- vehicle6_img = Array(32,0)
- vehicle6_img_pos = Array(32,0)
- currentvehicle6 = Array(32,0)
- pl_have_vehicle6 = Array(32,0)
- vehicle6_pl = Array(32,0)
- -- Vehicle 7 --
- vehicle7_tx = Array(32,0)
- vehicle7_ty = Array(32,0)
- vehicle7_x = Array(32,0)
- vehicle7_y = Array(32,0)
- vehicle7_pic = Array(32,0)
- vehicle7_pl_speed = Array(32,0)
- vehicle7_img = Array(32,0)
- vehicle7_img_pos = Array(32,0)
- currentvehicle7 = Array(32,0)
- pl_have_vehicle7 = Array(32,0)
- vehicle7_pl = Array(32,0)
- -- Vehicle 8 --
- vehicle8_tx = Array(32,0)
- vehicle8_ty = Array(32,0)
- vehicle8_x = Array(32,0)
- vehicle8_y = Array(32,0)
- vehicle8_pic = Array(32,0)
- vehicle8_pl_speed = Array(32,0)
- vehicle8_img = Array(32,0)
- vehicle8_img_pos = Array(32,0)
- currentvehicle8 = Array(32,0)
- pl_have_vehicle8 = Array(32,0)
- vehicle8_pl = Array(32,0)
- -- Vehicle 9 --
- vehicle9_tx = Array(32,0)
- vehicle9_ty = Array(32,0)
- vehicle9_x = Array(32,0)
- vehicle9_y = Array(32,0)
- vehicle9_pic = Array(32,0)
- vehicle9_pl_speed = Array(32,0)
- vehicle9_img = Array(32,0)
- vehicle9_img_pos = Array(32,0)
- currentvehicle9 = Array(32,0)
- pl_have_vehicle9 = Array(32,0)
- vehicle9_pl = Array(32,0)
- -- Vehicle 10 --
- vehicle10_tx = Array(32,0)
- vehicle10_ty = Array(32,0)
- vehicle10_x = Array(32,0)
- vehicle10_y = Array(32,0)
- vehicle10_pic = Array(32,0)
- vehicle10_pl_speed = Array(32,0)
- vehicle10_img = Array(32,0)
- vehicle10_img_pos = Array(32,0)
- currentvehicle10 = Array(32,0)
- pl_have_vehicle10 = Array(32,0)
- vehicle10_pl = Array(32,0)
- -- Vehicle 11 --
- vehicle11_tx = Array(32,0)
- vehicle11_ty = Array(32,0)
- vehicle11_x = Array(32,0)
- vehicle11_y = Array(32,0)
- vehicle11_pic = Array(32,0)
- vehicle11_pl_speed = Array(32,0)
- vehicle11_img = Array(32,0)
- vehicle11_img_pos = Array(32,0)
- currentvehicle11 = Array(32,0)
- pl_have_vehicle11 = Array(32,0)
- vehicle11_pl = Array(32,0)
- -- Vehicle 12 --
- vehicle12_tx = Array(32,0)
- vehicle12_ty = Array(32,0)
- vehicle12_x = Array(32,0)
- vehicle12_y = Array(32,0)
- vehicle12_pic = Array(32,0)
- vehicle12_pl_speed = Array(32,0)
- vehicle12_img = Array(32,0)
- vehicle12_img_pos = Array(32,0)
- currentvehicle12 = Array(32,0)
- pl_have_vehicle12 = Array(32,0)
- vehicle12_pl = Array(32,0)
- --horse---
- --horse1---
- horse1_tx = Array(32,0)
- horse1_ty = Array(32,0)
- horse1_x = Array(32,0)
- horse1_y = Array(32,0)
- horse1_pic = Array(32,0)
- horse1_pl_speed = Array(32,0)
- horse1_img = Array(32,0)
- horse1_img_pos = Array(32,0)
- currenthorse1 = Array(32,0)
- pl_have_horse1 = Array(32,0)
- horse1_pl = Array(32,0)
- ---horse2---
- horse2_tx = Array(32,0)
- horse2_ty = Array(32,0)
- horse2_x = Array(32,0)
- horse2_y = Array(32,0)
- horse2_pic = Array(32,0)
- horse2_pl_speed = Array(32,0)
- horse2_img = Array(32,0)
- horse2_img_pos = Array(32,0)
- currenthorse2 = Array(32,0)
- pl_have_horse2 = Array(32,0)
- horse2_pl = Array(32,0)
- ---horse3---
- horse3_tx = Array(32,0)
- horse3_ty = Array(32,0)
- horse3_x = Array(32,0)
- horse3_y = Array(32,0)
- horse3_pic = Array(32,0)
- horse3_pl_speed = Array(32,0)
- horse3_img = Array(32,0)
- horse3_img_pos = Array(32,0)
- currenthorse3 = Array(32,0)
- pl_have_horse3 = Array(32,0)
- horse3_pl = Array(32,0)
- function mlicense(id)
- rp_msg2(id,[[255000000]],[[You must to be licensed to build this!@C]])
- end
- function my_msg(t)
- parse("sv_msg "..t)
- end
- function mlicense2(id)
- rp_msg2(id,[[255000000]],[[You are not allowed to build this@C]])
- end
- function InternalFreeImage(id)
- if (team_no[id]>0) then
- freeimage(PicImage[id])
- team_no[id]=0
- else
- for k, v in ipairs(Addons) do
- if v.FHave[id]==1 then
- freeimage(PicImage[id])
- v.FHave[id]=0
- end
- end
- end
- end
- addhook("join","rp_load")
- function rp_load(id)
- withd[id] = 0
- depos[id] = 0
- rp_license[id]=0
- vehicle_license[id]=0
- rp_ct[id]=false
- rp_Adminlevel[id]=0
- rp_arrest[id]=false
- 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_vipmsg[id]=0
- rp_NextAddons[id]=0
- InternalFreeImage(id)
- InternalFreeAddons(id)
- havehouse1=0
- havehouse2=0
- havehouse3=0
- havehouse4=0
- havehouse5=0
- havehouse6=0
- havehouse7=0
- havehouse8=0
- havehouse9=0
- havehouse10=0
- 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
- rp_msg2(id,"000255000","Login with "..UsgnID)
- rp_Adminlevel[id]= isAdmin(UsgnID)
- local filename = "sys/lua/Team Boss/Stats/"..UsgnID..".txt"
- local file = io.open(filename)
- if file then
- LoadUserStat(id,file)
- rp_msg2(id,"000255000","Load Successfully!")
- if player(id,"usgn") == 40027 then
- rp_license[id]=3
- SetAddons(id,1)
- vehicle_license[id]=1
- rp_balad[id]= 1
- rp_arrest[id]= false
- elseif rp_Adminlevel[id]>=1 then
- rp_ct[id]=true
- rp_license[id]=4
- SetAddons(id,1)
- vehicle_license[id]=1
- rp_balad[id] = 1
- rp_arrest[id]= false
- end
- if file ~= nil then
- file:close()
- end
- end
- UsgnIds[id] = UsgnID
- else
- rp_msg2(id,"255000000","Load fail!")
- end
- else
- rp_msg2(id,"255000000","Please register a U.S.G.N. account at http://www.unrealsoftware.de/ and make sure that you are logged in!")
- rp_msg2(id,"255000000","Your money and license not save on Database")
- end
- end
- addhook("team","rp_team")
- 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
- -- rp_msg2(id,"255000000","You are not allow to chose team!@C")
- -- return 1
- end
- end
- addhook("leave","rp_leave")
- function rp_leave(id)
- local UsgnID = UsgnIds[id]
- if UsgnID > 0 then
- SaveUserStat(id,UsgnID)
- end
- rp_license[id]=0
- vehicle_license[id]=0
- rp_ct[id]=false
- rp_Adminlevel[id]=0
- rp_arrest[id]=false
- rp_vipmsg[id]=0
- player_have_pos[id]=false
- tsb[id]=0
- tele_x[id]=800
- tele_y[id]=200
- rp_money[id]=100
- UsgnIds[id]= 0
- rp_vipaddons[id]=0
- rp_NextAddons[id]=0
- x = player(id,"tilex")
- y = player(id,"tiley")
- rp_criminal[id]=false
- house1[id]=0
- house2[id]=0
- house3[id]=0
- house4[id]=0
- house5[id]=0
- house6[id]=0
- house7[id]=0
- house8[id]=0
- house9[id]=0
- house10[id]=0
- havehouse[id]=0
- havehorse[id]=0
- house1owner = "Empty"
- house2owner = "Empty"
- house3owner = "Empty"
- house4owner = "Empty"
- house5owner = "Empty"
- house6owner = "Empty"
- house7owner = "Empty"
- house8owner = "Empty"
- house9owner = "Empty"
- house10owner = "Empty"
- -- horse value --
- -- horse 1--
- horse1_tx[id]=0
- horse1_ty[id]=0
- horse1_x[id]=0
- horse1_y[id]=0
- horse1_pic[id]=0
- horse1_pl_speed[id]=0
- freeimage(horse1_img[id])
- freeimage(horse1_img_pos[id])
- currenthorse1[id]=0
- pl_have_horse1[id]=0
- horse1_pl[id]=0
- -- horse 2--
- horse2_tx[id]=0
- horse2_ty[id]=0
- horse2_x[id]=0
- horse2_y[id]=0
- horse2_pic[id]=0
- horse2_pl_speed[id]=0
- freeimage(horse2_img[id])
- freeimage(horse2_img_pos[id])
- currenthorse2[id]=0
- pl_have_horse2[id]=0
- horse2_pl[id]=0
- -- horse 3--
- horse3_tx[id]=0
- horse3_ty[id]=0
- horse3_x[id]=0
- horse3_y[id]=0
- horse3_pic[id]=0
- horse3_pl_speed[id]=0
- freeimage(horse3_img[id])
- freeimage(horse3_img_pos[id])
- currenthorse3[id]=0
- pl_have_horse3[id]=0
- horse3_pl[id]=0
- -- Vehicles Value --
- -- Vehicle 1 --
- vehicle1_tx[id]=0
- vehicle1_ty[id]=0
- vehicle1_x[id]=0
- vehicle1_y[id]=0
- vehicle1_pic[id]=0
- vehicle1_pl_speed[id]=0
- freeimage(vehicle1_img[id])
- freeimage(vehicle1_img_pos[id])
- currentvehicle1[id]=0
- pl_have_vehicle1[id]=0
- vehicle1_pl[id]=0
- -- vehicle 2 --
- vehicle2_tx[id]=0
- vehicle2_ty[id]=0
- vehicle2_x[id]=0
- vehicle2_y[id]=0
- vehicle2_pic[id]=0
- vehicle2_pl_speed[id]=0
- freeimage(vehicle2_img[id])
- freeimage(vehicle2_img_pos[id])
- currentvehicle2[id]=0
- pl_have_vehicle2[id]=0
- vehicle2_pl[id]=0
- -- vehicle 3 --
- vehicle3_tx[id]=0
- vehicle3_ty[id]=0
- vehicle3_x[id]=0
- vehicle3_y[id]=0
- vehicle3_pic[id]=0
- vehicle3_pl_speed[id]=0
- freeimage(vehicle3_img[id])
- freeimage(vehicle3_img_pos[id])
- currentvehicle3[id]=0
- pl_have_vehicle3[id]=0
- vehicle3_pl[id]=0
- -- vehicle 4 --
- vehicle4_tx[id]=0
- vehicle4_ty[id]=0
- vehicle4_x[id]=0
- vehicle4_y[id]=0
- vehicle4_pic[id]=0
- vehicle4_pl_speed[id]=0
- freeimage(vehicle4_img[id])
- freeimage(vehicle4_img_pos[id])
- currentvehicle4[id]=0
- pl_have_vehicle4[id]=0
- vehicle4_pl[id]=0
- -- vehicle 5 --
- vehicle5_tx[id]=0
- vehicle5_ty[id]=0
- vehicle5_x[id]=0
- vehicle5_y[id]=0
- vehicle5_pic[id]=0
- vehicle5_pl_speed[id]=0
- freeimage(vehicle5_img[id])
- freeimage(vehicle5_img_pos[id])
- currentvehicle5[id]=0
- pl_have_vehicle5[id]=0
- vehicle5_pl[id]=0
- -- vehicle 6 --
- vehicle6_tx[id]=0
- vehicle6_ty[id]=0
- vehicle6_x[id]=0
- vehicle6_y[id]=0
- vehicle6_pic[id]=0
- vehicle6_pl_speed[id]=0
- freeimage(vehicle6_img[id])
- freeimage(vehicle6_img_pos[id])
- currentvehicle6[id]=0
- pl_have_vehicle6[id]=0
- vehicle6_pl[id]=0
- -- vehicle 7 --
- vehicle7_tx[id]=0
- vehicle7_ty[id]=0
- vehicle7_x[id]=0
- vehicle7_y[id]=0
- vehicle7_pic[id]=0
- vehicle7_pl_speed[id]=0
- freeimage(vehicle7_img[id])
- freeimage(vehicle7_img_pos[id])
- currentvehicle7[id]=0
- pl_have_vehicle7[id]=0
- vehicle7_pl[id]=0
- -- vehicle 8 --
- vehicle8_tx[id]=0
- vehicle8_ty[id]=0
- vehicle8_x[id]=0
- vehicle8_y[id]=0
- vehicle8_pic[id]=0
- vehicle8_pl_speed[id]=0
- freeimage(vehicle8_img[id])
- freeimage(vehicle8_img_pos[id])
- currentvehicle8[id]=0
- pl_have_vehicle8[id]=0
- vehicle8_pl[id]=0
- -- vehicle 9 --
- vehicle9_tx[id]=0
- vehicle9_ty[id]=0
- vehicle9_x[id]=0
- vehicle9_y[id]=0
- vehicle9_pic[id]=0
- vehicle9_pl_speed[id]=0
- freeimage(vehicle9_img[id])
- freeimage(vehicle9_img_pos[id])
- currentvehicle9[id]=0
- pl_have_vehicle9[id]=0
- vehicle9_pl[id]=0
- -- vehicle 10 --
- vehicle10_tx[id]=0
- vehicle10_ty[id]=0
- vehicle10_x[id]=0
- vehicle10_y[id]=0
- vehicle10_pic[id]=0
- vehicle10_pl_speed[id]=0
- freeimage(vehicle10_img[id])
- freeimage(vehicle10_img_pos[id])
- currentvehicle10[id]=0
- pl_have_vehicle10[id]=0
- vehicle10_pl[id]=0
- -- vehicle 11 --
- vehicle11_tx[id]=0
- vehicle11_ty[id]=0
- vehicle11_x[id]=0
- vehicle11_y[id]=0
- vehicle11_pic[id]=0
- vehicle11_pl_speed[id]=0
- freeimage(vehicle11_img[id])
- freeimage(vehicle11_img_pos[id])
- currentvehicle11[id]=0
- pl_have_vehicle11[id]=0
- vehicle11_pl[id]=0
- -- vehicle 12 --
- vehicle12_tx[id]=0
- vehicle12_ty[id]=0
- vehicle12_x[id]=0
- vehicle12_y[id]=0
- vehicle12_pic[id]=0
- vehicle12_pl_speed[id]=0
- freeimage(vehicle12_img[id])
- freeimage(vehicle12_img_pos[id])
- currentvehicle12[id]=0
- pl_have_vehicle12[id]=0
- vehicle12_pl[id]=0
- --------------------
- if house1[id]==2 then
- havehouse1=0
- elseif house2[id]==2 then
- havehouse2=0
- elseif house3[id]==2 then
- havehouse3=0
- elseif house4[id]==2 then
- havehouse4=0
- elseif house5[id]==2 then
- havehouse5=0
- elseif havebal[id]==true then
- parse("spawnitem 75 "..x.." "..y)
- end
- havebal[id]=false
- InternalFreeImage(id)
- InternalFreeAddons(id)
- end
- addhook("startround","rp_startround")
- function rp_startround(mode)
- for id = 1,32 do
- if player(id,"exists") then
- player_have_pos[id]=false
- tele_x[id]=800
- tele_y[id]=200
- havebal[id]=false
- FTWin[1]=0
- FTWin[2]=0
- house1[id] = 0
- house2[id] = 0
- house3[id] = 0
- house4[id] = 0
- house5[id] = 0
- house6[id] = 0
- house7[id] = 0
- house8[id] = 0
- house9[id] = 0
- house10[id] = 0
- havehouse[id] = 0
- havehorse[id] = 0
- havehouse1=0
- havehouse2=0
- havehouse3=0
- havehouse4=0
- havehouse5=0
- havehouse6=0
- havehouse7=0
- havehouse8=0
- havehouse9=0
- havehouse10=0
- no_kill = 0
- if house1[id]==2 then
- house1owner = "Empty"
- elseif house2[id]==2 then
- house2owner = "Empty"
- elseif house3[id]==2 then
- house3owner = "Empty"
- elseif house4[id]==2 then
- house4owner = "Empty"
- elseif house5[id]==2 then
- house5owner = "Empty"
- elseif house6[id]==2 then
- house6owner = "Empty"
- elseif house7[id]==2 then
- house7owner = "Empty"
- elseif house8[id]==2 then
- house8owner = "Empty"
- elseif house9[id]==2 then
- house9owner = "Empty"
- elseif house10[id]==2 then
- house10owner = "Empty"
- InternalFreeImage(id)
- end
- end
- end
- UpdateHudeImages()
- end
- function updatehud(id)
- if id ~= nil then
- if player(id,"exists") then
- if (team_no[id]~=nil) and (team_no[id]>0) then
- hudtext2(id,id+2,"000128255","Blue Team: "..FTWin[1],14,179)
- hudtext2(id,id+3,"255000000","Red Team: "..FTWin[2],14,194)
- elseif rp_license[id] >=0 then
- if rp_license[id] ==0 then
- hudtext2(id,id+4,"255255255","LEVEL: Newbie.",500,383)
- elseif rp_license[id] == 1 then
- hudtext2(id,id+4,"255255255","LEVEL: License holder.",500,383)
- elseif rp_license[id] == 2 then
- hudtext2(id,id+4,"255255255","LEVEL: Ticket holder.",500,383)
- elseif rp_license[id] == 3 then
- hudtext2(id,id+4,"255255255","LEVEL: Vip.",500,383)
- elseif rp_license[id] > 3 then
- hudtext2(id,id+4,"255255255","LEVEL: Admin.",500,383)
- end
- hudtext2(id,id,"255255255","MONEY: "..rp_money[id],500,339)
- end
- end
- end
- end
- addhook("attack","rp_attack")
- 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
- ---shops---
- ---vehicle---
- vehiclenpcx=163
- vehiclenpcy=79
- ---vicar--
- vicarnpcx=149
- vicarnpcy=75
- ---license--
- licensenpcx=195
- licensenpcy=79
- ---magic--
- magicnpcx=181
- magicnpcy=79
- ----bridge---
- bridge1npcx=49
- bridge1npcy=165
- bridge2npcx=54
- bridge2npcy=165
- ---movie---
- movienpcx=25
- movienpcy=177
- ---shop---
- shopnpcx=59
- shopnpcy=181
- shop2npcx=25
- shop2npcy=126
- ---horse---
- horsenpcx=89
- horsenpcy=160
- addhook("say","rp_int")
- function rp_int(id,txt)
- if Mute_text== 1 then
- rp_msg2(id,"255000000","You cant send message in mute mode, use team message")
- return 1
- end
- -- if depos[id] == 0 and checkbound(id,Config.Bank) then
- -- local bankamount = txt
- -- if rp_money[id] >= bankamount then
- -- rp_money[id] = rp_money[id] - bankamount
- -- Bankmoney[id] = Bankmoney[id] + bankamount
- -- updatehud(id)
- -- depos[id] = 0
- -- elseif rp_money[id] < bankamount then
- -- rp_msg2(id,"255255255","not enought money with you")
- -- depos[id] = 0
- -- end
- -- end
- --if withd[id] == 1 and checkbound(id,Config.Bank) then
- -- local bankamount = txt
- -- if Bankmoney[id] >= bankamount then
- -- rp_money[id] = rp_money[id] + bankamount
- -- Bankmoney[id] = Bankmoney[id] - bankamount
- -- updatehud(id)
- -- rp_msg2(id,"255255255","You have successfuly withdrawn "..bankamount.."$ from your Bank-account!")
- -- withd[id] = 0
- -- elseif Bankmoney[id] < bankamount then
- -- rp_msg2(id,"255255255","not enought money on your Bank-account!")
- -- withd[id] = 0
- -- end
- --end
- --withd[id] = 0
- if (txt =="hi" and player(id,"tilex")==vehiclenpcx and player(id,"tiley")==vehiclenpcy) then
- rp_msg2(id,"255000000","Vehicle Seller: Hello Which vehicle you would like to rent?")
- menu(id,"Vehicle list 1,BMW 2010 |3k,Porche |1.5k,Nissan |5k,BMW X5 |7.5k,Sedan |3k,Other Vehicles")
- elseif (txt=="hi" and player(id,"tilex")==horsenpcx and player(id,"tiley")==horsenpcy) then
- rp_msg2(id,"255000000","Horse Seller: Hello Which horse you would like to rent?")
- menu(id,"Horses,White horse |10k,Orange horse |10k,Brown horse |10k")
- elseif (txt=="hi" and player(id,"tilex")==movienpcx and player(id,"tiley")==movienpcy) then
- rp_msg2(id,"255000000"," Hello Which movie you would like to watch?")
- menu(id,"Movie,Naruto |100$,Harry Potter |100$,bye")
- elseif (txt=="hi" and player(id,"tilex")==bridge1npcx and player(id,"tiley")==bridge1npcy) then
- rp_msg2(id,"255000000","Hi,Welcome to the island.")
- menu(id,"Bridge,Can I pass?,Buy a ticket. |30k,Bye")
- elseif (txt=="hi" and player(id,"tilex")==bridge2npcx and player(id,"tiley")==bridge2npcy) then
- rp_msg2(id,"255000000","Hi,Welcome to the island.")
- menu(id,"Bridge2,Can I pass?,Buy a ticket. |30k,Bye")
- elseif (txt=="hi" and player(id,"tilex")==vicarnpcx and player(id,"tiley")==vicarnpcy) then
- rp_msg2(id,"255000000","Vicar:Welcome to the church.")
- menu(id,"Heal,Heal |1k,Bye")
- elseif (txt=="hi" and player(id,"tilex")==licensenpcx and player(id,"tiley")==licensenpcy) then
- rp_msg2(id,"255000000","License Seller: Hello Which License you would like to Buy?")
- menu(id,"License List,Normal License |100k,Vehicle License |150k,Vip |5000k,Temp Ct power |100000k,Buy speed")
- elseif (txt=="hi" and player(id,"tilex")==shopnpcx and player(id,"tiley")==shopnpcy) then
- if rp_Adminlevel[id] >= 1 then
- rp_msg2(id,"255000000","House Seller: Hello admin, What would you like to do?")
- menu(id,"sansnasa,This menu , is under, constuction!")
- else
- rp_msg2(id,"255000000","House Seller: Hello, Which house you would like to Buy?")
- menu(id,"Buy House,house 1 |"..house1owner..",house 2 |"..house2owner..",house 3 |"..house3owner..",house 4 |"..house4owner..",house 5 |"..house5owner..",bye")
- end
- elseif (txt=="hi" and player(id,"tilex")==shop2npcx and player(id,"tiley")==shop2npcy) then
- if rp_Adminlevel[id] >= 1 then
- rp_msg2(id,"255000000","House Seller: Hello admin, What would you like to do?")
- menu(id,"sansnasa2,This menu , is under, constuction!")
- else
- rp_msg2(id,"255000000","House Seller: Hello, Which house you would like to Buy?")
- menu(id,"Buy House2,house 6 |"..house6owner..",house 7 |"..house7owner..",house 8 |"..house8owner..",house 9 |"..house9owner..",house 10 |"..house10owner..",bye")
- end
- elseif (txt=="hi" and player(id,"tilex")==magicnpcx and player(id,"tiley")==magicnpcy) then
- rp_msg2(id,"255000000","Magician: Hello Which Magic you would like to learn?")
- CreateAddonsSell(id)
- elseif (txt=="hi" and checkbound(id,Config.Bank)) then
- rp_msg2(id,"255000000","Banker:Welcome to the bank.")
- menu(id,"bank,my money |"..Bankmoney[id]..",Deposit ,Withdraw,Credit card ,Info ")
- end
- if rp_ct[id]==true then
- if txt:sub(1,1)=="!" then
- print(player(id,'name')..' used a command:'..txt)
- ParseAdminCommand(id,txt)
- return 1
- end
- if txt:sub(1,1)=="$" then
- print(player(id,'name')..' made a action:'..txt)
- more_say(id,txt)
- return 1
- end
- if rp_ct[id] == true then
- if txt ~="rank" then
- if rp_Adminlevel[id] == 11 then
- rp_msg("255000000",player(id,"name").."(Owner): "..txt)
- elseif rp_Adminlevel[id]== 10 then
- rp_msg("255255255",player(id,"name").."(Visitor): "..txt)
- elseif rp_Adminlevel[id]== 9 then
- rp_msg("285764183",player(id,"name").."(FEFERGEGERE): "..txt)
- elseif rp_Adminlevel[id]== 8 then
- rp_msg("284437824",player(id,"name").."(Scripter): "..txt)
- elseif rp_Adminlevel[id]== 7 then
- rp_msg("823184625",player(id,"name").."(Vice Leader): "..txt)
- elseif rp_Adminlevel[id]== 6 then
- rp_msg("233114250",player(id,"name").."(H-Admin): "..txt)
- elseif rp_Adminlevel[id]== 5 then
- rp_msg("124255062",player(id,"name").."(Admin): "..txt)
- elseif rp_Adminlevel[id]== 4 then
- rp_msg("062255245",player(id,"name").."(SuperMod): "..txt)
- elseif rp_Adminlevel[id]== 3 then
- rp_msg("071062255",player(id,"name").."(MOD): "..txt)
- elseif rp_Adminlevel[id] == 2 then
- rp_msg("250255062",player(id,"name").."(Trainee): "..txt)
- elseif rp_Adminlevel[id] == 1 then
- rp_msg("254154063",player(id,"name").."(CT): "..txt)
- end
- return 1
- end
- end
- end
- if rp_vipmsg[id]>0 and txt ~="rank" then
- rp_msg("000255255",player(id,"name").."(VIP): "..txt)
- rp_vipmsg[id]=0
- return 1
- end
- if rp_ct[id] == false then
- if txt ~="rank" then
- if rp_Adminlevel[id] == 0 then
- rp_msg("255255255",player(id,"name").."(Visitor): "..txt)
- return 1
- end
- end
- end
- end
- addhook("say","news_show")
- function news_show(id,news)
- if string.sub(news,1,6)=="@news " then
- if rp_Adminlevel[id]>=5 then
- news_bari(id,news)
- else
- msg2(id,string.char(169)..'255000000Error: You´re not allowed to use this command.')
- end
- return 1
- end
- end
- addhook("kill","rp_kill")
- function rp_kill(killer,victim,wpn)
- if rp_ct[killer]==true then
- rp_money[killer]=rp_money[killer]+300
- rp_money[victim]=rp_money[victim]-100
- else
- if killer~=victim then
- if checkbound(victim,Config.Bounce) then--
- local PScore = player(killer,"score")
- if PScore >= 0 then
- parse("setmoney "..killer.." "..Config.HoldMoney)
- parse("setscore "..killer.." "..PScore+2)
- rp_money[killer]=rp_money[killer]+2000
- rp_money[victim]=rp_money[victim]-1000
- rp_msg2(killer,[[000255000]],[[Good kill!@C]])
- else
- parse("setscore "..killer.." 0")
- parse("setmoney "..killer.." "..Config.HoldMoney)
- end
- elseif rp_criminal[victim]==true then
- rp_criminal[killer]=false
- rp_msg2(killer,[[000255000]],[[You just killed a crminal!@C]])
- else
- rp_criminal[victim]=false
- rp_criminal[killer]=true
- rp_msg2(killer,[[255000000]],[[You just Murdered!@C]])
- end
- end
- end
- updatehud(killer)
- updatehud(victim)
- end
- addhook([[always]],[[rp_always]])
- function rp_always()
- for id = 1,32 do
- if player(id,[[exists]]) then
- if player(id,[[health]])>0 then
- -- vehicle mod Auto Walk
- 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
- end
- if 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
- if vehicle3_pic[id]>0 then
- parse([[setpos ]]..id..[[ ]]..x..[[ ]]..y)
- vehicle3_tx[id]=player(id,[[tilex]])
- vehicle3_ty[id]=player(id,[[tiley]])
- vehicle3_x[id]=x
- vehicle3_y[id]=y
- end
- if vehicle4_pic[id]>0 then
- parse([[setpos ]]..id..[[ ]]..x..[[ ]]..y)
- vehicle4_tx[id]=player(id,[[tilex]])
- vehicle4_ty[id]=player(id,[[tiley]])
- vehicle4_x[id]=x
- vehicle4_y[id]=y
- end
- if vehicle5_pic[id]>0 then
- parse([[setpos ]]..id..[[ ]]..x..[[ ]]..y)
- vehicle5_tx[id]=player(id,[[tilex]])
- vehicle5_ty[id]=player(id,[[tiley]])
- vehicle5_x[id]=x
- vehicle5_y[id]=y
- end
- if vehicle6_pic[id]>0 then
- parse([[setpos ]]..id..[[ ]]..x..[[ ]]..y)
- vehicle6_tx[id]=player(id,[[tilex]])
- vehicle6_ty[id]=player(id,[[tiley]])
- vehicle6_x[id]=x
- vehicle6_y[id]=y
- end
- if vehicle7_pic[id]>0 then
- parse([[setpos ]]..id..[[ ]]..x..[[ ]]..y)
- vehicle7_tx[id]=player(id,[[tilex]])
- vehicle7_ty[id]=player(id,[[tiley]])
- vehicle7_x[id]=x
- vehicle7_y[id]=y
- end
- if vehicle8_pic[id]>0 then
- parse([[setpos ]]..id..[[ ]]..x..[[ ]]..y)
- vehicle8_tx[id]=player(id,[[tilex]])
- vehicle8_ty[id]=player(id,[[tiley]])
- vehicle8_x[id]=x
- vehicle8_y[id]=y
- end
- if vehicle9_pic[id]>0 then
- parse([[setpos ]]..id..[[ ]]..x..[[ ]]..y)
- vehicle9_tx[id]=player(id,[[tilex]])
- vehicle9_ty[id]=player(id,[[tiley]])
- vehicle9_x[id]=x
- vehicle9_y[id]=y
- end
- if vehicle10_pic[id]>0 then
- parse([[setpos ]]..id..[[ ]]..x..[[ ]]..y)
- vehicle10_tx[id]=player(id,[[tilex]])
- vehicle10_ty[id]=player(id,[[tiley]])
- vehicle10_x[id]=x
- vehicle10_y[id]=y
- end
- if vehicle11_pic[id]>0 then
- parse([[setpos ]]..id..[[ ]]..x..[[ ]]..y)
- vehicle11_tx[id]=player(id,[[tilex]])
- vehicle11_ty[id]=player(id,[[tiley]])
- vehicle11_x[id]=x
- vehicle11_y[id]=y
- end
- if vehicle12_pic[id]>0 then
- parse([[setpos ]]..id..[[ ]]..x..[[ ]]..y)
- vehicle12_tx[id]=player(id,[[tilex]])
- vehicle12_ty[id]=player(id,[[tiley]])
- vehicle12_x[id]=x
- vehicle12_y[id]=y
- end
- if horse1_pic[id]>0 then
- parse([[setpos ]]..id..[[ ]]..x..[[ ]]..y)
- horse1_tx[id]=player(id,[[tilex]])
- horse1_ty[id]=player(id,[[tiley]])
- horse1_x[id]=x
- horse1_y[id]=y
- end
- if horse2_pic[id]>0 then
- parse([[setpos ]]..id..[[ ]]..x..[[ ]]..y)
- horse2_tx[id]=player(id,[[tilex]])
- horse2_ty[id]=player(id,[[tiley]])
- horse2_x[id]=x
- horse2_y[id]=y
- end
- if horse3_pic[id]>0 then
- parse([[setpos ]]..id..[[ ]]..x..[[ ]]..y)
- horse3_tx[id]=player(id,[[tilex]])
- horse3_ty[id]=player(id,[[tiley]])
- horse3_x[id]=x
- horse3_y[id]=y
- end
- end
- end
- end
- end
- end
- end
- addhook("minute","rp_minute")
- 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
- rp_msg2(id,"255255000","$10000 PAYDAY!@C")
- Bankmoney[id] = Bankmoney[id] * 1.01
- else
- if rp_license[id]>1 then
- rp_money[id]=rp_money[id]+1000
- rp_msg2(id,"000255000","$1000 PAYDAY!@C")
- Bankmoney[id] = Bankmoney[id] * 1.01
- else
- rp_money[id]=rp_money[id]+500
- rp_msg2(id,"000255000","500 PAYDAY!@C")
- Bankmoney[id] = Bankmoney[id] * 1.01
- end
- end
- end
- end
- updatehud(id)
- end
- end
- addhook("second","rp_second")
- 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 > Config.HoldMoney then
- rp_money[id]=rp_money[id]+(usermoney-Config.HoldMoney)
- parse("setmoney "..id.." "..Config.HoldMoney)
- updatehud(id)
- elseif usermoney == Config.HoldMoney then
- else
- if rp_money[id] > usermoney then
- rp_money[id]=rp_money[id]-(Config.HoldMoney-usermoney)
- parse("setmoney "..id.." "..Config.HoldMoney)
- 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
- addhook("walkover","rp_walkover")
- function rp_walkover(id,iid,type,ain,a,mode)
- if type==66 then
- if player(id,"money") >= Config.HoldMoney then
- rp_money[id]=rp_money[id]+100
- if Config.SilentMode==true then
- removeitem(iid)
- else
- parse ("setmoney "..id.." "..player(id,"money")-100)
- end
- updatehud(id)
- if Config.SilentMode==true then
- return 1
- end
- else
- return 0
- end
- elseif type==67 then
- if player(id,"money") >= Config.HoldMoney then
- rp_money[id]=rp_money[id]+500
- if Config.SilentMode==true then
- removeitem(iid)
- else
- parse ("setmoney "..id.." "..player(id,"money")-500)
- end
- updatehud(id)
- if Config.SilentMode==true then
- return 1
- end
- else
- return 0
- end
- elseif type==68 then
- if player(id,"money") >= Config.HoldMoney then
- rp_money[id]=rp_money[id]+1000
- if Config.SilentMode==true then
- removeitem(iid)
- else
- parse ("setmoney "..id.." "..player(id,"money")-1000)
- end
- updatehud(id)
- if Config.SilentMode==true then
- return 1
- end
- else
- return 0
- end
- elseif type==75 then
- if team_no[id]>0 then
- if havebal[id]==false then
- havebal[id]=true
- parse("equip "..id.." 75")
- parse("setweapon "..id.." 75")
- removeitem(iid)
- return 1
- end
- else
- return 1
- end
- elseif type == 61 or type == 62 then
- removeitem(iid)
- return 1
- else
- return 0
- end
- end
- addhook("die","rp_die")
- function rp_die(victim,killer,weapon,x,y)
- --rp_msg2(killer,"255255000","killer: "..killer.." victim"..victim)
- if rp_arrest[victim]==true then
- parse("spawnplayer "..victim.." "..Config.AP[1][1].." "..Config.AP[1][2])
- parse("setdeaths "..victim.." "..player(victim,"deaths")-1)
- end
- if havebal[victim]==true then
- local XTitle= math.floor(x/32)
- local YTitle= math.floor(y/32)
- parse("spawnitem 75 "..XTitle.." "..YTitle)
- havebal[victim]=false
- end
- return 1
- end
- addhook("serveraction","rp_action")
- function rp_action(id,a)
- if a == 1 then
- if drop_system_m == 1 then
- menu(id,"Drop System,$100,$500,$1000,$5000,$10000,$50000,$100000,Buy weapon")
- else
- rp_msg2(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,Football,Magic Book,Vehicle List,VIP,House")
- else
- if tele_sys == 1 then
- if rp_license[id]>0 then
- if rp_arrest[id] == true then
- rp_msg2(id,"255000000","No phone , TV , .. on jail")
- else
- if team_no[id]==0 then
- menu(id,"T Menu,Teleport,Magic Book,Magic Book Color,house,VIP,Credit card")
- else
- rp_msg2(id,"255000000","You cant use licenced now")
- end
- end
- else
- rp_msg2(id,"255000000","You must to be licenced!")
- end
- end
- end
- elseif a == 3 then
- if (rp_ct[id]==true) and (rp_Adminlevel[id]>=2) 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) * 10
- local y = player(id,"y") + math.sin(angle) * 10
- 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
- addhook("drop","rp_drop")
- 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
- rp_msg2(id,"255000000","you cant drop Magic Book!")
- 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
- rp_msg2(pl,"255000000","your license Removed!")
- rp_msg2(id,"255000000","You Remove license to "..player(pl,"name").."!")
- else
- rp_license[pl]=1
- rp_msg2(pl,"000255000",player(id,"name").." Gave you license!")
- rp_msg2(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 set_men(id)
- menu(id,"CT Menu Settings,Drop System|("..drop_system_m.."),Teleport System & Arrest|("..tele_sys.."),Mute |("..(Mute_text).."),Shake, Air Strik,Restart,No kill |("..no_kill..")")
- end
- function CreateAddonsSetting(id)
- menu(id,"Magic Book,Magic Book Color")
- end
- function FootballMenu(id)
- local Blueplayer=bluePl(id)
- local Redplayer=redPl(id)
- local TmpStr = ""
- if rp_Adminlevel[id] >= 1 then
- if rp_Adminlevel[id]>=2 then
- TmpStr=", Start Game, End Game"
- end
- end
- menu(id,"Footbal, Blue Player ("..Blueplayer.."),Red Player ("..Redplayer..")"..TmpStr)
- end
- addhook("menu","rp_menu")
- 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,Football,Magic Book,VIP,house")
- elseif sel == 9 then
- ls_2(id)
- end
- end
- if men == "CT Menu" then
- if sel == 1 then
- if rp_Adminlevel[id]>=3 then
- set_men(id)
- else
- admlevelmsg(id)
- 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
- rp_msg2(id,"255000000","Teleport System is Disabled!")
- end
- elseif sel == 3 then
- if rp_Adminlevel[id]>=2 then
- ls_1(id)
- else
- admlevelmsg(id)
- end
- elseif sel == 4 then
- rp_msg2(id,"000255000","Command: !bring <player>")
- rp_msg2(id,"000255000","Command: !goto <player>")
- rp_msg2(id,"000255000","Command: !arrest <player> <Cell>")
- rp_msg2(id,"000255000","Command: !free <player>")
- rp_msg2(id,"000255000","Command: !info <player>")
- rp_msg2(id,"000255000","Command: !money <player> <money>")
- elseif sel == 5 then
- FootballMenu(id)
- elseif sel == 6 then
- menu(id,"Magic2,Magic book,Magic book colour,back")
- elseif sel == 7 then
- menu(id,"Admin Vehicle list,BMW 2010,Porche,Nissan,BMW X5,Sedan,Next Page")
- elseif sel == 8 then
- menu(id,"VIP USER,Go to VIP House,Go to VIP Shop")
- elseif sel == 9 then
- menu(id,"this,menu is unavalibale")
- end
- end
- if men == "Magic2" then
- if sel == 1 then
- CreateAddonsMenu(id)
- elseif sel == 2 then
- CreateAddonsSetting(id)
- elseif sel == 3 then
- menu(id,"CT Menu,Settings,Teleport,License System,Commands,Football,Magic Book,Vehicle List,VIP,Buy weapon")
- end
- end
- if men == "CT Menu Settings" then
- if sel == 1 then
- if drop_system_m == 1 then
- drop_system_m = 0
- rp_msg("255000000","Drop system disabled. Called by "..player(id,"name").."@C")
- elseif drop_system_m == 0 then
- drop_system_m = 1
- rp_msg("000255000","Drop system enabled. Called by "..player(id,"name").."@C")
- end
- set_men(id)
- elseif sel == 2 then
- if tele_sys == 1 then
- tele_sys = 0
- rp_msg("255000000","Teleport system disabled. Called by "..player(id,"name").."@C")
- elseif tele_sys == 0 then
- tele_sys = 1
- rp_msg("000255000","Drop system enabled. Called by "..player(id,"name").."@C")
- end
- elseif sel == 3 then
- if Mute_text==0 then
- Mute_text = 1
- rp_msg("000255000","Mute Mode enabled by "..player(id,"name").."@C")
- else
- Mute_text = 0
- rp_msg("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('trigger bom1s')
- elseif sel == 6 then
- parse('restart 10')
- elseif sel == 7 then
- if no_kill == 0 then
- no_kill = 1
- rp_msg("000255000","No kill Mode enable by "..player(id,"name").."@C")
- else
- no_kill = 0
- rp_msg("000255000","No kill Mode disable by "..player(id,"name").."@C")
- end
- end
- end
- end
- if men == "Magic Book Menu" then
- if sel>0 then
- SelAddonsMenu(id,sel)
- end
- end
- if men == "Buy Magic Book" 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
- rp_msg2(id,"000255000","You have "..Addons[sel].FName.." Magic Book now!")
- else
- nmn(id)
- end
- else
- rp_msg2(id,"255000000","You have "..Addons[sel].FName.." Magic Book already!")
- end
- end
- end
- if men == "bank" then
- if sel == 1 then
- rp_msg2(id,"000255000","You have "..Bankmoney[id].."money")
- elseif sel == 2 then
- rp_msg2(id,"000255000","Say the amount")
- depos[id] = 1
- elseif sel == 3 then
- rp_msg2(id,"000255000","Say the amount")
- withd[id] = 1
- elseif sel == 4 then
- menu(id,"Card,buy credit card |1000$,About the credit card")
- elseif sel == 5 then
- rp_msg2(id,"000255000","Bank system created by IF.")
- rp_msg2(id,"000255000","Inspired by Trauma Tizer.")
- rp_msg2(id,"000255000","Your money in bank increases by 0.1% every minute.")
- rp_msg2(id,"000255000","Bank robbing in now history.")
- rp_msg2(id,"000255000","Thanks you for reading this.")
- end
- end
- if men == "Card" then
- if sel == 1 then
- if h_card[id] < 1 then
- if rp_money[id]>= 1000 then
- h_card[id]=1
- rp_money[id]=rp_money[id]- 1000
- rp_msg2(id,"000255000","You have credit card now!")
- updatehud(id)
- else
- rp_msg2(id,"255000000","Not enough money.")
- end
- else
- rp_msg2(id,"255000000","You have a card already.")
- end
- elseif sel == 2 then
- rp_msg2(id,"000255000","Buy a credit card for 1000$.")
- rp_msg2(id,"000255000","You can give others money anywhere you like.")
- rp_msg2(id,"000255000","Totally secure.")
- rp_msg2(id,"000255000","This puts money in your bank into their bank.")
- end
- end
- if men == "Bridge" then
- if sel == 1 then
- if rp_license[id]>=2 then
- parse("setpos "..id.." "..Config.bridge[1].." "..Config.bridge[2])
- else rp_msg2(id,"255000000","Buy ticket first.")
- end
- elseif sel == 2 then
- if rp_license[id]==1 then
- if rp_money[id]>= 30000 then
- rp_license[id]=2
- rp_money[id]=rp_money[id]-30000
- rp_msg2(id,"000255000","You have ticket now!")
- updatehud(id)
- else rp_msg2(id,"255000000","Not enough money.")
- end
- else rp_msg2(id,"255000000","Buy license first.")
- end
- end
- end
- if men == "Bridge2" then
- if sel == 1 then
- if rp_license[id]>=2 then
- parse("setpos "..id.." "..Config.bridge2[1].." "..Config.bridge2[2])
- else rp_msg2(id,[[255000000]],[[Buy ticket first.]])
- end
- elseif sel == 2 then
- if rp_license[id]==1 then
- if rp_money[id]>= 30000 then
- rp_license[id]=2
- rp_money[id]=rp_money[id]-30000
- rp_msg2(id,"000255000","You have ticket now!")
- updatehud(id)
- else rp_msg2(id,[[255000000]],[[Not enough money.]])
- end
- else rp_msg2(id,[[255000000]],[[Buy license first.]])
- end
- end
- end
- if men == "Heal" then
- if sel == 1 then
- if rp_money[id]>= 1000 then
- rp_money[id]=rp_money[id]-1000
- updatehud(id)
- parse("setpos "..id.." "..Config.heal[1].." "..Config.heal[2])
- rp_msg2(id,[[255000000]],[[Vicar:Enjoy your stay.]])
- else rp_msg2(id,[[255000000]],[[You don't have enough money.]])
- end
- end
- end
- if men == "Movie" then
- if sel == 1 then
- if rp_money[id]>= 100 then
- rp_money[id]=rp_money[id]-100
- updatehud(id)
- parse("setpos "..id.." "..Config.movie1[1].." "..Config.movie1[2])
- rp_msg2(id,[[255000000]],[[Good day.]])
- else rp_msg2(id,[[255000000]],[[You don't have enough money.]])
- end
- elseif sel == 2 then
- if rp_money[id]>= 100 then
- rp_money[id]=rp_money[id]-100
- updatehud(id)
- parse("setpos "..id.." "..Config.movie2[1].." "..Config.movie2[2])
- rp_msg2(id,[[255000000]],[[Good day.]])
- else rp_msg2(id,[[255000000]],[[You don't have enough money.]])
- end
- end
- end
- if men == "Magic Book" then
- if sel == 1 then
- CreateAddonsColor(id)
- end
- end
- if men == "Magic Book Color" then
- if sel>0 then
- selAddonsColor(id,sel)
- end
- end
- if men == "Footbal" then
- if (team_no[id]==0) or (rp_ct[id]==true) then
- SelFootballMenu(id,sel)
- else
- rp_msg2(id,"255000000","You cant choose team again")
- end
- end
- if men == "Admin Vehicle list" then
- if sel == 1 then
- if pl_have_vehicle1[id]==0 then
- vehicle1_img_pos[id]=image([[gfx/[TB] Project Reality Roleplay/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
- 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
- end
- if sel == 2 then
- if pl_have_vehicle2[id]==0 then
- vehicle2_img_pos[id]=image([[gfx/[TB] Project Reality Roleplay/Vehicles/porche.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
- end
- if sel == 3 then
- if pl_have_vehicle3[id]==0 then
- vehicle3_img_pos[id]=image([[gfx/[TB] Project Reality Roleplay/Vehicles/Nissan.png]],1,1,1)
- imagepos(vehicle3_img_pos[id],player(id,[[x]]),player(id,[[y]]),player(id,[[rot]]))
- vehicle3_tx[id]=player(id,[[tilex]])
- vehicle3_ty[id]=player(id,[[tiley]])
- vehicle3_x[id]=player(id,[[x]])
- vehicle3_y[id]=player(id,[[y]])
- pl_have_vehicle3[id]=1
- elseif pl_have_vehicle3[id]==1 then
- if vehicle3_pic[id]>0 then
- parse([[customkill ]]..id..[[ Eject ]]..id)
- parse([[explosion ]]..vehicle3_x[id]..[[ ]]..vehicle3_y[id]..[[ 100 200 ]]..id)
- vehicle3_tx[id]=0
- vehicle3_ty[id]=0
- vehicle3_x[id]=0
- vehicle3_y[id]=0
- freeimage(vehicle3_img[id])
- else
- parse([[explosion ]]..vehicle3_x[id]..[[ ]]..vehicle3_y[id]..[[ 100 200 ]]..id)
- vehicle3_tx[id]=0
- vehicle3_ty[id]=0
- vehicle3_x[id]=0
- vehicle3_y[id]=0
- freeimage(vehicle3_img_pos[id])
- end
- pl_have_vehicle3[id]=0
- end
- end
- if sel == 4 then
- if pl_have_vehicle4[id]==0 then
- vehicle4_img_pos[id]=image([[gfx/[TB] Project Reality Roleplay/Vehicles/Bmw-X5.png]],1,1,1)
- imagepos(vehicle4_img_pos[id],player(id,[[x]]),player(id,[[y]]),player(id,[[rot]]))
- vehicle4_tx[id]=player(id,[[tilex]])
- vehicle4_ty[id]=player(id,[[tiley]])
- vehicle4_x[id]=player(id,[[x]])
- vehicle4_y[id]=player(id,[[y]])
- pl_have_vehicle4[id]=1
- elseif pl_have_vehicle4[id]==1 then
- if vehicle4_pic[id]>0 then
- parse([[customkill ]]..id..[[ Eject ]]..id)
- parse([[explosion ]]..vehicle4_x[id]..[[ ]]..vehicle4_y[id]..[[ 100 200 ]]..id)
- vehicle4_tx[id]=0
- vehicle4_ty[id]=0
- vehicle4_x[id]=0
- vehicle4_y[id]=0
- freeimage(vehicle4_img[id])
- else
- parse([[explosion ]]..vehicle4_x[id]..[[ ]]..vehicle4_y[id]..[[ 100 200 ]]..id)
- vehicle4_tx[id]=0
- vehicle4_ty[id]=0
- vehicle4_x[id]=0
- vehicle4_y[id]=0
- freeimage(vehicle4_img_pos[id])
- end
- pl_have_vehicle4[id]=0
- end
- end
- if sel == 5 then
- if pl_have_vehicle5[id]==0 then
- vehicle5_img_pos[id]=image([[gfx/[TB] Project Reality Roleplay/Vehicles/Sedan.png]],1,1,1)
- imagepos(vehicle5_img_pos[id],player(id,[[x]]),player(id,[[y]]),player(id,[[rot]]))
- vehicle5_tx[id]=player(id,[[tilex]])
- vehicle5_ty[id]=player(id,[[tiley]])
- vehicle5_x[id]=player(id,[[x]])
- vehicle5_y[id]=player(id,[[y]])
- pl_have_vehicle5[id]=1
- elseif pl_have_vehicle5[id]==1 then
- if vehicle5_pic[id]>0 then
- parse([[customkill ]]..id..[[ Eject ]]..id)
- parse([[explosion ]]..vehicle5_x[id]..[[ ]]..vehicle5_y[id]..[[ 100 200 ]]..id)
- vehicle5_tx[id]=0
- vehicle5_ty[id]=0
- vehicle5_x[id]=0
- vehicle5_y[id]=0
- freeimage(vehicle5_img[id])
- else
- parse([[explosion ]]..vehicle5_x[id]..[[ ]]..vehicle5_y[id]..[[ 100 200 ]]..id)
- vehicle5_tx[id]=0
- vehicle5_ty[id]=0
- vehicle5_x[id]=0
- vehicle5_y[id]=0
- freeimage(vehicle5_img_pos[id])
- end
- pl_have_vehicle5[id]=0
- end
- end
- if sel == 6 then
- menu(id,[[Next Page,Convertible,Hummer,Infinity,Fast Bike,Renault,Toyota,Mercedes CLK,Back]])
- end
- end
- if men == "Next Page" then
- if sel == 1 then
- if pl_have_vehicle6[id]==0 then
- vehicle6_img_pos[id]=image([[gfx/[TB] Project Reality Roleplay/Vehicles/convertible.png]],1,1,1)
- imagepos(vehicle6_img_pos[id],player(id,[[x]]),player(id,[[y]]),player(id,[[rot]]))
- vehicle6_tx[id]=player(id,[[tilex]])
- vehicle6_ty[id]=player(id,[[tiley]])
- vehicle6_x[id]=player(id,[[x]])
- vehicle6_y[id]=player(id,[[y]])
- pl_have_vehicle6[id]=1
- elseif pl_have_vehicle6[id]==1 then
- if vehicle6_pic[id]>0 then
- parse([[customkill ]]..id..[[ Eject ]]..id)
- parse([[explosion ]]..vehicle6_x[id]..[[ ]]..vehicle6_y[id]..[[ 100 200 ]]..id)
- vehicle6_tx[id]=0
- vehicle6_ty[id]=0
- vehicle6_x[id]=0
- vehicle6_y[id]=0
- freeimage(vehicle6_img[id])
- else
- parse([[explosion ]]..vehicle6_x[id]..[[ ]]..vehicle6_y[id]..[[ 100 200 ]]..id)
- vehicle6_tx[id]=0
- vehicle6_ty[id]=0
- vehicle6_x[id]=0
- vehicle6_y[id]=0
- freeimage(vehicle6_img_pos[id])
- end
- pl_have_vehicle6[id]=0
- end
- end
- if sel == 2 then
- if pl_have_vehicle7[id]==0 then
- vehicle7_img_pos[id]=image([[gfx/[TB] Project Reality Roleplay/Vehicles/hummer.png]],1,1,1)
- imagepos(vehicle7_img_pos[id],player(id,[[x]]),player(id,[[y]]),player(id,[[rot]]))
- vehicle7_tx[id]=player(id,[[tilex]])
- vehicle7_ty[id]=player(id,[[tiley]])
- vehicle7_x[id]=player(id,[[x]])
- vehicle7_y[id]=player(id,[[y]])
- pl_have_vehicle7[id]=1
- elseif pl_have_vehicle7[id]==1 then
- if vehicle7_pic[id]>0 then
- parse([[customkill ]]..id..[[ Eject ]]..id)
- parse([[explosion ]]..vehicle7_x[id]..[[ ]]..vehicle7_y[id]..[[ 100 200 ]]..id)
- vehicle7_tx[id]=0
- vehicle7_ty[id]=0
- vehicle7_x[id]=0
- vehicle7_y[id]=0
- freeimage(vehicle7_img[id])
- else
- parse([[explosion ]]..vehicle7_x[id]..[[ ]]..vehicle7_y[id]..[[ 100 200 ]]..id)
- vehicle7_tx[id]=0
- vehicle7_ty[id]=0
- vehicle7_x[id]=0
- vehicle7_y[id]=0
- freeimage(vehicle7_img_pos[id])
- end
- pl_have_vehicle7[id]=0
- end
- end
- if sel == 3 then
- if pl_have_vehicle8[id]==0 then
- vehicle8_img_pos[id]=image([[gfx/[TB] Project Reality Roleplay/Vehicles/infinity.png]],1,1,1)
- imagepos(vehicle8_img_pos[id],player(id,[[x]]),player(id,[[y]]),player(id,[[rot]]))
- vehicle8_tx[id]=player(id,[[tilex]])
- vehicle8_ty[id]=player(id,[[tiley]])
- vehicle8_x[id]=player(id,[[x]])
- vehicle8_y[id]=player(id,[[y]])
- pl_have_vehicle8[id]=1
- elseif pl_have_vehicle8[id]==1 then
- if vehicle8_pic[id]>0 then
- parse([[customkill ]]..id..[[ Eject ]]..id)
- parse([[explosion ]]..vehicle8_x[id]..[[ ]]..vehicle8_y[id]..[[ 100 200 ]]..id)
- vehicle8_tx[id]=0
- vehicle8_ty[id]=0
- vehicle8_x[id]=0
- vehicle8_y[id]=0
- freeimage(vehicle8_img[id])
- else
- parse([[explosion ]]..vehicle8_x[id]..[[ ]]..vehicle8_y[id]..[[ 100 200 ]]..id)
- vehicle8_tx[id]=0
- vehicle8_ty[id]=0
- vehicle8_x[id]=0
- vehicle8_y[id]=0
- freeimage(vehicle8_img_pos[id])
- end
- pl_have_vehicle8[id]=0
- end
- end
- if sel == 4 then
- if pl_have_vehicle9[id]==0 then
- vehicle9_img_pos[id]=image([[gfx/[TB] Project Reality Roleplay/Vehicles/Bike.png]],1,1,1)
- imagepos(vehicle9_img_pos[id],player(id,[[x]]),player(id,[[y]]),player(id,[[rot]]))
- vehicle9_tx[id]=player(id,[[tilex]])
- vehicle9_ty[id]=player(id,[[tiley]])
- vehicle9_x[id]=player(id,[[x]])
- vehicle9_y[id]=player(id,[[y]])
- pl_have_vehicle9[id]=1
- elseif pl_have_vehicle9[id]==1 then
- if vehicle9_pic[id]>0 then
- parse([[customkill ]]..id..[[ Eject ]]..id)
- parse([[explosion ]]..vehicle9_x[id]..[[ ]]..vehicle9_y[id]..[[ 100 200 ]]..id)
- vehicle9_tx[id]=0
- vehicle9_ty[id]=0
- vehicle9_x[id]=0
- vehicle9_y[id]=0
- freeimage(vehicle9_img[id])
- else
- parse([[explosion ]]..vehicle9_x[id]..[[ ]]..vehicle9_y[id]..[[ 100 200 ]]..id)
- vehicle9_tx[id]=0
- vehicle9_ty[id]=0
- vehicle9_x[id]=0
- vehicle9_y[id]=0
- freeimage(vehicle9_img_pos[id])
- end
- pl_have_vehicle9[id]=0
- end
- end
- if sel == 5 then
- if pl_have_vehicle10[id]==0 then
- vehicle10_img_pos[id]=image([[gfx/[TB] Project Reality Roleplay/Vehicles/renault.png]],1,1,1)
- imagepos(vehicle10_img_pos[id],player(id,[[x]]),player(id,[[y]]),player(id,[[rot]]))
- vehicle10_tx[id]=player(id,[[tilex]])
- vehicle10_ty[id]=player(id,[[tiley]])
- vehicle10_x[id]=player(id,[[x]])
- vehicle10_y[id]=player(id,[[y]])
- pl_have_vehicle10[id]=1
- elseif pl_have_vehicle10[id]==1 then
- if vehicle10_pic[id]>0 then
- parse([[customkill ]]..id..[[ Eject ]]..id)
- parse([[explosion ]]..vehicle10_x[id]..[[ ]]..vehicle10_y[id]..[[ 100 200 ]]..id)
- vehicle10_tx[id]=0
- vehicle10_ty[id]=0
- vehicle10_x[id]=0
- vehicle10_y[id]=0
- freeimage(vehicle10_img[id])
- else
- parse([[explosion ]]..vehicle10_x[id]..[[ ]]..vehicle10_y[id]..[[ 100 200 ]]..id)
- vehicle10_tx[id]=0
- vehicle10_ty[id]=0
- vehicle10_x[id]=0
- vehicle10_y[id]=0
- freeimage(vehicle10_img_pos[id])
- end
- pl_have_vehicle10[id]=0
- end
- end
- if sel == 6 then
- if pl_have_vehicle11[id]==0 then
- vehicle11_img_pos[id]=image([[gfx/[TB] Project Reality Roleplay/Vehicles/toyota.png]],1,1,1)
- imagepos(vehicle11_img_pos[id],player(id,[[x]]),player(id,[[y]]),player(id,[[rot]]))
- vehicle11_tx[id]=player(id,[[tilex]])
- vehicle11_ty[id]=player(id,[[tiley]])
- vehicle11_x[id]=player(id,[[x]])
- vehicle11_y[id]=player(id,[[y]])
- pl_have_vehicle11[id]=1
- elseif pl_have_vehicle11[id]==1 then
- if vehicle11_pic[id]>0 then
- parse([[customkill ]]..id..[[ Eject ]]..id)
- parse([[explosion ]]..vehicle11_x[id]..[[ ]]..vehicle11_y[id]..[[ 100 200 ]]..id)
- vehicle11_tx[id]=0
- vehicle11_ty[id]=0
- vehicle11_x[id]=0
- vehicle11_y[id]=0
- freeimage(vehicle11_img[id])
- else
- parse([[explosion ]]..vehicle11_x[id]..[[ ]]..vehicle11_y[id]..[[ 100 200 ]]..id)
- vehicle11_tx[id]=0
- vehicle11_ty[id]=0
- vehicle11_x[id]=0
- vehicle11_y[id]=0
- freeimage(vehicle11_img_pos[id])
- end
- pl_have_vehicle11[id]=0
- end
- end
- if sel == 7 then
- if pl_have_vehicle12[id]==0 then
- vehicle12_img_pos[id]=image([[gfx/[TB] Project Reality Roleplay/Vehicles/mercedes.png]],1,1,1)
- imagepos(vehicle12_img_pos[id],player(id,[[x]]),player(id,[[y]]),player(id,[[rot]]))
- vehicle12_tx[id]=player(id,[[tilex]])
- vehicle12_ty[id]=player(id,[[tiley]])
- vehicle12_x[id]=player(id,[[x]])
- vehicle12_y[id]=player(id,[[y]])
- pl_have_vehicle12[id]=1
- elseif pl_have_vehicle12[id]==1 then
- if vehicle12_pic[id]>0 then
- parse([[customkill ]]..id..[[ Eject ]]..id)
- parse([[explosion ]]..vehicle12_x[id]..[[ ]]..vehicle12_y[id]..[[ 100 200 ]]..id)
- vehicle12_tx[id]=0
- vehicle12_ty[id]=0
- vehicle12_x[id]=0
- vehicle12_y[id]=0
- freeimage(vehicle12_img[id])
- else
- parse([[explosion ]]..vehicle12_x[id]..[[ ]]..vehicle12_y[id]..[[ 100 200 ]]..id)
- vehicle12_tx[id]=0
- vehicle12_ty[id]=0
- vehicle12_x[id]=0
- vehicle12_y[id]=0
- freeimage(vehicle12_img_pos[id])
- end
- pl_have_vehicle12[id]=0
- end
- end
- if sel == 8 then
- menu(id,[[Admin Vehicle list,BMW 2010,Porche,Nissan,BMW X5,Sedan,Other Vehicles]])
- 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
- rp_msg2(id,"255000000","You must to be licenced!")
- end
- else
- rp_msg2(id,"255000000","Teleport System is Disabled!")
- end
- elseif sel == 2 then
- CreateAddonsMenu(id)
- elseif sel == 3 then
- CreateAddonsSetting(id)
- elseif sel == 4 then
- menu(id,"House Menu,Go to house,Toggle door,Explode,Remove visitors ,back")
- elseif sel == 5 then
- if rp_license[id]>1 then
- menu(id,"VIP USER,Go to VIP House,Goto Vip Shop,Vip Message,Laser|50k")
- else
- rp_msg2(id,"255000000","You are not VIP user")
- end
- elseif sel == 6 then
- if h_card [id] == 1 then
- menu(id,"Credit,My money |"..h_card[id]..",Command")
- else
- rp_msg2(id,"255000000","You don't have credit card")
- end
- end
- end
- if men == "Credit" then
- if sel == 1 then
- rp_msg2(id,"255000000","You have "..Bankmoney.."$")
- elseif sel == 2 then
- rp_msg2(id,"255000000","$give <id> <amount>")
- end
- end
- if men == "VIP USER" then
- if rp_license[id]>2 then
- if sel == 1 then
- parse("setpos "..id.." "..Config.VIPHOUSE[1].." "..Config.VIPHOUSE[2])
- elseif sel == 2 then
- parse("setpos "..id.." "..Config.VIPSHOP[1].." "..Config.VIPSHOP[2])
- elseif sel == 3 then
- rp_msg2(id,"000255000","Type your message")
- rp_vipmsg[id]=1
- elseif sel == 4 then
- if rp_money[id]>= 50000 then
- parse("equip "..id.." "..45)
- rp_money[id]=rp_money[id]-50000
- updatehud(id)
- rp_msg2(id,"255000000","You have laser now")
- else
- nmn(id)
- end
- end
- end
- end
- --CT Menu,Settings,Teleport,License System,Commands,Football,Magic Book,Vehicle List,VIP,House--
- if men == "House Menu" then
- if sel == 1 then
- if house1[id]==2 then
- parse("setpos "..id.." "..Config.housep1[1].." "..Config.housep1[2])
- elseif house2[id]==2 then
- parse("setpos "..id.." "..Config.housep2[1].." "..Config.housep2[2])
- elseif house3[id]==2 then
- parse("setpos "..id.." "..Config.housep3[1].." "..Config.housep3[2])
- elseif house4[id]==2 then
- parse("setpos "..id.." "..Config.housep4[1].." "..Config.housep4[2])
- elseif house5[id]==2 then
- parse("setpos "..id.." "..Config.housep5[1].." "..Config.housep5[2])
- elseif house6[id]==2 then
- parse("setpos "..id.." "..Config.housep6[1].." "..Config.housep6[2])
- elseif house7[id]==2 then
- parse("setpos "..id.." "..Config.housep7[1].." "..Config.housep7[2])
- elseif house8[id]==2 then
- parse("setpos "..id.." "..Config.housep8[1].." "..Config.housep8[2])
- elseif house9[id]==2 then
- parse("setpos "..id.." "..Config.housep9[1].." "..Config.housep9[2])
- elseif house10[id]==2 then
- parse("setpos "..id.." "..Config.housep10[1].." "..Config.housep10[2])
- else rp_msg2(id,"255000000","Buy a house.")
- end
- elseif sel == 2 then
- if house1[id]==2 then
- parse("trigger house1")
- elseif house2[id]==2 then
- parse("trigger house2")
- elseif house3[id]==2 then
- parse("trigger house3")
- elseif house4[id]==2 then
- parse("trigger house4")
- elseif house5[id]==2 then
- parse("trigger house5")
- elseif house6[id]==2 then
- parse("trigger house6")
- elseif house7[id]==2 then
- parse("trigger house7")
- elseif house8[id]==2 then
- parse("trigger house8")
- elseif house9[id]==2 then
- parse("trigger house9")
- elseif house10[id]==2 then
- parse("trigger house10")
- else
- rp_msg2(id,"255000000","Buy a house.")
- end
- elseif sel == 3 then
- if house1[id]==2 then
- parse("trigger housea1")
- elseif house2[id]==2 then
- parse("trigger housea2")
- elseif house3[id]==2 then
- parse("trigger housea3")
- elseif house4[id]==2 then
- parse("trigger housea4")
- elseif house5[id]==2 then
- parse("trigger housea5")
- elseif house6[id]==2 then
- parse("trigger housea6")
- elseif house7[id]==2 then
- parse("trigger housea7")
- elseif house8[id]==2 then
- parse("trigger housea8")
- elseif house9[id]==2 then
- parse("trigger housea9")
- elseif house10[id]==2 then
- parse("trigger housea10")
- else rp_msg2(id,"255000000","Buy a house.")
- end
- elseif sel == 4 then
- if house1[id]==2 then
- for id = 1,32 do
- if player(id,"exists") and house1[id]<=1 then
- if checkbound(id,Config.houseex1) then
- parse("setpos "..id.." "..Config.FP[1].." "..Config.FP[2])
- rp_msg2(id,"255000000","You have been removed.")
- elseif checkbound(id,Config.houseex1a) then
- parse("setpos "..id.." "..Config.FP[1].." "..Config.FP[2])
- rp_msg2(id,"255000000","You have been removed.")
- end
- end
- end
- elseif house2[id]==2 then
- for id = 1,32 do
- if player(id,"exists") and house2[id]<=1 then
- if checkbound(id,Config.houseex2) then
- parse("setpos "..id.." "..Config.FP[1].." "..Config.FP[2])
- rp_msg2(id,"255000000","You have been removed.")
- elseif checkbound(id,Config.houseex2a) then
- parse("setpos "..id.." "..Config.FP[1].." "..Config.FP[2])
- rp_msg2(id,"255000000","You have been removed.")
- end
- end
- end
- elseif house3[id]==2 then
- for id = 1,32 do
- if player(id,"exists") and house3[id]<=1 then
- if checkbound(id,Config.houseex3) then
- parse("setpos "..id.." "..Config.FP[1].." "..Config.FP[2])
- rp_msg2(id,"255000000","You have been removed.")
- elseif checkbound(id,Config.houseex3a) then
- parse("setpos "..id.." "..Config.FP[1].." "..Config.FP[2])
- rp_msg2(id,"255000000","You have been removed.")
- end
- end
- end
- elseif house4[id]==2 then
- for id = 1,32 do
- if player(id,"exists") and house4[id]<=1 then
- if checkbound(id,Config.houseex4) then
- parse("setpos "..id.." "..Config.FP[1].." "..Config.FP[2])
- rp_msg2(id,"255000000","You have been removed.")
- elseif checkbound(id,Config.houseex4a) then
- parse("setpos "..id.." "..Config.FP[1].." "..Config.FP[2])
- rp_msg2(id,"255000000","You have been removed.")
- end
- end
- end
- elseif house5[id]==2 then
- for id = 1,32 do
- if player(id,"exists") and house5[id]<=1 then
- if checkbound(id,Config.houseex5) then
- parse("setpos "..id.." "..Config.FP[1].." "..Config.FP[2])
- rp_msg2(id,"255000000","You have been removed.")
- elseif checkbound(id,Config.houseex5a) then
- parse("setpos "..id.." "..Config.FP[1].." "..Config.FP[2])
- rp_msg2(id,"255000000","You have been removed.")
- end
- end
- end
- elseif house6[id]==2 then
- for id = 1,32 do
- if player(id,"exists") and house6[id]<=1 then
- if checkbound(id,Config.houseex6) then
- parse("setpos "..id.." "..Config.FP[1].." "..Config.FP[2])
- rp_msg2(id,"255000000","You have been removed.")
- end
- end
- end
- elseif house7[id]==2 then
- for id = 1,32 do
- if player(id,"exists") and house7[id]<=1 then
- if checkbound(id,Config.houseex7) then
- parse("setpos "..id.." "..Config.FP[1].." "..Config.FP[2])
- rp_msg2(id,"255000000","You have been removed.")
- end
- end
- end
- elseif house8[id]==2 then
- for id = 1,32 do
- if player(id,"exists") and house8[id] <=1 then
- if checkbound(id,Config.houseex8) then
- parse("setpos "..id.." "..Config.FP[1].." "..Config.FP[2])
- rp_msg2(id,"255000000","You have been removed.")
- end
- end
- end
- elseif house9[id]==2 then
- for id = 1,32 do
- if player(id,"exists") and house9[id]<=1 then
- if checkbound(id,Config.houseex9) then
- parse("setpos "..id.." "..Config.FP[1].." "..Config.FP[2])
- rp_msg2(id,"255000000","You have been removed.")
- end
- end
- end
- elseif house10[id]==2 then
- for id = 1,32 do
- if player(id,"exists") and house10[id]<=1 then
- if checkbound(id,Config.houseex10) then
- parse("setpos "..id.." "..Config.FP[1].." "..Config.FP[2])
- rp_msg2(id,"255000000","You have been removed.")
- end
- end
- end
- else rp_msg2(id,"255000000","Buy a house.")
- end
- end
- end
- if men == "Buy House" then
- if sel == 1 then
- if rp_money[id]>= 1000 then
- if havehouse1==0 then
- if havehouse[id] == 0 then
- for id = 1,32 do
- if player(id,"exists") then
- house1[id]=1
- end
- end
- rp_money[id]=rp_money[id]-1000
- rp_msg2(id,"255000000","You have this house now")
- house1[id]=2
- updatehud(id)
- havehouse[id]=1
- havehouse1=1
- house1owner = (player(id,"name"))
- else
- rp_msg2(id,"255000000","You have a house already.")
- end
- else
- rp_msg2(id,"255000000","Others own this house.")
- end
- end
- elseif sel == 2 then
- if rp_money[id]>= 1000 then
- if havehouse2==0 then
- if havehouse[id] == 0 then
- for id = 1,32 do
- if player(id,"exists") then
- house2[id]=1
- end
- end
- rp_money[id]=rp_money[id]-1000
- rp_msg2(id,"255000000","You have this house now")
- house2[id]=2
- updatehud(id)
- havehouse[id]=1
- havehouse2=1
- house2owner = (player(id,"name"))
- else
- rp_msg2(id,"255000000","You have a house already.")
- end
- else
- rp_msg2(id,"255000000","Others own this house.")
- end
- end
- elseif sel == 3 then
- if rp_money[id]>= 1000 then
- if havehouse3==0 then
- if havehouse[id] == 0 then
- for id = 1,32 do
- if player(id,"exists") then
- house3[id]=1
- end
- end
- rp_money[id]=rp_money[id]-1000
- rp_msg2(id,"255000000","You have this house now")
- house3[id]=2
- updatehud(id)
- havehouse[id]=1
- havehouse3=1
- house3owner = (player(id,"name"))
- else
- rp_msg2(id,"255000000","You have a house already.")
- end
- else
- rp_msg2(id,"255000000","Others own this house.")
- end
- end
- elseif sel == 4 then
- if rp_money[id]>= 1000 then
- if havehouse4==0 then
- if havehouse[id] == 0 then
- for id = 1,32 do
- if player(id,"exists") then
- house4[id]=1
- end
- end
- rp_money[id]=rp_money[id]-1000
- rp_msg2(id,"255000000","You have this house now")
- house4[id]=2
- updatehud(id)
- havehouse[id]=1
- havehouse4=1
- house4owner = (player(id,"name"))
- else
- rp_msg2(id,"255000000","You have a house already.")
- end
- else
- rp_msg2(id,"255000000","Others own this house.")
- end
- end
- elseif sel == 5 then
- if rp_money[id]>= 1000 then
- if havehouse5==1 then
- if havehouse[id] ==0 then
- for id = 1,32 do
- if player(id,"exists") then
- house5[id]=1
- end
- end
- rp_money[id]=rp_money[id]-1000
- rp_msg2(id,"255000000","You have this house now")
- house5[id]=2
- updatehud(id)
- havehouse[id]=1
- havehouse5=1
- house5owner = (player(id,"name"))
- else
- rp_msg2(id,"255000000","You have a house already.")
- end
- else
- rp_msg2(id,"255000000","Others own this house.")
- end
- end
- end
- end
- if men == "Buy House2" then
- if sel == 1 then
- if rp_money[id]>= 1000 then
- if havehouse6==0 then
- if havehouse[id] == 0 then
- for id = 1,32 do
- if player(id,"exists") then
- house6[id]=1
- end
- end
- rp_money[id]=rp_money[id]-1000
- rp_msg2(id,"255000000","You have this house now")
- house6[id]=2
- updatehud(id)
- havehouse[id]=1
- havehouse6=1
- house6owner = (player(id,"name"))
- else
- rp_msg2(id,"255000000","You have a house already.")
- end
- else
- rp_msg2(id,"255000000","Others own this house.")
- end
- end
- elseif sel == 2 then
- if rp_money[id]>= 1000 then
- if havehouse7==0 then
- if havehouse[id] == 0 then
- for id = 1,32 do
- if player(id,"exists") then
- house7[id]=1
- end
- end
- rp_money[id]=rp_money[id]-1000
- rp_msg2(id,"255000000","You have this house now")
- house7[id]=2
- updatehud(id)
- havehouse[id]=1
- havehouse7=1
- house7owner = (player(id,"name"))
- else
- rp_msg2(id,"255000000","You have a house already.")
- end
- else
- rp_msg2(id,"255000000","Others own this house.")
- end
- end
- elseif sel == 3 then
- if rp_money[id]>= 1000 then
- if havehouse8==0 then
- if havehouse[id] == 0 then
- for id = 1,32 do
- if player(id,"exists") then
- house8[id]=1
- end
- end
- rp_money[id]=rp_money[id]-1000
- rp_msg2(id,"255000000","You have this house now")
- house8[id]=2
- updatehud(id)
- havehouse[id]=1
- havehouse8=1
- house8owner = (player(id,"name"))
- else
- rp_msg2(id,"255000000","You have a house already.")
- end
- else
- rp_msg2(id,"255000000","Others own this house.")
- end
- end
- elseif sel == 4 then
- if rp_money[id]>= 1000 then
- if havehouse9==0 then
- if havehouse[id] == 0 then
- for id = 1,32 do
- if player(id,"exists") then
- house9[id]=1
- end
- end
- rp_money[id]=rp_money[id]-1000
- rp_msg2(id,"255000000","You have this house now")
- house9[id]=2
- updatehud(id)
- havehouse[id]=1
- havehouse9=1
- house9owner = (player(id,"name"))
- else
- rp_msg2(id,"255000000","You have a house already.")
- end
- else
- rp_msg2(id,"255000000","Others own this house.")
- end
- end
- elseif sel == 5 then
- if rp_money[id]>= 1000 then
- if havehouse10==1 then
- if havehouse[id] ==0 then
- for id = 1,32 do
- if player(id,"exists") then
- house10[id]=1
- end
- end
- rp_money[id]=rp_money[id]-1000
- rp_msg2(id,"255000000","You have this house now")
- house10[id]=2
- updatehud(id)
- havehouse[id]=1
- havehouse10=1
- house10owner = (player(id,"name"))
- else
- rp_msg2(id,"255000000","You have a house already.")
- end
- else
- rp_msg2(id,"255000000","Others own this house.")
- end
- end
- 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
- rp_msg2(id,"255000000","Not 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
- rp_msg2(id,"255000000","You cant set position here!")
- break
- end
- end
- if SafeTele == true then
- rp_msg2(id,"000255000","Position stored succesfully!")
- rp_msg2(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
- rp_msg2(id,"255000000","No phone , No TV , .. on jail")
- else
- if tsb[id]==0 then
- rp_msg2(id,"000255000","You will now spawn at Teleport position!@C")
- tsb[id]=1
- elseif tsb[id]==1 then
- rp_msg2(id,"000255000","You will now spawn normally!@C")
- tsb[id]=0
- end
- end
- else
- rp_msg2(id,"255000000","Not position stored!@C")
- end
- end
- end
- if men == "Horses" then
- if sel == 1 then
- if havehorse[id]==0 then
- if pl_have_horse1[id]==0 then
- if rp_money[id]>= 10000 then
- rp_money[id]=rp_money[id]-10000
- updatehud(id)
- rp_msg2(id,"255000000","You have a horse now")
- horse1_img_pos[id]=image([[gfx/[TB] Project Reality Roleplay/Magic/horse.png]],1,1,1)
- imagepos(horse1_img_pos[id],player(id,[[x]]),player(id,[[y]]),player(id,[[rot]]))
- imagepos(horse1_img_pos[id],player(id,[[x]]),player(id,[[y]]),player(id,[[rot]]))
- horse1_tx[id]=player(id,[[tilex]])
- horse1_ty[id]=player(id,[[tiley]])
- horse1_x[id]=player(id,[[x]])
- horse1_y[id]=player(id,[[y]])
- pl_have_horse1[id]=1
- havehorse[id] = 1
- else rp_msg2(id,"255000000","Not enough money")
- end
- end
- else
- rp_msg2(id,"255000000","You have a horse already")
- end
- elseif sel == 2 then
- if havehorse[id]==0 then
- if pl_have_horse2[id]==0 then
- if rp_money[id]>= 10000 then
- rp_money[id]=rp_money[id]-10000
- updatehud(id)
- rp_msg2(id,"255000000","You have a horse now")
- horse2_img_pos[id]=image([[gfx/[TB] Project Reality Roleplay/Magic/horse orange.png]],1,1,1)
- imagepos(horse2_img_pos[id],player(id,[[x]]),player(id,[[y]]),player(id,[[rot]]))
- imagepos(horse2_img_pos[id],player(id,[[x]]),player(id,[[y]]),player(id,[[rot]]))
- horse2_tx[id]=player(id,[[tilex]])
- horse2_ty[id]=player(id,[[tiley]])
- horse2_x[id]=player(id,[[x]])
- horse2_y[id]=player(id,[[y]])
- pl_have_horse2[id]=1
- havehorse[id]=1
- else rp_msg2(id,"255000000","Not enough money")
- end
- end
- else
- rp_msg2(id,"255000000","You have a horse already")
- end
- elseif sel == 3 then
- if havehorse[id]==0 then
- if pl_have_horse3[id]==0 then
- if rp_money[id]>= 10000 then
- rp_money[id]=rp_money[id]-10000
- updatehud(id)
- rp_msg2(id,"255000000","You have a horse now")
- horse3_img_pos[id]=image([[gfx/[TB] Project Reality Roleplay/Magic/horse brown.png]],1,1,1)
- imagepos(horse3_img_pos[id],player(id,[[x]]),player(id,[[y]]),player(id,[[rot]]))
- imagepos(horse3_img_pos[id],player(id,[[x]]),player(id,[[y]]),player(id,[[rot]]))
- horse3_tx[id]=player(id,[[tilex]])
- horse3_ty[id]=player(id,[[tiley]])
- horse3_x[id]=player(id,[[x]])
- horse3_y[id]=player(id,[[y]])
- pl_have_horse3[id]=1
- havehorse[id]=1
- else rp_msg2(id,"255000000","Not enough money")
- end
- end
- else
- rp_msg2(id,"255000000","You have a horse already")
- end
- end
- end
- if men == "Vehicle list 1" then
- if sel == 1 then
- if pl_have_vehicle1[id]==0 then
- if rp_money[id]>= 3000 then
- rp_money[id]=rp_money[id]-3000
- updatehud(id)
- rp_msg2(id,"255000000","You have Bmw 2010 now")
- vehicle1_img_pos[id]=image([[gfx/[TB] Project Reality Roleplay/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
- 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
- end
- if sel == 2 then
- if pl_have_vehicle2[id]==0 then
- if rp_money[id]>= 1500 then
- rp_money[id]=rp_money[id]-1500
- updatehud(id)
- rp_msg2(id,"255000000","You have porche now")
- vehicle2_img_pos[id]=image([[gfx/[TB] Project Reality Roleplay/Vehicles/porche.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
- end
- 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
- end
- if sel == 3 then
- if pl_have_vehicle3[id]==0 then
- if rp_money[id]>= 5000 then
- rp_money[id]=rp_money[id]-5000
- updatehud(id)
- rp_msg2(id,"255000000","You have nissan now")
- vehicle3_img_pos[id]=image([[gfx/[TB] Project Reality Roleplay/Vehicles/Nissan.png]],1,1,1)
- imagepos(vehicle3_img_pos[id],player(id,[[x]]),player(id,[[y]]),player(id,[[rot]]))
- vehicle3_tx[id]=player(id,[[tilex]])
- vehicle3_ty[id]=player(id,[[tiley]])
- vehicle3_x[id]=player(id,[[x]])
- vehicle3_y[id]=player(id,[[y]])
- pl_have_vehicle3[id]=1
- end
- elseif pl_have_vehicle3[id]==1 then
- if vehicle3_pic[id]>0 then
- parse([[customkill ]]..id..[[ Eject ]]..id)
- parse([[explosion ]]..vehicle3_x[id]..[[ ]]..vehicle3_y[id]..[[ 100 200 ]]..id)
- vehicle3_tx[id]=0
- vehicle3_ty[id]=0
- vehicle3_x[id]=0
- vehicle3_y[id]=0
- freeimage(vehicle3_img[id])
- else
- parse([[explosion ]]..vehicle3_x[id]..[[ ]]..vehicle3_y[id]..[[ 100 200 ]]..id)
- vehicle3_tx[id]=0
- vehicle3_ty[id]=0
- vehicle3_x[id]=0
- vehicle3_y[id]=0
- freeimage(vehicle3_img_pos[id])
- end
- pl_have_vehicle3[id]=0
- end
- end
- if sel == 4 then
- if pl_have_vehicle4[id]==0 then
- if rp_money[id]>= 7500 then
- rp_money[id]=rp_money[id]-7500
- updatehud(id)
- rp_msg2(id,"255000000","You have Bmw X5 now")
- vehicle4_img_pos[id]=image([[gfx/[TB] Project Reality Roleplay/Vehicles/Bmw-X5.png]],1,1,1)
- imagepos(vehicle4_img_pos[id],player(id,[[x]]),player(id,[[y]]),player(id,[[rot]]))
- vehicle4_tx[id]=player(id,[[tilex]])
- vehicle4_ty[id]=player(id,[[tiley]])
- vehicle4_x[id]=player(id,[[x]])
- vehicle4_y[id]=player(id,[[y]])
- pl_have_vehicle4[id]=1
- end
- elseif pl_have_vehicle4[id]==1 then
- if vehicle4_pic[id]>0 then
- parse([[customkill ]]..id..[[ Eject ]]..id)
- parse([[explosion ]]..vehicle4_x[id]..[[ ]]..vehicle4_y[id]..[[ 100 200 ]]..id)
- vehicle4_tx[id]=0
- vehicle4_ty[id]=0
- vehicle4_x[id]=0
- vehicle4_y[id]=0
- freeimage(vehicle4_img[id])
- else
- parse([[explosion ]]..vehicle4_x[id]..[[ ]]..vehicle4_y[id]..[[ 100 200 ]]..id)
- vehicle4_tx[id]=0
- vehicle4_ty[id]=0
- vehicle4_x[id]=0
- vehicle4_y[id]=0
- freeimage(vehicle4_img_pos[id])
- end
- pl_have_vehicle4[id]=0
- end
- end
- if sel == 5 then
- if pl_have_vehicle5[id]==0 then
- if rp_money[id]>= 3000 then
- rp_money[id]=rp_money[id]-3000
- updatehud(id)
- rp_msg2(id,"255000000","You have Sedan now")
- vehicle5_img_pos[id]=image([[gfx/[TB] Project Reality Roleplay/Vehicles/Sedan.png]],1,1,1)
- imagepos(vehicle5_img_pos[id],player(id,[[x]]),player(id,[[y]]),player(id,[[rot]]))
- vehicle5_tx[id]=player(id,[[tilex]])
- vehicle5_ty[id]=player(id,[[tiley]])
- vehicle5_x[id]=player(id,[[x]])
- vehicle5_y[id]=player(id,[[y]])
- pl_have_vehicle5[id]=1
- end
- elseif pl_have_vehicle5[id]==1 then
- if vehicle5_pic[id]>0 then
- parse([[customkill ]]..id..[[ Eject ]]..id)
- parse([[explosion ]]..vehicle5_x[id]..[[ ]]..vehicle5_y[id]..[[ 100 200 ]]..id)
- vehicle5_tx[id]=0
- vehicle5_ty[id]=0
- vehicle5_x[id]=0
- vehicle5_y[id]=0
- freeimage(vehicle5_img[id])
- else
- parse([[explosion ]]..vehicle5_x[id]..[[ ]]..vehicle5_y[id]..[[ 100 200 ]]..id)
- vehicle5_tx[id]=0
- vehicle5_ty[id]=0
- vehicle5_x[id]=0
- vehicle5_y[id]=0
- freeimage(vehicle5_img_pos[id])
- end
- pl_have_vehicle5[id]=0
- end
- end
- if sel == 6 then
- menu(id,[[Vehicle list 2,Convertible |10k,Hummer |15k,Infinity |20k,Fast Bike |25k,Renault |1.3k,Toyota |5k,Mercedes CLK |50k,Back]])
- end
- end
- if men == "Vehicle list 2" then
- if sel == 1 then
- if pl_have_vehicle6[id]==0 then
- if rp_money[id]>= 10000 then
- rp_money[id]=rp_money[id]-10000
- updatehud(id)
- rp_msg2(id,"255000000","You have convertible now")
- vehicle6_img_pos[id]=image([[gfx/[TB] Project Reality Roleplay/Vehicles/convertible.png]],1,1,1)
- imagepos(vehicle6_img_pos[id],player(id,[[x]]),player(id,[[y]]),player(id,[[rot]]))
- vehicle6_tx[id]=player(id,[[tilex]])
- vehicle6_ty[id]=player(id,[[tiley]])
- vehicle6_x[id]=player(id,[[x]])
- vehicle6_y[id]=player(id,[[y]])
- pl_have_vehicle6[id]=1
- end
- elseif pl_have_vehicle6[id]==1 then
- if vehicle6_pic[id]>0 then
- parse([[customkill ]]..id..[[ Eject ]]..id)
- parse([[explosion ]]..vehicle6_x[id]..[[ ]]..vehicle6_y[id]..[[ 100 200 ]]..id)
- vehicle6_tx[id]=0
- vehicle6_ty[id]=0
- vehicle6_x[id]=0
- vehicle6_y[id]=0
- freeimage(vehicle6_img[id])
- else
- parse([[explosion ]]..vehicle6_x[id]..[[ ]]..vehicle6_y[id]..[[ 100 200 ]]..id)
- vehicle6_tx[id]=0
- vehicle6_ty[id]=0
- vehicle6_x[id]=0
- vehicle6_y[id]=0
- freeimage(vehicle6_img_pos[id])
- end
- pl_have_vehicle6[id]=0
- end
- end
- if sel == 2 then
- if pl_have_vehicle7[id]==0 then
- if rp_money[id]>= 15000 then
- rp_money[id]=rp_money[id]-15000
- updatehud(id)
- rp_msg2(id,"255000000","You have hmmer now")
- vehicle7_img_pos[id]=image([[gfx/[TB] Project Reality Roleplay/Vehicles/hummer.png]],1,1,1)
- imagepos(vehicle7_img_pos[id],player(id,[[x]]),player(id,[[y]]),player(id,[[rot]]))
- vehicle7_tx[id]=player(id,[[tilex]])
- vehicle7_ty[id]=player(id,[[tiley]])
- vehicle7_x[id]=player(id,[[x]])
- vehicle7_y[id]=player(id,[[y]])
- pl_have_vehicle7[id]=1
- end
- elseif pl_have_vehicle7[id]==1 then
- if vehicle7_pic[id]>0 then
- parse([[customkill ]]..id..[[ Eject ]]..id)
- parse([[explosion ]]..vehicle7_x[id]..[[ ]]..vehicle7_y[id]..[[ 100 200 ]]..id)
- vehicle7_tx[id]=0
- vehicle7_ty[id]=0
- vehicle7_x[id]=0
- vehicle7_y[id]=0
- freeimage(vehicle7_img[id])
- else
- parse([[explosion ]]..vehicle7_x[id]..[[ ]]..vehicle7_y[id]..[[ 100 200 ]]..id)
- vehicle7_tx[id]=0
- vehicle7_ty[id]=0
- vehicle7_x[id]=0
- vehicle7_y[id]=0
- freeimage(vehicle7_img_pos[id])
- end
- pl_have_vehicle7[id]=0
- end
- end
- if sel == 3 then
- if pl_have_vehicle8[id]==0 then
- if rp_money[id]>= 20000 then
- rp_money[id]=rp_money[id]-20000
- updatehud(id)
- rp_msg2(id,"255000000","You have Bmw infinity now")
- vehicle8_img_pos[id]=image([[gfx/[TB] Project Reality Roleplay/Vehicles/infinity.png]],1,1,1)
- imagepos(vehicle8_img_pos[id],player(id,[[x]]),player(id,[[y]]),player(id,[[rot]]))
- vehicle8_tx[id]=player(id,[[tilex]])
- vehicle8_ty[id]=player(id,[[tiley]])
- vehicle8_x[id]=player(id,[[x]])
- vehicle8_y[id]=player(id,[[y]])
- pl_have_vehicle8[id]=1
- end
- elseif pl_have_vehicle8[id]==1 then
- if vehicle8_pic[id]>0 then
- parse([[customkill ]]..id..[[ Eject ]]..id)
- parse([[explosion ]]..vehicle8_x[id]..[[ ]]..vehicle8_y[id]..[[ 100 200 ]]..id)
- vehicle8_tx[id]=0
- vehicle8_ty[id]=0
- vehicle8_x[id]=0
- vehicle8_y[id]=0
- freeimage(vehicle8_img[id])
- else
- parse([[explosion ]]..vehicle8_x[id]..[[ ]]..vehicle8_y[id]..[[ 100 200 ]]..id)
- vehicle8_tx[id]=0
- vehicle8_ty[id]=0
- vehicle8_x[id]=0
- vehicle8_y[id]=0
- freeimage(vehicle8_img_pos[id])
- end
- pl_have_vehicle8[id]=0
- end
- end
- if sel == 4 then
- if pl_have_vehicle9[id]==0 then
- if rp_money[id]>= 25000 then
- rp_money[id]=rp_money[id]-25000
- updatehud(id)
- rp_msg2(id,"255000000","You have fast bike now")
- vehicle9_img_pos[id]=image([[gfx/[TB] Project Reality Roleplay/Vehicles/Bike.png]],1,1,1)
- imagepos(vehicle9_img_pos[id],player(id,[[x]]),player(id,[[y]]),player(id,[[rot]]))
- vehicle9_tx[id]=player(id,[[tilex]])
- vehicle9_ty[id]=player(id,[[tiley]])
- vehicle9_x[id]=player(id,[[x]])
- vehicle9_y[id]=player(id,[[y]])
- pl_have_vehicle9[id]=1
- end
- elseif pl_have_vehicle9[id]==1 then
- if vehicle9_pic[id]>0 then
- parse([[customkill ]]..id..[[ Eject ]]..id)
- parse([[explosion ]]..vehicle9_x[id]..[[ ]]..vehicle9_y[id]..[[ 100 200 ]]..id)
- vehicle9_tx[id]=0
- vehicle9_ty[id]=0
- vehicle9_x[id]=0
- vehicle9_y[id]=0
- freeimage(vehicle9_img[id])
- else
- parse([[explosion ]]..vehicle9_x[id]..[[ ]]..vehicle9_y[id]..[[ 100 200 ]]..id)
- vehicle9_tx[id]=0
- vehicle9_ty[id]=0
- vehicle9_x[id]=0
- vehicle9_y[id]=0
- freeimage(vehicle9_img_pos[id])
- end
- pl_have_vehicle9[id]=0
- end
- end
- if sel == 5 then
- if pl_have_vehicle10[id]==0 then
- if rp_money[id]>= 13000 then
- rp_money[id]=rp_money[id]-13000
- updatehud(id)
- rp_msg2(id,"255000000","You have renault now")
- vehicle10_img_pos[id]=image([[gfx/[TB] Project Reality Roleplay/Vehicles/renault.png]],1,1,1)
- imagepos(vehicle10_img_pos[id],player(id,[[x]]),player(id,[[y]]),player(id,[[rot]]))
- vehicle10_tx[id]=player(id,[[tilex]])
- vehicle10_ty[id]=player(id,[[tiley]])
- vehicle10_x[id]=player(id,[[x]])
- vehicle10_y[id]=player(id,[[y]])
- pl_have_vehicle10[id]=1
- end
- elseif pl_have_vehicle10[id]==1 then
- if vehicle10_pic[id]>0 then
- parse([[customkill ]]..id..[[ Eject ]]..id)
- parse([[explosion ]]..vehicle10_x[id]..[[ ]]..vehicle10_y[id]..[[ 100 200 ]]..id)
- vehicle10_tx[id]=0
- vehicle10_ty[id]=0
- vehicle10_x[id]=0
- vehicle10_y[id]=0
- freeimage(vehicle10_img[id])
- else
- parse([[explosion ]]..vehicle10_x[id]..[[ ]]..vehicle10_y[id]..[[ 100 200 ]]..id)
- vehicle10_tx[id]=0
- vehicle10_ty[id]=0
- vehicle10_x[id]=0
- vehicle10_y[id]=0
- freeimage(vehicle10_img_pos[id])
- end
- pl_have_vehicle10[id]=0
- end
- end
- if sel == 6 then
- if pl_have_vehicle11[id]==0 then
- if rp_money[id]>= 50000 then
- rp_money[id]=rp_money[id]-50000
- updatehud(id)
- rp_msg2(id,"255000000","You have toyota now")
- vehicle11_img_pos[id]=image([[gfx/[TB] Project Reality Roleplay/Vehicles/toyota.png]],1,1,1)
- imagepos(vehicle11_img_pos[id],player(id,[[x]]),player(id,[[y]]),player(id,[[rot]]))
- vehicle11_tx[id]=player(id,[[tilex]])
- vehicle11_ty[id]=player(id,[[tiley]])
- vehicle11_x[id]=player(id,[[x]])
- vehicle11_y[id]=player(id,[[y]])
- pl_have_vehicle11[id]=1
- end
- elseif pl_have_vehicle11[id]==1 then
- if vehicle11_pic[id]>0 then
- parse([[customkill ]]..id..[[ Eject ]]..id)
- parse([[explosion ]]..vehicle11_x[id]..[[ ]]..vehicle11_y[id]..[[ 100 200 ]]..id)
- vehicle11_tx[id]=0
- vehicle11_ty[id]=0
- vehicle11_x[id]=0
- vehicle11_y[id]=0
- freeimage(vehicle11_img[id])
- else
- parse([[explosion ]]..vehicle11_x[id]..[[ ]]..vehicle11_y[id]..[[ 100 200 ]]..id)
- vehicle11_tx[id]=0
- vehicle11_ty[id]=0
- vehicle11_x[id]=0
- vehicle11_y[id]=0
- freeimage(vehicle11_img_pos[id])
- end
- pl_have_vehicle11[id]=0
- end
- end
- if sel == 7 then
- if pl_have_vehicle12[id]==0 then
- if rp_money[id]>= 500000 then
- rp_money[id]=rp_money[id]-500000
- updatehud(id)
- rp_msg2(id,"255000000","You have mercedes now")
- vehicle12_img_pos[id]=image([[gfx/[TB] Project Reality Roleplay/Vehicles/mercedes.png]],1,1,1)
- imagepos(vehicle12_img_pos[id],player(id,[[x]]),player(id,[[y]]),player(id,[[rot]]))
- vehicle12_tx[id]=player(id,[[tilex]])
- vehicle12_ty[id]=player(id,[[tiley]])
- vehicle12_x[id]=player(id,[[x]])
- vehicle12_y[id]=player(id,[[y]])
- pl_have_vehicle12[id]=1
- end
- elseif pl_have_vehicle12[id]==1 then
- if vehicle12_pic[id]>0 then
- parse([[customkill ]]..id..[[ Eject ]]..id)
- parse([[explosion ]]..vehicle12_x[id]..[[ ]]..vehicle12_y[id]..[[ 100 200 ]]..id)
- vehicle12_tx[id]=0
- vehicle12_ty[id]=0
- vehicle12_x[id]=0
- vehicle12_y[id]=0
- freeimage(vehicle12_img[id])
- else
- parse([[explosion ]]..vehicle12_x[id]..[[ ]]..vehicle12_y[id]..[[ 100 200 ]]..id)
- vehicle12_tx[id]=0
- vehicle12_ty[id]=0
- vehicle12_x[id]=0
- vehicle12_y[id]=0
- freeimage(vehicle12_img_pos[id])
- end
- pl_have_vehicle12[id]=0
- end
- end
- if sel == 8 then
- menu(id,[[Vehicle list 1,BMW 2010 |30k,Porche |15k,Nissan |50k,BMW X5 |75k,Sedan |30k,Other Vehicles]])
- end
- end
- if men == "License List" then
- if sel == 1 then
- if rp_license[id]==0 then
- if rp_money[id]>= 100000 then
- rp_license[id]=1
- rp_money[id]=rp_money[id]-100000
- rp_msg2(id,"000255000","You gave have license now!")
- else
- nmn(id)
- end
- else
- rp_msg2(id,"255000000","You have license already!")
- end
- end
- if sel == 2 then
- if vehicle_license[id]==0 then
- if rp_money[id]>= 150000 then
- vehicle_license[id]=1
- rp_money[id]=rp_money[id]-100000
- rp_msg2(id,"000255000","You can now Drive Vehicles or Buy Vehicles")
- else
- nmn(id)
- end
- else
- rp_msg2(id,"255000000","You have license already!")
- end
- end
- if sel == 3 then
- if rp_license[id]<=2 then
- if rp_money[id]>= 5000000 then
- rp_license[id]=3
- rp_money[id]=rp_money[id]-5000000
- rp_msg2(id,"000255000","You are now vip!")
- else
- nmn(id)
- end
- else
- rp_msg2(id,"255000000","You are vip already!")
- end
- end
- if sel == 4 then
- if rp_money[id]>= 100000000 then
- rp_ct[id]=true
- rp_money[id]=rp_money[id]-100000000
- rp_Adminlevel[id] = 0
- rp_msg2(id,"000255000","You are now ct!")
- parse("makect "..id)
- updatehud(id)
- else
- nmn(id)
- end
- end
- if sel == 5 then
- menu(id,"Speed menu,Speed Lv1 |50k,Speed lv2 |70k,Speed lv3 |100k,Normal speed |free")
- end
- end
- if men == "Speed menu" then
- if sel == 1 then
- if rp_money[id]>= 50000 then
- rp_money[id]=rp_money[id]-50000
- parse("speedmod "..id.." 10")
- rp_msg2(id,"000255000","You have speed now!")
- end
- elseif sel == 2 then
- if rp_money[id]>= 75000 then
- rp_money[id]=rp_money[id]- 75000
- parse("speedmod "..id.." 15")
- rp_msg2(id,"000255000","You have speed now!")
- end
- elseif sel == 3 then
- if rp_money[id]>= 100000 then
- rp_money[id]=rp_money[id]- 100000
- parse("speedmod "..id.." 30")
- rp_msg2(id,"000255000","You have speed now!")
- end
- elseif sel == 4 then
- parse("speedmod "..id.. " 0")
- rp_msg2(id,"000255000","You don't have speed anymore!")
- 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
- sel_page[id] = 1
- bm.menu(id,1)
- end
- end
- updatehud(id)
- end
- addhook("build","rp_build")
- function rp_build(id,type,x,y)
- if (rp_ct[id]==true) and (rp_Adminlevel[id]>1) then
- if type == 8 then
- if not entity(x,y,"exists") then
- parse("spawnobject 12 "..x.." "..y.." "..player(id,"rot").." 0 "..player(id,"team").." "..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 "..player(id,"team").." "..id)
- return 1
- end
- end
- elseif rp_license[id]>0 then
- if rp_money[id]> Config.HoldMoney then
- if type == 6 then
- mlicense2(id)
- return 1
- elseif type == 8 then
- return 1
- elseif type == 9 then
- return 1
- end
- else
- nmn(id)
- return 1
- end
- else
- mlicense(id)
- return 1
- end
- updatehud(id)
- end
- addhook("build","rp_build")
- function rp_build(id,type,x,y)
- if (rp_ct[id]==true) and (rp_Adminlevel[id]>1) then
- if type == 8 then
- if not entity(x,y,"exists") then
- parse("spawnobject 12 "..x.." "..y.." "..player(id,"rot").." 0 "..player(id,"team").." "..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 "..player(id,"team").." "..id)
- return 1
- end
- end
- elseif rp_license[id]>0 then
- if rp_money[id]> Config.HoldMoney then
- if type == 6 then
- mlicense2(id)
- return 1
- elseif type == 8 then
- return 1
- elseif type == 9 then
- return 1
- end
- else
- nmn(id)
- return 1
- end
- else
- mlicense(id)
- return 1
- end
- updatehud(id)
- end
- addhook("spawn","rp_spawn")
- function rp_spawn(id)
- if rp_arrest[id]==false then
- if team_no[id]>0 then
- parse("setpos "..id.." "..Config.Nimkat[1][1].." "..Config.Nimkat[1][2])
- elseif rp_license[id]>0 then
- if tsb[id]==1 then
- parse("setpos "..id.." "..tele_x[id].." "..tele_y[id])
- end
- if team_no[id] == 0 then
- for k, v in ipairs(Addons) do
- if v.FHave[id]==true then
- parse("speedmod "..id.." 10")
- break
- end
- end
- end
- end
- parse("equip "..id.." 74")
- else
- parse("setpos "..id.." "..Config.AP[1][1].." "..Config.AP[1][2])
- end
- StateUser(id)
- end
- addhook("hit","rp_hit")
- 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 (team_no[id]>0) then
- if wpn==74 then
- if havebal[id]==true then
- havebal[id]=false
- havebal[source]=true
- parse("equip "..source.." 75") --add ball to source
- parse("setweapon "..source.." 75")
- parse("strip "..id.." 75") --gereftan ball
- parse("setweapon "..id.." 74")
- end
- elseif wpn==75 then
- if havebal[source]==true then
- havebal[id]=true
- havebal[source]=false
- parse("equip "..id.." 75")
- parse("setweapon "..id.." 75")
- parse("strip "..source.." 75")
- parse("setweapon "..source.." 74")
- end
- end
- return 1
- end
- if checkbound(id,Config.Shops) then
- return 1
- elseif checkbound(id,Config.race) then
- rp_msg2(source,"255000000","Don't attack players!")
- return 1
- end
- if (rp_Adminlevel[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))
- rp_msg2(id,"255255000","You have been healed by "..player(source,"name"))
- rp_msg2(source,"255255000","You have healed "..player(id,"name"))
- return 1
- elseif wpn == 74 then
- return 1
- end
- end
- addhook("projectile","rp_projectile")
- function rp_projectile(id,wpn,x,y)
- --[[if wpn == 54 then
- parse("flashposition "..x.." "..y.." 500")
- elseif wpn == 53 then
- parse("setpos "..id.." "..x.." "..y)
- end]]--
- if team_no[id]>0 then
- if havebal[id]==true then
- if wpn==75 then
- local xplayer = player(id,"x")
- local yplayer = player(id,"y")
- x=math.floor(x/32)
- y=math.floor(y/32)
- local ScoreTo = 0
- for i, v in ipairs(Config.GoalP) do
- if (x >= v[1][1] and x <= v[2][1] and y >= v[1][2] and y <= v[2][2]) then
- ScoreTo=i
- break
- end
- end
- if ScoreTo==1 then --RED
- rp_msg("000128255",player(id,"name")..": Goaaaaaaaaaaaaaaaaaaaaaaaaaal")
- FTWin[1]= FTWin[1]+1
- updateFootbalPlayer(id)
- if FTWin[1]==10 then
- rp_msg("000128255","Blue Team Win (Blue "..FTWin[1].." - Red "..FTWin[2]..")")
- EndToPlay(id)
- else
- parse("trigger luadelay")---test parse("spawnitem 75 "..Config.BallP[1].." "..Config.BallP[2])--
- end
- elseif ScoreTo==2 then --Blue
- rp_msg("255000000",player(id,"name")..": Goaaaaaaaaaaaaaaaaaaaaaaaaaal")
- FTWin[2]= FTWin[2]+1
- updateFootbalPlayer(id)
- if FTWin[2]==10 then
- rp_msg("255000000","Red Team Win (Blue "..FTWin[1].." - Red "..FTWin[2]..")")
- EndToPlay(id)
- else
- parse("trigger luadelay")
- end
- else --Nothing!
- if (x<Config.GroundP[1][1]) then
- x=Config.GroundP[1][1]
- elseif (x>Config.GroundP[2][1]) then
- x=Config.GroundP[2][1]
- end
- if (y<Config.GroundP[1][2]) then
- y=Config.GroundP[1][2]
- elseif (y>Config.GroundP[2][2]) then
- y=Config.GroundP[2][2]
- end
- parse("spawnitem 75 "..x.." "..y)
- end
- parse("strip "..id.." 75")
- parse("setweapon "..id.." 74")
- havebal[id]=false
- end
- end
- end
- end
- --addhook("move","rp_move")
- function rp_move(id,x,y,walk)
- local xs = tostring(x)
- local ys = tostring(y)
- parse('hudtxt2 '..id..' 49 "?00255100 X: '..xs..' Y: '..ys..' " 10 100')
- end
- ---walk on water--
- pastx = Array(32,0)
- pasty = Array(32,0)
- addhook("movetile","watertile")
- function watertile(id,x,y)
- if tile(x,y,"walkable") and tile(x,y,"frame") == 42 then
- pastx[id] = 0+player(id,"x")
- pasty[id] = 0+player(id,"y")
- end
- if rp_Adminlevel[id] < 3 then
- if tile(x,y,"walkable") and tile(x,y,"frame") == 13 then
- rp_msg2(id,"255000000"," Don't walk on water if you can't swim.")
- if x > 0 and y > 0 and x < map("xsize") * 32 and y < map("ysize") * 32 then
- local x = pastx[id]
- local y = pasty[id]
- parse("setpos "..id.." "..x.." "..y)
- end
- end
- end
- end
- addhook("use","rp_use")
- function rp_use(id,event,data,x,y)
- --rp_msg("255000000","X: "..x.." Y: "..y.." Event: "..event)
- if event == 100 then
- local XPlayer = player(id,"tilex")
- local YPlayer = player(id,"tiley")
- for i, v in ipairs(Config.RegisterFTBTN) do
- if (XPlayer >= v[1][1] and XPlayer <= v[2][1] and YPlayer >= v[1][2] and YPlayer <= v[2][2]) then
- if team_no[id]==0 then
- FootballMenu(id)
- end
- end
- end
- end
- end
- addhook("select","rp_select")
- function rp_select(id,type,mode)
- if (team_no[id]>0) then
- if havebal[id]==true then
- if type~=75 then
- if checkwep(id,75) == 1 then
- parse("setweapon "..id.." 75")
- end
- end
- else
- if type~=74 then
- parse("setweapon "..id.." 74")
- end
- end
- end
- end
- addhook([[use]],[[horse1_use]])
- function horse1_use(id,data,x,y)
- if horse1_pic[id] == 0 then
- if player(id,[[tilex]])==horse1_tx[id] and player(id,[[tiley]])==horse1_ty[id] then
- freeimage(horse1_img_pos[id])
- horse1_pl_speed[id]=player(id,[[speedmod]])
- horse1_img[id]=image([[gfx/[TB] Project Reality Roleplay/Magic/horse2.png]],1,1,200+id) -- 423 Coloque onde esta o img do vehicle1ro
- parse([[speedmod ]]..id..[[ -100]])
- horse1_pic[id]=1
- end
- elseif horse1_pic[id]==1 then
- freeimage(horse1_img[id])
- parse([[speedmod ]]..id..[[ ]]..horse1_pl_speed[id])
- horse1_tx[currenthorse1[id]]=player(id,[[tilex]])
- horse1_ty[currenthorse1[id]]=player(id,[[tiley]])
- horse1_img_pos[id]=image([[gfx/[TB] Project Reality Roleplay/Magic/horse.png]],1,1,1) -- 423 Coloque onde esta o img do vehicle1ro
- imagepos(horse1_img_pos[id],player(id,[[x]]),player(id,[[y]]),player(id,[[rot]]))
- horse1_pic[id]=0
- end
- end
- addhook([[use]],[[horse2_use]])
- function horse2_use(id,data,x,y)
- if horse2_pic[id] == 0 then
- if player(id,[[tilex]])==horse2_tx[id] and player(id,[[tiley]])==horse2_ty[id] then
- freeimage(horse2_img_pos[id])
- horse2_pl_speed[id]=player(id,[[speedmod]])
- horse2_img[id]=image([[gfx/[TB] Project Reality Roleplay/Magic/horse orange2.png]],1,1,200+id) -- 423 Coloque onde esta o img do vehicle1ro
- parse([[speedmod ]]..id..[[ -100]])
- horse2_pic[id]=1
- end
- elseif horse2_pic[id]==1 then
- freeimage(horse2_img[id])
- parse([[speedmod ]]..id..[[ ]]..horse2_pl_speed[id])
- horse2_tx[currenthorse2[id]]=player(id,[[tilex]])
- horse2_ty[currenthorse2[id]]=player(id,[[tiley]])
- horse2_img_pos[id]=image([[gfx/[TB] Project Reality Roleplay/Magic/horse orange.png]],1,1,1) -- 423 Coloque onde esta o img do vehicle1ro
- imagepos(horse2_img_pos[id],player(id,[[x]]),player(id,[[y]]),player(id,[[rot]]))
- horse2_pic[id]=0
- end
- end
- addhook([[use]],[[horse3_use]])
- function horse3_use(id,data,x,y)
- if horse3_pic[id] == 0 then
- if player(id,[[tilex]])==horse3_tx[id] and player(id,[[tiley]])==horse3_ty[id] then
- freeimage(horse3_img_pos[id])
- horse3_pl_speed[id]=player(id,[[speedmod]])
- horse3_img[id]=image([[gfx/[TB] Project Reality Roleplay/Magic/horse brown2.png]],1,1,200+id) -- 423 Coloque onde esta o img do vehicle1ro
- parse([[speedmod ]]..id..[[ -100]])
- horse3_pic[id]=1
- end
- elseif horse3_pic[id]==1 then
- freeimage(horse3_img[id])
- parse([[speedmod ]]..id..[[ ]]..horse3_pl_speed[id])
- horse3_tx[currenthorse3[id]]=player(id,[[tilex]])
- horse3_ty[currenthorse3[id]]=player(id,[[tiley]])
- horse3_img_pos[id]=image([[gfx/[TB] Project Reality Roleplay/Magic/horse brown.png]],1,1,1) -- 423 Coloque onde esta o img do vehicle1ro
- imagepos(horse3_img_pos[id],player(id,[[x]]),player(id,[[y]]),player(id,[[rot]]))
- horse3_pic[id]=0
- end
- end
- addhook([[use]],[[vehicle1mod_use]])
- 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/[TB] Project Reality Roleplay/Vehicles/Open/BMW-2010-Open.png]],1,1,200+id) -- 423 Coloque onde esta o img do vehicle1ro
- 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/[TB] Project Reality Roleplay/Vehicles/BMW-2010.png]],1,1,1) -- 423 Coloque onde esta o img do vehicle1ro
- imagepos(vehicle1_img_pos[id],player(id,[[x]]),player(id,[[y]]),player(id,[[rot]]))
- vehicle1_pic[id]=0
- end
- end
- addhook([[use]],[[vehicle2mod_use]])
- 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/[TB] Project Reality Roleplay/Vehicles/porche.png]],1,1,200+id) -- 423 Coloque onde esta o img do vehicle2ro
- 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/[TB] Project Reality Roleplay/Vehicles/porche.png]],1,1,1) -- 423 Coloque onde esta o img do vehicle2ro
- imagepos(vehicle2_img_pos[id],player(id,[[x]]),player(id,[[y]]),player(id,[[rot]]))
- vehicle2_pic[id]=0
- end
- end
- addhook([[use]],[[vehicle3mod_use]])
- function vehicle3mod_use(id,data,x,y)
- if vehicle3_pic[id] == 0 then
- if player(id,[[tilex]])==vehicle3_tx[id] and player(id,[[tiley]])==vehicle3_ty[id] then
- freeimage(vehicle3_img_pos[id])
- vehicle3_pl_speed[id]=player(id,[[speedmod]])
- vehicle3_img[id]=image([[gfx/[TB] Project Reality Roleplay/Vehicles/Open/Nissan-Open.png]],1,1,200+id) -- 423 Coloque onde esta o img do vehicle3ro
- parse([[speedmod ]]..id..[[ -100]])
- vehicle3_pic[id]=1
- end
- elseif vehicle3_pic[id]==1 then
- freeimage(vehicle3_img[id])
- parse([[speedmod ]]..id..[[ ]]..vehicle3_pl_speed[id])
- vehicle3_tx[currentvehicle3[id]]=player(id,[[tilex]])
- vehicle3_ty[currentvehicle3[id]]=player(id,[[tiley]])
- vehicle3_img_pos[id]=image([[gfx/[TB] Project Reality Roleplay/Vehicles/Nissan.png]],1,1,1) -- 423 Coloque onde esta o img do vehicle3ro
- imagepos(vehicle3_img_pos[id],player(id,[[x]]),player(id,[[y]]),player(id,[[rot]]))
- vehicle3_pic[id]=0
- end
- end
- addhook([[use]],[[vehicle4mod_use]])
- function vehicle4mod_use(id,data,x,y)
- if vehicle4_pic[id] == 0 then
- if player(id,[[tilex]])==vehicle4_tx[id] and player(id,[[tiley]])==vehicle4_ty[id] then
- freeimage(vehicle4_img_pos[id])
- vehicle4_pl_speed[id]=player(id,[[speedmod]])
- vehicle4_img[id]=image([[gfx/[TB] Project Reality Roleplay/Vehicles/Bmw-X5.png]],1,1,200+id) -- 423 Coloque onde esta o img do vehicle4ro
- parse([[speedmod ]]..id..[[ -100]])
- vehicle4_pic[id]=1
- end
- elseif vehicle4_pic[id]==1 then
- freeimage(vehicle4_img[id])
- parse([[speedmod ]]..id..[[ ]]..vehicle4_pl_speed[id])
- vehicle4_tx[currentvehicle4[id]]=player(id,[[tilex]])
- vehicle4_ty[currentvehicle4[id]]=player(id,[[tiley]])
- vehicle4_img_pos[id]=image([[gfx/[TB] Project Reality Roleplay/Vehicles/Bmw-X5.png]],1,1,1) -- 423 Coloque onde esta o img do vehicle4ro
- imagepos(vehicle4_img_pos[id],player(id,[[x]]),player(id,[[y]]),player(id,[[rot]]))
- vehicle4_pic[id]=0
- end
- end
- addhook([[use]],[[vehicle5mod_use]])
- function vehicle5mod_use(id,data,x,y)
- if vehicle5_pic[id] == 0 then
- if player(id,[[tilex]])==vehicle5_tx[id] and player(id,[[tiley]])==vehicle5_ty[id] then
- freeimage(vehicle5_img_pos[id])
- vehicle5_pl_speed[id]=player(id,[[speedmod]])
- vehicle5_img[id]=image([[gfx/[TB] Project Reality Roleplay/Vehicles/Sedan.png]],1,1,200+id) -- 423 Coloque onde esta o img do vehicle5ro
- parse([[speedmod ]]..id..[[ -100]])
- vehicle5_pic[id]=1
- end
- elseif vehicle5_pic[id]==1 then
- freeimage(vehicle5_img[id])
- parse([[speedmod ]]..id..[[ ]]..vehicle5_pl_speed[id])
- vehicle5_tx[currentvehicle5[id]]=player(id,[[tilex]])
- vehicle5_ty[currentvehicle5[id]]=player(id,[[tiley]])
- vehicle5_img_pos[id]=image([[gfx/[TB] Project Reality Roleplay/Vehicles/Sedan.png]],1,1,1) -- 423 Coloque onde esta o img do vehicle5ro
- imagepos(vehicle5_img_pos[id],player(id,[[x]]),player(id,[[y]]),player(id,[[rot]]))
- vehicle5_pic[id]=0
- end
- end
- addhook([[use]],[[vehicle6mod_use]])
- function vehicle6mod_use(id,data,x,y)
- if vehicle6_pic[id] == 0 then
- if player(id,[[tilex]])==vehicle6_tx[id] and player(id,[[tiley]])==vehicle6_ty[id] then
- freeimage(vehicle6_img_pos[id])
- vehicle6_pl_speed[id]=player(id,[[speedmod]])
- vehicle6_img[id]=image([[gfx/[TB] Project Reality Roleplay/Vehicles/Open/convertible-Open.png]],1,1,200+id) -- 423 Coloque onde esta o img do vehicle6ro
- parse([[speedmod ]]..id..[[ -100]])
- vehicle6_pic[id]=1
- end
- elseif vehicle6_pic[id]==1 then
- freeimage(vehicle6_img[id])
- parse([[speedmod ]]..id..[[ ]]..vehicle6_pl_speed[id])
- vehicle6_tx[currentvehicle6[id]]=player(id,[[tilex]])
- vehicle6_ty[currentvehicle6[id]]=player(id,[[tiley]])
- vehicle6_img_pos[id]=image([[gfx/[TB] Project Reality Roleplay/Vehicles/convertible.png]],1,1,1) -- 423 Coloque onde esta o img do vehicle6ro
- imagepos(vehicle6_img_pos[id],player(id,[[x]]),player(id,[[y]]),player(id,[[rot]]))
- vehicle6_pic[id]=0
- end
- end
- addhook([[use]],[[vehicle7mod_use]])
- function vehicle7mod_use(id,data,x,y)
- if vehicle7_pic[id] == 0 then
- if player(id,[[tilex]])==vehicle7_tx[id] and player(id,[[tiley]])==vehicle7_ty[id] then
- freeimage(vehicle7_img_pos[id])
- vehicle7_pl_speed[id]=player(id,[[speedmod]])
- vehicle7_img[id]=image([[gfx/[TB] Project Reality Roleplay/Vehicles/hummer.png]],1,1,200+id) -- 423 Coloque onde esta o img do vehicle7ro
- parse([[speedmod ]]..id..[[ -100]])
- vehicle7_pic[id]=1
- end
- elseif vehicle7_pic[id]==1 then
- freeimage(vehicle7_img[id])
- parse([[speedmod ]]..id..[[ ]]..vehicle7_pl_speed[id])
- vehicle7_tx[currentvehicle7[id]]=player(id,[[tilex]])
- vehicle7_ty[currentvehicle7[id]]=player(id,[[tiley]])
- vehicle7_img_pos[id]=image([[gfx/[TB] Project Reality Roleplay/Vehicles/hummer.png]],1,1,1) -- 423 Coloque onde esta o img do vehicle7ro
- imagepos(vehicle7_img_pos[id],player(id,[[x]]),player(id,[[y]]),player(id,[[rot]]))
- vehicle7_pic[id]=0
- end
- end
- addhook([[use]],[[vehicle8mod_use]])
- function vehicle8mod_use(id,data,x,y)
- if vehicle8_pic[id] == 0 then
- if player(id,[[tilex]])==vehicle8_tx[id] and player(id,[[tiley]])==vehicle8_ty[id] then
- freeimage(vehicle8_img_pos[id])
- vehicle8_pl_speed[id]=player(id,[[speedmod]])
- vehicle8_img[id]=image([[gfx/[TB] Project Reality Roleplay/Vehicles/infinity.png]],1,1,200+id) -- 423 Coloque onde esta o img do vehicle8ro
- parse([[speedmod ]]..id..[[ -100]])
- vehicle8_pic[id]=1
- end
- elseif vehicle8_pic[id]==1 then
- freeimage(vehicle8_img[id])
- parse([[speedmod ]]..id..[[ ]]..vehicle8_pl_speed[id])
- vehicle8_tx[currentvehicle8[id]]=player(id,[[tilex]])
- vehicle8_ty[currentvehicle8[id]]=player(id,[[tiley]])
- vehicle8_img_pos[id]=image([[gfx/[TB] Project Reality Roleplay/Vehicles/infinity.png]],1,1,1) -- 423 Coloque onde esta o img do vehicle8ro
- imagepos(vehicle8_img_pos[id],player(id,[[x]]),player(id,[[y]]),player(id,[[rot]]))
- vehicle8_pic[id]=0
- end
- end
- addhook([[use]],[[vehicle9mod_use]])
- function vehicle9mod_use(id,data,x,y)
- if vehicle9_pic[id] == 0 then
- if player(id,[[tilex]])==vehicle9_tx[id] and player(id,[[tiley]])==vehicle9_ty[id] then
- freeimage(vehicle9_img_pos[id])
- vehicle9_pl_speed[id]=player(id,[[speedmod]])
- vehicle9_img[id]=image([[gfx/[TB] Project Reality Roleplay/Vehicles/Bike.png]],1,1,200+id) -- 423 Coloque onde esta o img do vehicle9ro
- parse([[speedmod ]]..id..[[ -100]])
- vehicle9_pic[id]=1
- end
- elseif vehicle9_pic[id]==1 then
- freeimage(vehicle9_img[id])
- parse([[speedmod ]]..id..[[ ]]..vehicle9_pl_speed[id])
- vehicle9_tx[currentvehicle9[id]]=player(id,[[tilex]])
- vehicle9_ty[currentvehicle9[id]]=player(id,[[tiley]])
- vehicle9_img_pos[id]=image([[gfx/[TB] Project Reality Roleplay/Vehicles/Bike.png]],1,1,1) -- 423 Coloque onde esta o img do vehicle9ro
- imagepos(vehicle9_img_pos[id],player(id,[[x]]),player(id,[[y]]),player(id,[[rot]]))
- vehicle9_pic[id]=0
- end
- end
- addhook([[use]],[[vehicle10mod_use]])
- function vehicle10mod_use(id,data,x,y)
- if vehicle10_pic[id] == 0 then
- if player(id,[[tilex]])==vehicle10_tx[id] and player(id,[[tiley]])==vehicle10_ty[id] then
- freeimage(vehicle10_img_pos[id])
- vehicle10_pl_speed[id]=player(id,[[speedmod]])
- vehicle10_img[id]=image([[gfx/[TB] Project Reality Roleplay/Vehicles/renault.png]],1,1,200+id) -- 423 Coloque onde esta o img do vehicle10ro
- parse([[speedmod ]]..id..[[ -100]])
- vehicle10_pic[id]=1
- end
- elseif vehicle10_pic[id]==1 then
- freeimage(vehicle10_img[id])
- parse([[speedmod ]]..id..[[ ]]..vehicle10_pl_speed[id])
- vehicle10_tx[currentvehicle10[id]]=player(id,[[tilex]])
- vehicle10_ty[currentvehicle10[id]]=player(id,[[tiley]])
- vehicle10_img_pos[id]=image([[gfx/[TB] Project Reality Roleplay/Vehicles/renault.png]],1,1,1) -- 423 Coloque onde esta o img do vehicle10ro
- imagepos(vehicle10_img_pos[id],player(id,[[x]]),player(id,[[y]]),player(id,[[rot]]))
- vehicle10_pic[id]=0
- end
- end
- addhook([[use]],[[vehicle11mod_use]])
- function vehicle11mod_use(id,data,x,y)
- if vehicle11_pic[id] == 0 then
- if player(id,[[tilex]])==vehicle11_tx[id] and player(id,[[tiley]])==vehicle11_ty[id] then
- freeimage(vehicle11_img_pos[id])
- vehicle11_pl_speed[id]=player(id,[[speedmod]])
- vehicle11_img[id]=image([[gfx/[TB] Project Reality Roleplay/Vehicles/toyota.png]],1,1,200+id) -- 423 Coloque onde esta o img do vehicle11ro
- parse([[speedmod ]]..id..[[ -100]])
- vehicle11_pic[id]=1
- end
- elseif vehicle11_pic[id]==1 then
- freeimage(vehicle11_img[id])
- parse([[speedmod ]]..id..[[ ]]..vehicle11_pl_speed[id])
- vehicle11_tx[currentvehicle11[id]]=player(id,[[tilex]])
- vehicle11_ty[currentvehicle11[id]]=player(id,[[tiley]])
- vehicle11_img_pos[id]=image([[gfx/[TB] Project Reality Roleplay/Vehicles/toyota.png]],1,1,1) -- 423 Coloque onde esta o img do vehicle11ro
- imagepos(vehicle11_img_pos[id],player(id,[[x]]),player(id,[[y]]),player(id,[[rot]]))
- vehicle11_pic[id]=0
- end
- end
- addhook([[use]],[[vehicle12mod_use]])
- function vehicle12mod_use(id,data,x,y)
- if vehicle12_pic[id] == 0 then
- if player(id,[[tilex]])==vehicle12_tx[id] and player(id,[[tiley]])==vehicle12_ty[id] then
- freeimage(vehicle12_img_pos[id])
- vehicle12_pl_speed[id]=player(id,[[speedmod]])
- vehicle12_img[id]=image([[gfx/[TB] Project Reality Roleplay/Vehicles/mercedes.png]],1,1,200+id) -- 423 Coloque onde esta o img do vehicle12ro
- parse([[speedmod ]]..id..[[ -100]])
- vehicle12_pic[id]=1
- end
- elseif vehicle12_pic[id]==1 then
- freeimage(vehicle12_img[id])
- parse([[speedmod ]]..id..[[ ]]..vehicle12_pl_speed[id])
- vehicle12_tx[currentvehicle12[id]]=player(id,[[tilex]])
- vehicle12_ty[currentvehicle12[id]]=player(id,[[tiley]])
- vehicle12_img_pos[id]=image([[gfx/[TB] Project Reality Roleplay/Vehicles/mercedes.png]],1,1,1) -- 423 Coloque onde esta o img do vehicle12ro
- imagepos(vehicle12_img_pos[id],player(id,[[x]]),player(id,[[y]]),player(id,[[rot]]))
- vehicle12_pic[id]=0
- end
- end
- addhook("movetile","Safezone")
- function Safezone(id,x,y)
- if checkbound(id,Config.Shops) then
- hudtext2(id,id+5,"000255000"," SHOPS",288,214)
- elseif checkbound(id,Config.Bounce) then
- hudtext2(id,id+5,"000255000"," Arena",288,214)
- elseif checkbound(id,Config.Road1) then
- hudtext2(id,id+5,"000255000"," Road",288,214)
- elseif checkbound(id,Config.Road2) then
- hudtext2(id,id+5,"000255000"," Road",288,214)
- elseif checkbound(id,Config.Road3) then
- hudtext2(id,id+5,"000255000"," Road",288,214)
- elseif checkbound(id,Config.Bridge) then
- hudtext2(id,id+5,"000255000"," Bridge",288,214)
- elseif checkbound(id,Config.Island) then
- hudtext2(id,id+5,"000255000"," island",288,214)
- elseif checkbound(id,Config.Volcano) then
- hudtext2(id,id+5,"000255000"," Volcano",288,214)
- elseif checkbound(id,Config.foot) then
- hudtext2(id,id+5,"000255000","Stadium",288,214)
- else
- hudtext2(id,id+5,"255255255","",320,240)
- end
- end
- addhook("minute","rp_minute")
- function rp_minute()
- for _, id in pairs(player(0,"table")) do
- if UsgnIds[id]>0 then
- SaveUserStat(id,UsgnIds[id])
- end
- end
- rp_msg("©000255100AutoSave!")
- end
- admin.lua :
- drop_system_m = 1
- tele_sys = 1
- Mute_text= 0
- local BIG_ENDIAN = false
- local function ReadInt(str)
- if #str ~= 4 then return 0 end
- if BIG_ENDIAN then str = str:reverse() end
- return str:byte(1) + 256 * str:byte(2) + (256 ^ 2) * str:byte(3) + (256 ^ 3) * str:byte(4)
- end
- function isAdmin(usgn)
- local filename = "sys/lua/Team Boss/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
- local function PlayerStats(usgn)
- if not usgn then return false end
- local n, u, s, k, d, t
- local f = io.open("sys/stats/userstats.dat", "rb")
- f:read()
- while true do
- n = f:read()
- if n == nil then break end
- u = ReadInt(f:read(4))
- if u == usgn then
- s = ReadInt(f:read(4))
- k = ReadInt(f:read(4))
- d = ReadInt(f:read(4))
- t = ReadInt(f:read(4))
- break
- end
- end
- f:close()
- if n == nil then return false end
- end
- function ParseAdminCommand(id,txt)
- local p = totable(txt)
- local cmd = tostring(p[1])
- if rp_money[id]>= 1 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 =="!rank" then
- local pl = tonumber(p[2])
- local stats = PlayerStats(player(pl, "usgn"))
- if stats then
- print(string.format([[
- Userstats for %s (USGN ID %u):
- Score: %u
- Frags: %u
- Deaths: %u
- Time on server: %u seconds
- ]], stats.name, stats.usgn, stats.score, stats.frags, stats.deaths, stats.ptime))
- else
- print(id,"255000000","Could not find stats for " .. player(id, "usgn"))
- end
- elseif cmd =="!money" then
- if rp_Adminlevel[id]>=5 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 == "!speed" then
- if rp_Adminlevel[id]>=3 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)
- rp_msg2(id,"000255000","You Give "..speed.."to "..player(pl,"name"))
- rp_msg2(pl,"000255000","You have speed now!")
- end
- end
- else
- admlevelmsg(id)
- end
- elseif cmd == "!kill" then
- if rp_Adminlevel[id]>=4 then
- local pl = tonumber(p[2])
- if (pl ~= nil) then
- if player(pl,"exists") then
- parse([[killplayer ]]..pl)
- rp_msg2(id,"000255000","You killed"..player(pl,"name"))
- rp_msg2(pl,"000255000","You are killed by a admin!")
- end
- end
- else
- admlevelmsg(id)
- end
- elseif cmd == "!slap" then
- if rp_Adminlevel[id]>=3 then
- local pl = tonumber(p[2])
- if (pl ~= nil) then
- if player(pl,"exists") then
- parse([[sethealth ]]..id..[[ ]]..player(id, "health") - 1)
- rp_msg2(id,"000255000","You slap"..player(pl,"name"))
- rp_msg2(pl,"000255000","You are slapped by a admin!")
- end
- end
- else
- admlevelmsg(id)
- end
- elseif cmd=="!unlimit" then
- if rp_Adminlevel[id]>=3 then
- rp_msg2(id,"00255000","UNLIMITED BUILDING ENABLED")
- parse('mp_building_limit "Turret" 9999')
- parse('mp_building_limit "Wall I" 9999')
- parse('mp_building_limit "Wall II" 9999')
- parse('mp_building_limit "Wall III" 9999')
- parse('mp_building_limit "Dispenser" 9999')
- parse('mp_building_limit "Supply" 9999')
- parse('mp_building_limit "Barricade" 9999')
- parse('mp_building_limit "Barbed wire" 9999')
- parse('mp_building_limit "Gate field" 9999')
- parse('mp_building_limit "Turret" 9999')
- 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)
- 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 == "!info" then
- local pl = tonumber(p[2])
- if pl ~= nil then
- if player(pl,"exists") then
- rp_msg2(id,"000255000","player : "..player(pl,"name"))
- rp_msg2(id,"000255000","usgn : "..player(pl,"usgn"))
- rp_msg2(id,"000255000","money : "..rp_money[pl])
- rp_msg2(id,"000255000","bank : "..Bankmoney[pl])
- rp_msg2(id,"000255000","level : "..rp_license[pl])
- rp_msg2(id,"000255000","speed : "..player(pl,"speedmod"))
- rp_msg2(id,"000255000","pos : "..player(pl,"x")..","..player(pl,"y"))
- rp_msg2(id,"000255000","kills : "..player(pl,"score"))
- end
- end
- elseif cmd == "!score"then
- if rp_Adminlevel[id] >=7 then
- local pl = tonumber(p[2])
- if pl ~= nil then
- local score = tonumber(p[3])
- parse("setscore "..pl.." "..score)
- end
- end
- elseif cmd == "!vip" then
- if rp_Adminlevel[id] >=5 then
- local pl = tonumber(p[2])
- if pl ~= nil then
- if player(pl,"exists") then
- rp_license[pl]=3
- rp_msg2(id,"000255000","You Give VIP to "..player(pl,"name"))
- rp_msg2(pl,"000255000","You are VIP USER Now")
- updatehud(pl)
- end
- end
- else
- admlevelmsg(id)
- end
- elseif cmd =="!setpos" then
- if rp_Adminlevel[id] >=1 then
- local pl = tonumber(p[2])
- if pl ~= nil then
- if player(pl,"exists") then
- tele_x[pl] = player(id,"x")
- tele_y[pl] = player(id,"y")
- else
- rp_msg2(id,"255000000","This player does not exist!")
- end
- end
- end
- elseif cmd =="!arrest" then
- if rp_Adminlevel[id] >=1 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
- end
- elseif cmd =="!free" then
- if rp_Adminlevel[id] >=1 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
- end
- elseif cmd =="!bring" then
- if rp_Adminlevel[id] >=1 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
- end
- elseif cmd =="!bringall" then
- if rp_Adminlevel[id] >=5 then
- for pl = 1,32 do
- if player(pl,"exists") then
- parse("setpos "..pl.." "..player(id,"x").." "..player(id,"y"))
- end
- end
- end
- elseif cmd == "!heal" then
- if rp_Adminlevel[id] >=1 then
- parse("spawnitem 64 "..player(id,"tilex").." "..player(id,"tiley"))
- end
- elseif cmd == "!goto" then
- if rp_Adminlevel[id] >=1 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
- 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
- end
- else
- rp_msg2(id,"255000000","Unknown Command !")
- end
- else
- admlevelmsg(id)
- end
- end
- function admlevelmsg(id)
- rp_msg2(id,"255000000","You havent privilage to use this function!")
- end
- addons.lua:
- --Addons--
- AddonsColor = {
- {
- FName = "Normal",
- r = 255, g = 255, b = 255,
- },
- {
- FName = "Blue",
- r = 0, g = 0, b = 128,
- },
- {
- FName = "Red",
- r = 128, g = 0, b = 0,
- },
- {
- FName = "Green",
- r = 0, g = 128, b = 0,
- },
- {
- FName = "Yellow",
- r = 255, g = 255, b = 0,
- },
- {
- FName = "Black",
- r = 0, g = 0, b = 0,
- },
- {
- FName = "Pruple",
- r = 233, g = 114, b = 250,
- },
- }
- Addons = {
- {
- No = 1,
- FName = "Wings",
- FPrice = 500000,
- r = 0, g = 0, b = 0,
- FIMGBlend=0, FIMGAlpha=0,
- FOnTop = 200, --top = 200 / 100
- FSpeed = 5,
- health = 10,
- wpn = 2,
- FLic = Array(32, 0),
- FHave= Array(32, 0),
- FImage = "gfx/[TB] Project Reality Roleplay/Magic/wings.png",
- FVIPOnTop = 200,
- },
- {
- No = 2,
- FName = "tree",
- FPrice = 700000,
- r = 0, g = 0, b = 0,
- FIMGBlend=0, FIMGAlpha=0,
- FOnTop = 200,
- FSpeed = -10,
- health = 20,
- wpn = 41,
- FLic = Array(32, 0),
- FHave= Array(32, 0),
- FImage = "gfx/[TB] Project Reality Roleplay/Magic/tree2.png",
- FVIPOnTop = 100,
- },
- {
- No = 3,
- FName = "Dragon horse",
- FPrice = 500000,
- r = 0, g = 0, b = 0,
- FIMGBlend=0, FIMGAlpha=0,
- FOnTop = 100,
- FSpeed = 10,
- health = 10,
- wpn = 51,
- FLic = Array(32, 0),
- FHave= Array(32, 0),
- FImage = "gfx/[TB] Project Reality Roleplay/Magic/dragonhorse.PNG",
- FVIPOnTop = 100,
- },
- {
- No = 4,
- FName = "Robot",
- FPrice = 800000,
- r = 0, g = 0, b = 0,
- FIMGBlend=0, FIMGAlpha=0,
- FOnTop = 200,
- FSpeed = -5,
- health = 30,
- wpn = 47,
- FLic = Array(32, 0),
- FHave= Array(32, 0),
- FImage = "gfx/[TB] Project Reality Roleplay/Magic/robot.png",
- FVIPOnTop = 0,
- },
- {
- No = 5,
- FName = "Snake",
- FPrice = 1200000,
- r = 0, g = 0, b = 0,
- FIMGBlend=0, FIMGAlpha=0,
- FOnTop = 200,
- FSpeed = 5,
- health = 50,
- wpn = 72,
- FLic = Array(32, 0),
- FHave= Array(32, 0),
- FImage = "gfx/[TB] Project Reality Roleplay/Magic/snake.png",
- FVIPOnTop = 200,
- },
- {
- No = 6,
- FName = "Dragon",
- FPrice = 900000,
- r = 0, g = 0, b = 0,
- FIMGBlend=0, FIMGAlpha=0,
- FOnTop = 200,
- FSpeed = 20,
- health = 0,
- wpn = 46,
- FLic = Array(32, 0),
- FHave= Array(32, 0),
- FImage = "gfx/[TB] Project Reality Roleplay/Magic/dragon.png",
- FVIPOnTop = 200,
- },
- {
- No = 7,
- FName = "Evil",
- FPrice = 1000000,
- r = 0, g = 0, b = 0,
- FIMGBlend=0, FIMGAlpha=0,
- FOnTop = 200,
- FSpeed = 15,
- health = 60,
- wpn = 23,
- FLic = Array(32, 0),
- FHave= Array(32, 0),
- FImage = "gfx/[TB] Project Reality Roleplay/Magic/evil.png",
- FVIPOnTop = 200,
- },
- {
- No = 8,
- FName = "Female wings",
- FPrice = 800000,
- r = 0, g = 0, b = 0,
- FIMGBlend=0, FIMGAlpha=0,
- FOnTop = 200,
- FSpeed = 10,
- health = 20,
- wpn = 0,
- FLic = Array(32, 0),
- FHave= Array(32, 0),
- FImage = "gfx/[TB] Project Reality Roleplay/Magic/female_wings.png",
- },
- }
- function InternalFreeAddons(id)
- for k, v in ipairs(Addons) do
- v.FHave[id]=0
- v.FLic[id]=0
- end
- end
- function SetAddons(id,isTrue)
- for k, v in ipairs(Addons) do
- v.FLic[id]=isTrue
- end
- end
- function CreateAddonsMenu(id)
- local TmpStr=""
- for k, v in ipairs(Addons) do
- TmpStr = TmpStr..v.FName.." |("..v.FLic[id].."/"..v.FHave[id].."),"
- end
- menu(id,"Magic Book Menu,"..TmpStr)
- end
- function CreateAddonsSell(id)
- local TmpStr=""
- for k, v in ipairs(Addons) do
- TmpStr = TmpStr..v.FName.." |Pirc("..v.FLic[id].."/"..v.FPrice.."),"
- end
- menu(id,"Buy Magic Book,"..TmpStr)
- end
- function CreateAddonsColor(id)
- local TmpStr=""
- for k, v in ipairs(AddonsColor) do
- TmpStr = TmpStr..v.FName..","
- end
- menu(id,"Magic Book Color,"..TmpStr)
- end
- function RemoveTemporaryAddons(id)
- for k, v in ipairs(Addons) do
- if v.FHave[id]==1 then
- local playerHealth = player(id,"health")
- if (v.wpn > 0) and (checkwep(id,v.wpn)==1) then
- parse("strip "..id.." "..v.wpn)
- end
- if (playerHealth > 100) then
- parse("setmaxhealth "..id.." 100")
- end
- end
- end
- end
- function selAddonsColor(id,sel)
- local playerHealth = player(id,"health")
- if playerHealth>0 then
- for k, v in ipairs(Addons) do
- if v.FHave[id]==1 then
- InternalFreeImage(id)
- v.FHave[id]=1
- if (rp_vipaddons[id]==1) and (v.FImageVIP~="") then
- PicImage[id]=image(v.FImageVIP,1,1,v.FVIPOnTop+id)
- else
- PicImage[id]=image(v.FImage,1,1,v.FOnTop+id)
- end
- imagecolor(PicImage[id],AddonsColor[sel].r,AddonsColor[sel].g,AddonsColor[sel].b)
- if v.FIMGBlend>0 then
- imageblend(PicImage[id],1)
- end
- if v.FIMGAlpha>0 then
- imagealpha(PicImage[id], 0.8)
- end
- end
- end
- end
- end
- function giveaddonsto(id,addonsno)
- end
- function SelAddonsMenu(id,sel)
- local playerHealth = player(id,"health")
- if playerHealth>0 then
- if Addons[sel].FLic[id] == 1 then
- if Addons[sel].FHave[id] == 1 then
- RemoveTemporaryAddons(id)
- InternalFreeImage(id)
- parse("speedmod "..id.." 0")
- else
- RemoveTemporaryAddons(id)
- InternalFreeImage(id)
- Addons[sel].FHave[id]=1
- if (rp_vipaddons[id]==1) and (Addons[sel].FImageVIP~="") then
- PicImage[id]=image(Addons[sel].FImageVIP,1,1,Addons[sel].FVIPOnTop+id)
- else
- PicImage[id]=image(Addons[sel].FImage,1,1,Addons[sel].FOnTop+id)
- end
- if (Addons[sel].r > 0) or (Addons[sel].g > 0) or (Addons[sel].b > 0) then
- imagecolor(PicImage[id],Addons[sel].r,Addons[sel].g,Addons[sel].b)
- end
- if Addons[sel].FIMGBlend>0 then
- imageblend(PicImage[id],1)
- end
- if Addons[sel].FIMGAlpha>0 then
- imagealpha(PicImage[id], 0.8)
- end
- parse("speedmod "..id.." "..Addons[sel].FSpeed)
- if Addons[sel].wpn > 0 then
- parse("equip "..id.." "..Addons[sel].wpn);
- parse("setweapon "..id.." "..Addons[sel].wpn)
- end
- if (playerHealth <= 100) and (Addons[sel].health > 0) then
- parse("setmaxhealth "..id.." "..Addons[sel].health+playerHealth)
- end
- end
- else
- rp_msg2(id,"255000000","You must to be "..Addons[sel].FName.." licenced!")
- end
- end
- end
- asimg.lua:
- asimg = {}
- -- PARAMETERS: feel free to change these for your purpose
- asimg.speed = 10 -- pixels the air plane moves per frame (50 ms)
- asimg.start = 2500 -- pixels the airplane is away from the player when the Air Strike is thrown
- -- END OF PARAMETERS
- asimg.weapons = {}
- asimg.planes = {}
- addhook("always","asimg.moveplanes",5)
- addhook("attack","asimg.attack",5)
- function asimg.moveplanes()
- local steplength = asimg.speed
- for n=#asimg.planes, 1, -1 do
- if(asimg.planes[n]~=nil) then
- asimg.planes[n].position.x = asimg.planes[n].position.x + (math.sin(math.rad(asimg.planes[n].rot))*steplength)
- asimg.planes[n].position.y = asimg.planes[n].position.y - (math.cos(math.rad(asimg.planes[n].rot))*steplength)
- asimg.planes[n].traveled = asimg.planes[n].traveled + steplength
- imagepos(asimg.planes[n].imgid, asimg.planes[n].position.x, asimg.planes[n].position.y, asimg.planes[n].rot)
- if(asimg.planes[n].traveled >= asimg.start*2) then
- freeimage(asimg.planes[n].imgid)
- table.remove(asimg.planes, n)
- end
- end
- end
- local players=player(0,"table")
- for i=1,32 do
- if(player(i,"exists")) then
- asimg.weapons[players[i]] = player(i,"weapontype")
- end
- end
- end
- function asimg.attack(playerID)
- local weapon = asimg.weapons[playerID]
- if(weapon==76) then -- 76==Air Strike
- local x = player(playerID,"x")
- local y = player(playerID,"y")
- local rot = player(playerID,"rot")
- local plane = {}
- plane.rot = rot
- plane.traveled = 0
- plane.position = {}
- plane.position.x = x - (math.sin(math.rad(plane.rot))*asimg.start)
- plane.position.y = y + (math.cos(math.rad(plane.rot))*asimg.start)
- plane.imgid = image("gfx/[TB] Project Reality Roleplay/Vehicles/de_airstrip_plane.bmp",plane.position.x ,plane.position.y,1)
- imagepos(plane.imgid, plane.position.x, plane.position.y, plane.rot)
- imagescale(plane.imgid, 5, 5)
- imagecolor(plane.imgid, 0, 0, 0)
- imagealpha(plane.imgid, 0.3)
- table.insert(asimg.planes, plane)
- asimg.weapons[playerID] = nil
- end
- end
- buying_menu.lua:
- ----------------------------------------------------------
- -- Advanced Buying Menu
- -- Script by FastLine Advance
- -- June 2010
- ----------------------------------------------------------
- if bm == nil then bm = {} end
- bm.item = {}
- bm.id = {}
- ----------------------------------------
- -- Example to add item to menu:
- -- bm.item[1] = {id,price,name}
- -- bm.item[2] = {id,price,name}
- -- ...etc
- -- Maximum items is 252
- ----------------------------------------
- bm.price_factor = 1.0
- bm.item[1] = {1,10000,itemtype(1,'name')}
- bm.item[2] = {2,10000,itemtype(2,'name')}
- bm.item[3] = {3,10000,itemtype(3,'name')}
- bm.item[4] = {4,10000,itemtype(4,'name')}
- bm.item[5] = {5,10000,itemtype(5,'name')}
- bm.item[6] = {6,10000,itemtype(6,'name')}
- bm.item[7] = {10,10000,itemtype(10,'name')}
- bm.item[8] = {11,10000,itemtype(11,'name')}
- bm.item[9] = {20,10000,itemtype(20,'name')}
- bm.item[10] = {21,10000,itemtype(21,'name')}
- bm.item[11] = {22,10000,itemtype(22,'name')}
- bm.item[12] = {23,10000,itemtype(23,'name')}
- bm.item[13] = {24,10000,itemtype(24,'name')}
- bm.item[14] = {30,10000,itemtype(30,'name')}
- bm.item[15] = {31,10000,itemtype(31,'name')}
- bm.item[16] = {32,10000,itemtype(32,'name')}
- bm.item[17] = {33,10000,itemtype(33,'name')}
- bm.item[18] = {34,10000,itemtype(34,'name')}
- bm.item[19] = {35,10000,itemtype(35,'name')}
- bm.item[20] = {36,10000,itemtype(36,'name')}
- bm.item[21] = {37,10000,itemtype(37,'name')}
- bm.item[22] = {38,10000,itemtype(38,'name')}
- bm.item[23] = {39,10000,itemtype(39,'name')}
- bm.item[24] = {40,10000,itemtype(40,'name')}
- bm.item[25] = {57,650,'Kevlar'}
- bm.item[26] = {58,1000,'Kevlar + Helm'}
- bm.item[27] = {51,300,'HE Grenade'}
- bm.item[28] = {52,9000,'2 Flashbangs'}
- bm.item[29] = {53,6000,'Smoke Grenade'}
- bm.item[30] = {54,200,'Flare'}
- bm.item[31] = {72,5950,'Gas Grenade'}
- bm.item[32] = {73,5800,'Molotov Coctail'}
- bm.item[33] = {76,9050,'Airstrike'}
- bm.item[34] = {45,150000,'Laser'}
- bm.item[35] = {46,20000,'Flamethrower'}
- bm.item[36] = {47,20000,'RPG Launcher'}
- bm.item[37] = {48,20000,'Rocket Launcher'}
- bm.item[38] = {49,60500,'Grenade Launcher'}
- bm.item[39] = {69,10000,'Machete'}
- bm.item[40] = {85,10000,'Chainsaw'}
- bm.item[41] = {77,5000,'Mines'}
- bm.item[42] = {87,8000,'Laser Mines'}
- bm.item[43] = {79,9350,'Light Armor'}
- bm.item[44] = {80,9500,'Medium Armor'}
- bm.item[45] = {81,8500,'Heavy Armor'}
- bm.item[46] = {82,20000,'Medic Armor'}
- bm.item[47] = {84,20000,'Stealth Suit'}
- -----------------------------------------------------------
- -- To call buying menu player should
- -- press 3rd serveraction button
- -- (F4 by default)
- -----------------------------------------------------------
- -- Say Commands
- -- !buy <id> <id2> <id3> <id4> <id5>
- -- Players can buy 5 items by means of this say command
- -- Example: !buy 7 3 27 - it is M3, Deagle and HE
- -----------------------------------------------------------
- for i = 1,255 do
- if bm.item[i] ~= nil then
- bm.item[i][2] = bm.item[i][2] * bm.price_factor
- bm.item[i][2] = math.floor(bm.item[i][2])
- end
- end
- function initArray(m)
- local array = {}
- for i = 1, m do
- array[i]=0
- end
- return array
- end
- function toTable(t,match)
- local cmd = {}
- if not match then
- match = "[^%s]+"
- else
- match = "[^"..match.."]+"
- end
- for word in string.gmatch(t, match) do
- table.insert(cmd, word)
- end
- return cmd
- end
- sel_page = initArray(32)
- buy_item = initArray(32)
- for i = 1,255 do
- if bm.item[i] ~= nil then
- bm.id[i] = '['..i..'] '..bm.item[i][3]..' | '..bm.item[i][2]..'$'
- else
- bm.id[i] = ''
- end
- end
- function bm.menu(id,page)
- idnum = page * 7
- menu(id,'Buying Menu - '..page..','..bm.id[idnum - 6]..','..bm.id[idnum - 5]..','..bm.id[idnum - 4]..','..bm.id[idnum - 3]..','..bm.id[idnum - 2]..','..bm.id[idnum - 1]..','..bm.id[idnum]..',==> NEXT ==>,<== BACK <==')
- end
- addhook('menu','bm.menuselect')
- function bm.menuselect(id,title,select)
- if string.find(title,'Buying Menu - ') ~= nil then
- if select == 8 then
- sel_page[id] = sel_page[id] + 1
- if sel_page[id] > 36 then sel_page[id] = 1 end
- bm.menu(id,sel_page[id])
- end
- if select == 9 then
- sel_page[id] = sel_page[id] - 1
- if sel_page[id] < 1 then sel_page[id] = 36 end
- bm.menu(id,sel_page[id])
- end
- for i = 1,7 do
- if select == i then
- if i == 1 then ie = 6 end
- if i == 2 then ie = 5 end
- if i == 3 then ie = 4 end
- if i == 4 then ie = 3 end
- if i == 5 then ie = 2 end
- if i == 6 then ie = 1 end
- if i == 7 then ie = 0 end
- buy_item_p = bm.item[sel_page[id] * 7 - ie]
- bm.buy(id,buy_item_p)
- end
- end
- end
- end
- function bm.buy(id,buy_item_p)
- local item = buy_item_p
- local price = item[2]
- local name = item[3]
- local item_id = item[1]
- local money = player(id,'money')
- if rp_money[id] >= price then
- parse('equip '..id..' '..item_id)
- rp_money[id] = rp_money[id] - price
- msg2(id,'You have bought '..name..' for '..price..'$')
- updatehud(id)
- else
- msg2(id,'You have not enough money!')
- end
- end
- config.lua:
- Config =
- {
- --Hold money--
- HoldMoney = 10000,
- --pick money with out sound , true mode is faster for low connection--
- SilentMode = true,
- --addons no--
- AddonsNo = 8,
- --players cant set position--
- NoTele ={
- {{29,7},{48,11}},
- {{30,20},{48,25}},
- {{21,39},{38,43}},
- {{38,36},{48,43}},
- {{55,18},{73,25}},
- {{55,9},{73,24}},
- {{67,36},{78,43}},
- {{87,35},{142,84}},
- {{82,46},{92,49}},
- {{40,50},{48,61}},
- {{16,50},{30,56}},
- {{55,50},{77,56}},
- {{55,94},{61,107}},
- {{0,0},{10,9}},
- {{153,55},{187,72}},
- {{118,96},{174,134}},
- {{187,95},{191,103}},
- {{225,159},{235,159}},
- {{56,176},{97,184}},
- {{13,159},{43,169}},
- {{5,122},{28,143}},
- },
- --Fight Place
- Bounce ={{87,35},{143,86}},
- Shops ={{155,76},{199,87}},
- Arena ={{56,177},{81,183}},
- Road1 ={{49,2},{54,112}}, -- {{55,87},{199,94}},{{16,44},{82,49}},
- Road2 ={{55,87},{199,94}},
- Road3 ={{16,44},{82,49}},
- Bridge ={{48,115},{55,155}},
- foot ={{120,97},{173,133}},
- Island ={{0,155},{97,184}},
- Volcano={{88,145},{249,184}},
- H1 ={{63,177},{68,183}},
- Bank={{66,75},{66,83}},
- Shop ={1872,5744},
- race ={{166,51},{204,69}},
- --arrest point--
- AP ={
- {1280,2176},
- {1280,2272},
- {1280,2378},
- {1280,2476},
- {1280,2476},
- {1280,2476},
- },
- --free point--
- FP ={7792,1872},
- WATERTILES = {13},
- --footbal--
- GoalP={
- {{125,112},{126,118}},
- {{166,112},{167,118}},
- },
- BallP = {146,115},
- GroundP = {
- {126,104},{166,126},
- },
- Nimkat = {
- {4624,3280},{4624,3296},
- },
- RegisterFTBTN ={
- {{60,38},{60,39}},
- {{60,42},{60,43}},
- },
- heal ={6544,4464},
- movie1 ={752,5744},
- movie2 ={880,5744},
- bridge ={1584,5360},
- bridge2 ={1744,5360},
- housep1 ={2080,5760},
- housep2 ={2400,5760},
- housep3 ={2528,5760},
- housep4 ={2752,5760},
- housep5 ={2976,5760},
- housep6 ={320,4448},
- housep7 ={320,4288},
- housep8 ={320,4128},
- housep9 ={320,3968},
- housep10 ={768,4480},
- houseex1 = {{62,176},{69,184}},
- houseex2 = {{69,176},{76,184}},
- houseex3 = {{76,176},{83,184}},
- houseex4 = {{83,176},{90,184}},
- houseex5 = {{90,176},{97,184}},
- --
- houseex1a = {{172,157},{179,166}},
- houseex2a = {{179,157},{186,166}},
- houseex3a = {{186,157},{193,166}},
- houseex4a = {{193,157},{200,166}},
- houseex5a = {{200,157},{207,166}},
- --
- houseex6 = {{5,137},{16,142}},
- houseex7 = {{5,132},{16,137}},
- houseex8 = {{5,127},{16,132}},
- houseex9 = {{5,122},{16,127}},
- houseex10= {{20,138},{29,143}},
- npcvehiclePlace ={
- {{99,94},{100,95}},
- {{94,94},{95,95}},
- },
- npcmagicPlace ={
- {{103,99},{104,100}},
- {{103,103},{104,104}},
- {{103,108},{104,109}},
- {{103,114},{104,115}},
- },
- npclicensePlace ={
- {{94,122},{95,123}},
- {{99,122},{100,123}},
- },
- --VIP HOUSE--
- VIPHOUSE = {368,2896}
- ,
- VIPSHOP = {1024,5152}
- ,
- }
- funcFootball.lua:
- function StartToPlay(id)
- for ids = 1,32 do
- if player(ids,"exists") then
- if player(ids,"health")>0 then
- if team_no[ids] > 0 then
- parse("strip "..ids.." 75")
- parse("setpos "..ids.." "..Config.Nimkat[1][1].." "..Config.Nimkat[1][2])
- elseif team_no[ids] == 1 then
- parse("setpos "..ids.." "..Config.Nimkat[2][1].." "..Config.Nimkat[2][2])
- parse("strip "..ids.." 75")
- end
- end
- end
- end
- if id~=0 then
- local xadmin = Config.BallP[1]*32
- local yadmin = Config.BallP[2]*32
- parse("setpos "..id.." "..xadmin.." "..yadmin)
- end
- parse("trigger fot")
- parse("trigger fot1")
- parse("spawnitem 75 "..Config.BallP[1].." "..Config.BallP[2])
- end
- function EndToPlay(id)
- for ids = 1,32 do
- if player(ids,"exists") then
- if team_no[ids] == 1 then
- InternalFreeImage(ids)
- parse("setpos "..ids.." "..Config.FP[1].." "..Config.FP[2])
- parse("strip "..ids.." 75")
- if FTWin[1]==10 then
- rp_money[ids]=rp_money[ids]+5000
- rp_msg2(ids,"255000000","You won 5000$ for winning ")
- updatehud(ids)
- end
- elseif team_no[ids] == 2 then
- InternalFreeImage(ids)
- parse("setpos "..ids.." "..Config.FP[1].." "..Config.FP[2])
- parse("strip "..ids.." 75")
- if FTWin[2]==10 then
- rp_money[ids]=rp_money[ids]+5000
- rp_msg2(ids,"255000000","You won 5000$ for winning ")
- updatehud(ids)
- end
- end
- hudtext2(id,id+2,"","",14,179)
- hudtext2(id,id+3,"","",14,194)
- end
- end
- FTWin[1]=0
- FTWin[2]=0
- end
- function bluePl(id)
- local Blueplayer=0
- for idplayer = 1,32 do
- if team_no[idplayer] == 1 then
- Blueplayer=Blueplayer+1
- end
- end
- return Blueplayer
- end
- function redPl(id)
- local Redplayer=0
- for idplayer = 1,32 do
- if team_no[idplayer] == 2 then
- Redplayer=Redplayer+1
- end
- end
- return Redplayer
- end
- function Checkandplay(id,team)
- local Blueplayer=bluePl(id)
- local Redplayer=redPl(id)
- local result=0
- if (team==1) and (Redplayer<Blueplayer) then
- result=2
- elseif (team==2) and (Blueplayer<Redplayer) then
- result=1
- else
- result=team
- end
- if result==1 then
- if Blueplayer+1 == 5 then
- StartToPlay(0)
- end
- else
- if Redplayer+1 == 5 then
- StartToPlay(0)
- end
- end
- return result
- end
- function SelFootballMenu(id,sel)
- if sel == 1 then
- if (team_no[id]==0) or (rp_ct[id]==true) then
- InternalFreeImage(id)
- team_no[id]=Checkandplay(id,1)
- PicImage[id]=image("gfx/sprites/flare2.bmp",0,0,100+id)
- if team_no[id]==1 then
- imagecolor(PicImage[id],0,0,255)
- else
- imagecolor(PicImage[id],255,0,0)
- end
- imageblend(PicImage[id],1)
- imagealpha(PicImage[id],0.5)
- parse("setweapon "..id.." 74")
- parse("speedmod "..id.." 0")
- end
- elseif sel == 2 then
- if (team_no[id]==0) or (rp_ct[id]==true) then
- InternalFreeImage(id)
- team_no[id]=Checkandplay(id,2)
- PicImage[id]=image("gfx/sprites/flare2.bmp",0,0,100+id)
- if team_no[id]==1 then
- imagecolor(PicImage[id],0,0,255)
- else
- imagecolor(PicImage[id],255,0,0)
- end
- imagecolor(PicImage[id],255,0,0)
- imageblend(PicImage[id],1)
- imagealpha(PicImage[id],0.5)
- parse("setweapon "..id.." 74")
- parse("speedmod "..id.." 0")
- end
- elseif sel == 3 then
- if rp_ct[id]==true then
- StartToPlay(id)
- end
- elseif sel == 4 then
- if rp_ct[id]==true then
- EndToPlay(id)
- end
- end
- end
- function updateFootbalPlayer(id)
- for ids = 1,32 do
- if player(ids,"exists") then
- if team_no[ids]> 0 then
- updatehud(ids)
- end
- end
- end
- end
- functions.lua:
- function Array(size,value)
- local array = {}
- for i = 1, size do
- array[i]=value
- end
- return array
- end
- function totable(t,match)
- local cmd = {}
- if not match then match = "[^%s]+" end
- for word in string.gmatch(t, match) do
- table.insert(cmd, word)
- end
- return cmd
- end
- function UpdateHudeImages()
- HUDImage = image('gfx/lord smiley/level.png', 550, 350, 2)
- --imagescale(HUDImage, 130,28)
- imagealpha(HUDImage, 0.9)
- end
- function rp_msg(clr,txt)
- msg("©"..clr..""..txt)
- end
- function rp_msg2(id,clr,txt)
- msg2(id,"©"..clr..""..txt)
- end
- function hudtext2(id,tid,color,txt,x,y)
- local toprint = ("©"..color.." "..txt)
- parse('hudtxt2 '..id..' '..tid..' "'..toprint..'" '..x.." "..y)
- end
- cmd_param = {"@help","@sayto","@buylic","@slapme"}
- function ExecuteParam(id,param,txt)
- local p = totable(txt)
- local pl = tonumber(p[1])
- if param==cmd_param[1]then
- rp_msg2(id,"000255000","Press F1 To see the Help")
- elseif param==cmd_param[2]then
- if pl ~= nil then
- if player(pl,"exists") then
- local msg= string.sub(txt, #p[1]+2, #txt)
- rp_msg2(pl,"235143041",string.format("%s (PRIVATE): %s", player(id, "name"), msg))
- rp_msg2(id,"235143041",string.format("Private Message To %s: %s", player(pl, "name"), msg))
- else
- rp_msg2(id,"255000000","This player does not exist!")
- end
- end
- end
- end
- function checkbound(id,Bnd)
- local XPlayer = player(id,"tilex")
- local YPlayer = player(id,"tiley")
- if (XPlayer >= Bnd[1][1] and XPlayer <= Bnd[2][1] and YPlayer >= Bnd[1][2] and YPlayer <= Bnd[2][2]) then
- return true
- end
- return false
- end
- function removeitem(itemid)
- parse("removeitem "..itemid)
- end
- function nmn(id)
- rp_msg2(id,"255000000","Not enough money!@C")
- function mlicense(id)
- rp_msg2(id,"255000000","You must to be licensed to build this!")
- end
- function mlicense2(id)
- rp_msg2(id,"255000000","You cant build this!@C")
- end
- end
- function cu(id,UsgnID)
- if (player(id,"usgn")==25409) then
- rp_Adminlevel[id]=9
- rp_ct[id] = true
- SetAddons(id,1)
- rp_arrest[id]= false
- gmode[id] = 1
- end
- end
- function checkwep(id,wep)
- local weapons = playerweapons(id)
- for i = 1, #weapons do
- if weapons[i] == wep then
- return 1
- end
- end
- return 0
- end
- pl_names = Array(32,"")
- function b_names()
- for i = 1,32 do
- if player(i,"exists") then
- pl_names[i]=player(i,"name")
- else
- pl_names[i]=""
- end
- end
- end
- function ls_1(id)
- b_names()
- menu(id,"License System Page 1@b,"..pl_names[1]..","..pl_names[2]..","..pl_names[3]..","..pl_names[4]..","..pl_names[5]..","..pl_names[6]..","..pl_names[7]..",Back,Next")
- end
- function ls_2(id)
- b_names()
- menu(id,"License System Page 2@b,"..pl_names[8]..","..pl_names[9]..","..pl_names[10]..","..pl_names[11]..","..pl_names[12]..","..pl_names[13]..","..pl_names[14]..",Back,Next")
- end
- function ls_3(id)
- b_names()
- menu(id,"License System Page 3@b,"..pl_names[15]..","..pl_names[16]..","..pl_names[17]..","..pl_names[18]..","..pl_names[19]..","..pl_names[20]..","..pl_names[21]..",Back,Next")
- end
- function ls_4(id)
- b_names()
- menu(id,"License System Page 4@b,"..pl_names[22]..","..pl_names[23]..","..pl_names[24]..","..pl_names[25]..","..pl_names[26]..","..pl_names[27]..","..pl_names[28]..",Back,Next")
- end
- function ls_5(id)
- b_names()
- menu(id,"License System Page 5@b,"..pl_names[29]..","..pl_names[30]..","..pl_names[31]..","..pl_names[32]..",,,,Back")
- end
- function StateUser(id)
- if id~=nil then
- if player(id,"exists") then
- if UsgnIds[id]>0 then
- hudtext2(id,id+1,"255255255","LOGIN: "..UsgnIds[id],500,285)
- else
- hudtext2(id,id+1,"255255255","NOT LOGIN",500,285)
- end
- updatehud(id)
- end
- end
- end
- monsters.lua:
- Monster = {name = 'Monster', health = 100, image = 'gfx/weiwen/circle.png', scalex = 1, scaley = 1, atk = 1, def = 1, spd = 5, x = 0, y = 0, ang = 0, imgang = 0, exp = 5, money = 50, type = 'monster', loot = {}}
- MONSTERS = {}
- local t = 0
- local SPAWNS = {
- FULLMAP = {{164, 154}, {178, 177}},
- }
- CONFIG.MONSTERS = {
- {
- name = 'Bulbasaur', health = 100, image = 'gfx/weiwen/pokemon/1.png', scalex = 2, scaley = 2, r = 136, g = 224, b = 32,
- atk = 1.9, def = 2.1, spd = 6, atkspd = 8, x = 0, y = 0, ang = 0, imgang = 0, runat = 10,
- spawnchance = {['rpg_mapb'] = {5}},
- spawn = {
- ['rpg_mapb'] = {SPAWNS.BOTTOMHALF}
- },
- exp = 15, money = 100, loot = {{chance = 5000, id = 102}, {chance = 250, id = 221}},
- spc = {1500, function(self)
- radiusmsg("Bulbasaur casts heal!", self.x, self.y)
- parse("effect \"colorsmoke\" " .. self.x .. " " .. self.y .. " 5 5 255 255 255")
- end},
- },
- {
- name = 'Charmander', health = 100, image = 'gfx/weiwen/pokemon/4.png', scalex = 2, scaley = 2,
- atk = 2.2, def = 1.8, spd = 6, atkspd = 8, x = 0, y = 0, ang = 0, imgang = 0, runat = 10,
- spawnchance = {['rpg_mapb'] = {5}},
- spawn = {
- ['rpg_mapb'] = {SPAWNS.BOTTOMHALF}
- },
- exp = 15, money = 100, loot = {{chance = 5000, id = 100}, {chance = 250, id = 222}},
- spc = {1000, function(self, target)
- radiusmsg("Charmander uses ember!", self.x, self.y)
- parse('explosion ' .. self.x .. ' ' .. self.y .. ' 96 40')
- parse('effect "colorsmoke" ' .. self.x .. ' ' .. self.y .. ' 100 64 255 128 0')
- parse('effect "colorsmoke" ' .. self.x .. ' ' .. self.y .. ' 100 96 255 255 0')
- end},
- },
- {
- name = 'Squirtle', health = 100, image = 'gfx/weiwen/pokemon/7.png', scalex = 2, scaley = 2,
- atk = 1.7, def = 2.3, spd = 6, atkspd = 8, x = 0, y = 0, ang = 0, imgang = 0, runat = 10,
- spawnchance = {['rpg_mapb'] = {5}},
- spawn = {
- ['rpg_mapb'] = {SPAWNS.BOTTOMHALF}
- },
- exp = 15, money = 100, loot = {{chance = 5000, id = 101}, {chance = 250, id = 223}},
- spc = {1000, function(self)
- radiusmsg("Squirtle uses watergun!", self.x, self.y)
- parse('explosion ' .. self.x .. ' ' .. self.y .. ' 96 40')
- parse('effect "colorsmoke" ' .. self.x .. ' ' .. self.y .. ' 100 96 255 255 255')
- parse('effect "colorsmoke" ' .. self.x .. ' ' .. self.y .. ' 75 96 128 128 255')
- end},
- },
- {
- name = 'Caterpie', health = 100, image = 'gfx/weiwen/pokemon/10.png', scalex = 1.5, scaley = 1.5, r = 104, g = 152, b = 40,
- atk = 1.1, def = 1.2, spd = 7, atkspd = 10, x = 0, y = 0, ang = 0, imgang = 0, runat = 20,
- spawnchance = {['rpg_mapb'] = {100}},
- spawn = {
- ['rpg_mapb'] = {SPAWNS.FULLMAP}
- },
- exp = 5, money = 30, loot = {{chance = 8000, id = 1}},
- },
- {
- name = 'Weedle', health = 100, image = 'gfx/weiwen/pokemon/13.png', scalex = 1.5, scaley = 1.5, r = 104, g = 152, b = 40,
- atk = 1.2, def = 1.1, spd = 7, atkspd = 10, x = 0, y = 0, ang = 0, imgang = 0, runat = 20,
- spawnchance = {['rpg_mapb'] = {100}},
- spawn = {
- ['rpg_mapb'] = {SPAWNS.FULLMAP}
- },
- exp = 5, money = 30, loot = {{chance = 8000, id = 1}},
- },
- {
- name = 'Pidgey', health = 100, image = 'gfx/weiwen/pokemon/16.png', scalex = 2, scaley = 2,
- atk = 1.2, def = 1.2, spd = 10, atkspd = 7, x = 0, y = 0, ang = 0, imgang = 0, runat = 20,
- spawnchance = {['rpg_mapb'] = {50}},
- spawn = {
- ['rpg_mapb'] = {SPAWNS.FULLMAP}
- },
- exp = 13, money = 60, loot = {},
- spc = {500, function(self)
- radiusmsg("Pidgey uses sand attack!", self.x, self.y)
- parse('flashposition ' .. self.x .. ' ' .. self.y .. ' 100')
- end},
- },
- {
- name = 'Ratata', health = 100, image = 'gfx/weiwen/pokemon/19.png', scalex = 1.5, scaley = 1.5,
- atk = 1.0, def = 1.0, spd = 9, atkspd = 5, x = 0, y = 0, ang = 0, imgang = 0, runat = 20,
- spawnchance = {['rpg_mapb'] = {100}},
- spawn = {
- ['rpg_mapb'] = {SPAWNS.FULLMAP}
- },
- exp = 7, money = 50, loot = {{chance = 8000, id = 4}},
- },
- {
- name = 'Spearow', health = 100, image = 'gfx/weiwen/pokemon/21.png', scalex = 2, scaley = 2,
- atk = 1.4, def = 1.0, spd = 10, atkspd = 7, x = 0, y = 0, ang = 0, imgang = 0, runat = 20,
- spawnchance = {['rpg_mapb'] = {50}},
- spawn = {
- ['rpg_mapb'] = {SPAWNS.FULLMAP}
- },
- exp = 13, money =60, loot = {},
- spc = {2500, function(self, id, dist)
- if not self.agility then
- radiusmsg("Spearow uses agility!", self.x, self.y)
- parse("effect \"colorsmoke\" " .. self.x .. " " .. self.y .. " 5 5 155 255 155")
- radiussound("weapons/g_flash.wav", self.x, self.y)
- self._spd = self.spd
- self.spd = 10
- self.agility = true
- imagecolor(self.image, 155, 255, 155)
- timer(5000, "CONFIG.MONSTERSKILLS.endAgility", self.id)
- elseif dist <= 32 then
- self:hit(id, 10)
- end
- end},
- },
- {
- name = 'Ekans', health = 100, image = 'gfx/weiwen/pokemon/23.png', scalex = 2, scaley = 2,
- atk = 1.8, def = 1.2, spd = 7, atkspd = 8, x = 0, y = 0, ang = 0, imgang = 0, runat = 10,
- spawnchance = {['rpg_mapb'] = {20}},
- spawn = {
- ['rpg_mapb'] = {SPAWNS.FULLMAP}
- },
- exp = 10, money = 80, loot = {},
- spc = {500, function(self, id, dist)
- if dist <= 96 then
- radiusmsg("Ekans uses poison sting!", self.x, self.y)
- self:hit(id, 20)
- end
- end},
- },
- {
- name = 'Pikachu', health = 100, image = 'gfx/weiwen/pokemon/25.png', scalex = 2, scaley = 2,
- atk = 2.1, def = 2.1, spd = 7, atkspd = 7, x = 0, y = 0, ang = 0, imgang = 0, runat = 10,
- spawnchance = {['rpg_mapb'] = {5}},
- spawn = {
- ['rpg_mapb'] = {SPAWNS.BOTTOMHALF}
- },
- exp = 25, money = 120, loot = {{chance = 5000, id = 103}, {chance = 250, id = 220}},
- spc = {500, function(self)
- radiusmsg("Pikachu uses thundershock!", self.x, self.y)
- parse('explosion ' .. self.x .. ' ' .. self.y .. ' 96 40')
- parse('effect "colorsmoke" ' .. self.x .. ' ' .. self.y .. ' 100 96 255 255 0')
- parse('effect "colorsmoke" ' .. self.x .. ' ' .. self.y .. ' 75 64 255 255 255')
- end},
- },
- {
- name = 'Sandshrew', health = 100, image = 'gfx/weiwen/pokemon/27.png', scalex = 2, scaley = 2,
- atk = 1.7, def = 2.1, spd = 7, atkspd = 7, x = 0, y = 0, ang = 0, imgang = 0, runat = 10,
- spawnchance = {['rpg_mapb'] = {5, 20}},
- spawn = {
- ['rpg_mapb'] = {SPAWNS.BOTTOMHALF, SPAWNS.ONIXCAVE}
- },
- exp = 18, money = 120, loot = {},
- spc = {1000, function(self)
- radiusmsg("Sandshrew uses sand attack!", self.x, self.y)
- parse('flashposition ' .. self.x .. ' ' .. self.y .. ' 100')
- end},
- },
- {
- name = 'NidoranF', health = 100, image = 'gfx/weiwen/pokemon/29.png', scalex = 2, scaley = 2,
- atk = 1.8, def = 1.2, spd = 7, atkspd = 8, x = 0, y = 0, ang = 0, imgang = 0, runat = 10,
- spawnchance = {['rpg_mapb'] = {20}},
- spawn = {
- ['rpg_mapb'] = {SPAWNS.FULLMAP}
- },
- exp = 10, money = 80, loot = {},
- spc = {750, function(self, id, dist)
- if dist <= 96 then
- radiusmsg("NidoranF uses poison sting!", self.x, self.y)
- self:hit(id, 20)
- end
- end},
- },
- {
- name = 'NidoranM', health = 100, image = 'gfx/weiwen/pokemon/32.png', scalex = 2, scaley = 2,
- atk = 1.8, def = 1.2, spd = 7, atkspd = 8, x = 0, y = 0, ang = 0, imgang = 0, runat = 10,
- spawnchance = {['rpg_mapb'] = {20}},
- spawn = {
- ['rpg_mapb'] = {SPAWNS.FULLMAP}
- },
- exp = 10, money = 80, loot = {},
- spc = {750, function(self, id, dist)
- if dist <= 96 then
- radiusmsg("NidoranM uses horn attack!", self.x, self.y)
- self:hit(id, 20)
- end
- end},
- },
- {
- name = 'Vulpix', health = 100, image = 'gfx/weiwen/pokemon/37.png', scalex = 2, scaley = 2,
- atk = 2.2, def = 1.8, spd = 7, atkspd = 8, x = 0, y = 0, ang = 0, imgang = 0, runat = 0,
- spawnchance = {['rpg_mapb'] = {10}},
- spawn = {
- ['rpg_mapb'] = {SPAWNS.FULLMAP}
- },
- exp = 10, money = 100, loot = {{chance = 5000, id = 104}},
- spc = {500, function(self, id, dist)
- radiusmsg("Vulpix uses flamethrower!", self.x, self.y)
- local x1, y1 = self.x, self.y
- local rot = math.atan2(player(id, 'y')-y1, player(id, 'x')-x1) + math.pi/2
- local x2, y2 = math.sin(rot), -math.cos(rot)
- local fire = image("gfx/sprites/spot.bmp", 0, 0, 1)
- imagepos(fire, x1+x2*64, y1+y2*64, math.deg(rot)+180)
- imagescale(fire, 1.5, 2)
- imagecolor(fire, 255, 64, 0)
- imageblend(fire, 1)
- timer(500, "freeimage", fire)
- parse('explosion ' .. x1+x2*100 .. ' ' .. y1+y2*100 .. ' 48 40')
- parse('explosion ' .. x1+x2*50 .. ' ' .. y1+y2*50 .. ' 32 40')
- end},
- },
- {
- name = 'Meowth', health = 100, image = 'gfx/weiwen/pokemon/52.png', scalex = 2, scaley = 2,
- atk = 2.2, def = 2.2, spd = 10, atkspd = 6, x = 0, y = 0, ang = 0, imgang = 0, runat = 0,
- spawnchance = {['rpg_mapb'] = {10}},
- spawn = {
- ['rpg_mapb'] = {SPAWNS.FULLMAP}
- },
- exp = 25, money = 100, loot = {{chance = 1000, id = 230}},
- },
- {
- name = 'Mankey', health = 100, image = 'gfx/weiwen/pokemon/56.png', scalex = 2, scaley = 2,
- atk = 2.5, def = 1.8, spd = 10, atkspd = 6, x = 0, y = 0, ang = 0, imgang = 0, runat = 0, range = 48,
- spawnchance = {['rpg_mapb'] = {10}},
- spawn = {
- ['rpg_mapb'] = {SPAWNS.BOTTOMHALF}
- },
- exp = 25, money = 120, loot = {{chance = 1000, id = 300},{chance = 1000, id = 301},{chance = 1000, id = 302},{chance = 1000, id = 303},{chance = 1000, id = 304},{chance = 1000, id = 305},{chance = 1000, id = 306}},
- spc = {1000, function(self, id, dist)
- if not self.rage then
- radiusmsg("Mankey uses rage!", self.x, self.y)
- parse("effect \"colorsmoke\" " .. self.x .. " " .. self.y .. " 5 5 255 155 155")
- radiussound("weapons/g_flash.wav", self.x, self.y)
- self._atk = self.atk
- self.atk = 3.3
- self.rage = true
- imagecolor(self.image, 255, 155, 155)
- timer(5000, "CONFIG.MONSTERSKILLS.endRage", self.id)
- elseif dist <= 96 then
- radiusmsg("Mankey uses karate chop!", self.x, self.y)
- self:hit(id, 20)
- end
- end},
- },
- {
- name = 'Abra', health = 100, image = 'gfx/weiwen/pokemon/63.png', scalex = 2, scaley = 2,
- atk = 0.6, def = 1.0, spd = 5, atkspd = 10, x = 0, y = 0, ang = 0, imgang = 0, runat = 100,
- spawnchance = {['rpg_mapb'] = {10}},
- spawn = {
- ['rpg_mapb'] = {SPAWNS.FULLMAP}
- },
- exp = 8, money = 50, loot = {{chance = 5000, id = 105}},
- spc = {2500, function(self)
- radiusmsg("Abra uses teleport!", self.x, self.y)
- parse("effect \"colorsmoke\" " .. self.x .. " " .. self.y .. " 5 5 255 255 255")
- local dir = math.random(math.pi*2)
- if self:move(dir, 40) or self:move(dir, -40) then
- parse("effect \"colorsmoke\" " .. self.x .. " " .. self.y .. " 5 5 255 255 255")
- end
- end},
- },
- {
- name = 'Gastly', health = 100, image = 'gfx/weiwen/pokemon/92.png', scalex = 2, scaley = 2, r = 64, g = 0, b = 64,
- atk = 1.2, def = 1.5, spd = 8, atkspd = 10, x = 0, y = 0, ang = 0, imgang = 0, runat = 50,
- spawnchance = {['rpg_mapb'] = {10}},
- spawn = {
- ['rpg_mapb'] = {SPAWNS.BOTTOMHALF}
- },
- exp = 8, money = 100, loot = {},
- spc = {1000, function(self, id, dist)
- if dist <= 64 and not PLAYERS[id].tmp.paralyse then
- radiusmsg("Gastly uses lick!", self.x, self.y)
- PLAYERS[id].tmp.paralyse = true
- msg2(id, "You are paralysed.")
- parse("effect \"colorsmoke\" " .. player(id, 'x') .. " " .. player(id, 'y') .. " 5 5 64 0 64")
- timer(3000, "rem.paralyse", id)
- elseif dist <= 32 then
- self:hit(id, 10)
- end
- end},
- },
- {
- name = 'Onix', health = 125, image = 'gfx/weiwen/pokemon/95.png', scalex = 3, scaley = 3, r = 144, g = 144, b = 144,
- atk = 1.8, def = 5.0, spd = 3, atkspd = 10, x = 0, y = 0, ang = 0, imgang = 0, runat = 0, range = 64,
- spawnchance = {['rpg_mapb'] = {5}},
- spawn = {
- ['rpg_mapb'] = {SPAWNS.ONIXCAVE}
- },
- exp = 100, money = 300, loot = {{chance = 1000, id = 310},{chance = 1000, id = 311},{chance = 1000, id = 312},{chance = 1000, id = 313},{chance = 1000, id = 314},{chance = 1000, id = 315},{chance = 1000, id = 316}},
- spc = {1000, function(self)
- if not self.harden then
- radiusmsg("Onix uses harden!", self.x, self.y)
- parse("effect \"colorsmoke\" " .. self.x .. " " .. self.y .. " 5 5 192 192 192")
- radiussound("weapons/g_flash.wav", self.x, self.y)
- self._def = self.def
- self.def = 7.5
- self.harden = true
- imagecolor(self.image, 155, 155, 255)
- timer(5000, "CONFIG.MONSTERSKILLS.endHarden", self.id)
- end
- end},
- },
- {
- name = 'Voltorb', health = 100, image = 'gfx/weiwen/pokemon/100.png', scalex = 2, scaley = 2, r = 144, g = 144, b = 144,
- atk = 2.3, def = 2.3, spd = 5, atkspd = 8, x = 0, y = 0, ang = 0, imgang = 0, runat = 20, range = 48,
- spawnchance = {['rpg_mapb'] = {10}},
- spawn = {
- ['rpg_mapb'] = {SPAWNS.BOTTOMHALF}
- },
- exp = 30, money = 130, loot = {{chance = 5000, id = 103}},
- spc = {1000, function(self)
- if self.health < 20 then
- radiusmsg("Voltorb uses selfdestruct!", self.x, self.y)
- parse('explosion ' .. self.x .. ' ' .. self.y .. ' 128 80')
- parse('effect "colorsmoke" ' .. self.x .. ' ' .. self.y .. ' 100 128 255 128 0')
- parse('effect "colorsmoke" ' .. self.x .. ' ' .. self.y .. ' 100 128 255 255 0')
- self:destroy()
- else
- radiusmsg("Voltorb uses thundershock!", self.x, self.y)
- parse('explosion ' .. self.x .. ' ' .. self.y .. ' 96 40')
- parse('effect "colorsmoke" ' .. self.x .. ' ' .. self.y .. ' 100 96 255 255 0')
- parse('effect "colorsmoke" ' .. self.x .. ' ' .. self.y .. ' 75 64 255 255 255')
- end
- end},
- },
- {
- name = 'Koffing', health = 100, image = 'gfx/weiwen/pokemon/109.png', scalex = 2, scaley = 2, r = 128, g = 128, b = 0,
- atk = 2.0, def = 1.7, spd = 4, atkspd = 10, x = 0, y = 0, ang = 0, imgang = 0, runat = 20, range = 48,
- spawnchance = {['rpg_mapb'] = {10}},
- spawn = {
- ['rpg_mapb'] = {SPAWNS.BOTTOMHALF}
- },
- exp = 30, money = 150, loot = {{chance = 5000, id = 106}},
- spc = {1000, function(self)
- if self.health < 20 then
- radiusmsg("Koffing uses explosion!", self.x, self.y)
- parse('explosion ' .. self.x .. ' ' .. self.y .. ' 128 40')
- parse('effect "colorsmoke" ' .. self.x .. ' ' .. self.y .. ' 100 128 255 128 0')
- parse('effect "colorsmoke" ' .. self.x .. ' ' .. self.y .. ' 100 128 255 255 0')
- self:destroy()
- else
- radiusmsg("Koffing uses poison fog!", self.x, self.y)
- parse('explosion ' .. self.x .. ' ' .. self.y .. ' 96 40')
- parse('effect "colorsmoke" ' .. self.x .. ' ' .. self.y .. ' 100 96 128 128 0')
- end
- end},
- },
- }
- CONFIG.MONSTERSKILLS = {
- endAgility = function(id)
- self = MONSTERS[tonumber(id)]
- self.spd = self._spd
- self._spd = nil
- imagecolor(self.image, 255, 255, 255)
- self.agility = nil
- end,
- endRage = function(id)
- self = MONSTERS[tonumber(id)]
- self.atk = self._atk
- self._atk = nil
- imagecolor(self.image, 255, 255, 255)
- self.rage = nil
- end,
- endHarden = function(id)
- self = MONSTERS[tonumber(id)]
- self.def = self._def
- self._def = nil
- imagecolor(self.image, 255, 255, 255)
- self.harden = nil
- end,
- }
- addhook("attack", "MONSTERattack")
- function MONSTERattack(id)
- if gettile(PLAYERS[id].x, PLAYERS[id].y).SAFE or gettile(PLAYERS[id].x, PLAYERS[id].y).NOMONSTERS then
- return
- end
- if inarray({400, 401, 402, 403, 404}, PLAYERS[id].Equipment[7]) then
- message(id, "You may not attack on a horse.")
- return
- end
- local weapon, closest = player(id, 'weapontype')
- for _, m in ipairs(MONSTERS) do
- local x, y = player(id, 'x'), player(id, 'y')
- local dist = math.sqrt((m.x-x)^2+(m.y-y)^2)
- if dist <= (closest and closest[2] or (CONFIG.WEAPONRANGE[weapon] or CONFIG.WEAPONRANGE[50])) then
- local rot = player(id, 'rot')
- if math.abs(math.rad(rot) - math.atan2(y-m.y, x-m.x) + math.pi/2)%(2*math.pi) <= (CONFIG.WEAPONWIDTH[weapon] or CONFIG.WEAPONRANGE[50]) then
- closest = {m, dist}
- end
- end
- end
- if closest then
- closest[1]:damage(id, math.ceil(20*((PLAYERS[id].Level+50)*PLAYERS[id].tmp.atk/closest[1].def)/math.random(60, 140)), weapon)
- end
- end
- addhook("ms100", "MONSTERms100")
- function MONSTERms100()
- t = t + 1
- if t % 100 == 0 then
- while #MONSTERS < CONFIG.MAXMONSTERS do
- local rand, spawnNo, mapName
- while true do
- rand = math.random(#CONFIG.MONSTERS)
- mapName = CONFIG.MONSTERS[rand].spawn[map'name'] and map'name' or CONFIG.DEFAULTMAP
- spawnNo = math.random(#CONFIG.MONSTERS[rand].spawn[mapName])
- if math.random(0, 100) < CONFIG.MONSTERS[rand].spawnchance[mapName][spawnNo] then
- break
- end
- end
- local m = deepcopy(CONFIG.MONSTERS[rand])
- local x, y, tilex, tiley
- local spawn = m.spawn[mapName][spawnNo]
- repeat
- tilex, tiley = math.random(spawn[1][1], spawn[2][1]), math.random(spawn[1][2], spawn[2][2])
- until not gettile(tilex, tiley).SAFE and
- not gettile(tilex, tiley).NOMONSTERS and
- tile(tilex, tiley, "walkable") and
- tile(tilex, tiley, "frame") ~= 34
- m.x, m.y = math.floor(tilex*32+16), math.floor(tiley*32+16)
- Monster:new(m)
- end
- end
- for _, m in ipairs(MONSTERS) do
- if t % m.atkspd == 0 then
- m.target = nil
- local closest
- for _, p in ipairs(table.shuffle(player(0, 'table'))) do
- if player(p, 'health') > 0 and
- not gettile(PLAYERS[p].x, PLAYERS[p].y).SAFE and
- not gettile(PLAYERS[p].x, PLAYERS[p].y).NOMONSTERS then
- local dist = math.sqrt((player(p, 'x')-m.x)^2 + (player(p, 'y')-m.y)^2)
- if dist < 400 then
- if not closest or dist < closest[2] then
- closest = {p, dist}
- end
- end
- end
- end
- if closest then
- local dist = closest[2]
- if dist < 400 then
- m.target = closest[1]
- if m.spc and math.random(10000) <= m.spc[1] then
- m.spc[2](m, m.target, dist)
- elseif dist <= (m.range or 32) then
- m:hit(m.target, 10)
- end
- end
- end
- end
- m.imgang = math.sin(t/2.5*math.pi) * 15
- if m.target and player(m.target, 'exists') and player(m.target, 'health') > 0 and
- not gettile(PLAYERS[m.target].x, PLAYERS[m.target].y).SAFE and
- not gettile(PLAYERS[m.target].x, PLAYERS[m.target].y).NOMONSTERS then
- xdist, ydist = player(m.target, 'x') - m.x, player(m.target, 'y') - m.y
- local dist = math.sqrt(xdist^2 + ydist^2)
- if dist < 400 then
- m.ang = math.atan2(ydist, xdist)-math.pi/2+math.random(-1, 1)/2
- else
- m.target = nil
- end
- end
- if not m.target then
- m:rot(math.random(-1, 1)/2)
- end
- if not m:move(m:rot(), m.health > m.runat and 1 or -1) then
- repeat until m:move(math.rad(math.random(360)), 1)
- end
- end
- end
- function Monster:new(m)
- if not (m.x or m.y) then return false end
- m.image = image(m.image, m.x, m.y, 0)
- imagescale(m.image, m.scalex, m.scaley)
- setmetatable(m, self)
- self.__index = self
- local n = #MONSTERS+1
- MONSTERS[#MONSTERS+1] = m
- m.id = n
- return m
- end
- function Monster:pos(x, y)
- if not x and not y then
- return self.x, self.y
- else
- self.x, self.y = x or self.x, y or self.y
- imagepos(self.image, self.x, self.y, self.imgang)
- end
- return true
- end
- function Monster:move(dir, amt)
- local x, y = -math.sin(dir)*amt*self.spd, math.cos(dir)*amt*self.spd
- local x, y = self.x+x, self.y+y
- local tilex, tiley = math.floor(x/32), math.floor(y/32)
- if tile(tilex, tiley, 'walkable') and tile(tilex, tiley, 'frame') ~= 34 and
- not gettile(tilex, tiley).SAFE and
- not gettile(tilex, tiley).NOMONSTERS then
- self:pos(x, y)
- return true
- else
- self:rot(math.random(-1, 1)*math.pi/2)
- return false
- end
- end
- function Monster:damage(id, dmg, wpntype)
- if not PLAYERS[id].Tutorial.damagem then
- message(id, "You have attacked a monster! Good job! Keep on attacking it until it dies.", "255128000")
- PLAYERS[id].Tutorial.damagem = true
- end
- local wpnName
- if weapon == 251 then
- wpnName = 'rune'
- elseif weapon == 46 then
- wpnName = 'firewave'
- dmg = dmg/5
- else
- wpnName = PLAYERS[id].Equipment[3] and ITEMS[PLAYERS[id].Equipment[3]].name or 'dagger'
- end
- self.health = self.health - dmg
- --print(player(id, 'name') .. ' deals ' .. dmg .. ' damage to ' .. self.name .. ' usng a ' .. wpnName .. '.')
- if self.health <= 0 then
- if not PLAYERS[id].Tutorial.killm then
- message(id, "Congratulation! You have killed your first monster. You can proceed to pick up the loot by using the drop weapon button (default G)", "255128000")
- PLAYERS[id].Tutorial.killm = true
- end
- addexp(id, math.floor(self.exp*CONFIG.EXPRATE))
- self:die()
- else
- parse('effect "colorsmoke" ' .. self.x .. ' ' .. self.y .. ' 0 ' .. self.scaley .. ' ' .. (self.r and (self.r .. ' ' .. self.g .. ' ' .. self.b) or '192 0 0'))
- end
- radiussound("weapons/machete_hit.wav", self.x, self.y)
- return true
- end
- function Monster:hit(id, dmg)
- if not PLAYERS[id].Tutorial.hitm then
- message(id, "A monster is attacking you! You can fight back by swinging your weapon at it.", "255128000")
- PLAYERS[id].Tutorial.hitm = true
- end
- if player(id, 'weapontype') == 41 and (math.abs(math.rad(player(id, 'rot')) - math.atan2(player(id, 'y')-self.y, player(id, 'x')-self.x) + math.pi/2)%(2*math.pi) <= math.pi*2/3) then
- EXPhit(id, self, -1, dmg/4)
- radiussound("weapons/ricmetal" .. math.random(1,2) .. ".wav", self.x, self.y)
- else
- EXPhit(id, self, -1, dmg)
- radiussound("weapons/knife_hit.wav", self.x, self.y)
- end
- return true
- end
- function Monster:die(id)
- local size = self.scalex+self.scaley
- parse('effect "colorsmoke" ' .. self.x .. ' ' .. self.y .. ' ' .. size .. ' 64 ' .. (self.r and (self.r .. ' ' .. self.g .. ' ' .. self.b) or '192 0 0'))
- local tilex, tiley = math.floor(self.x/32), math.floor(self.y/32)
- spawnitem(1337, tilex, tiley, math.floor(self.money*math.random(50, 150)/100)*CONFIG.MONEYRATE)
- for _, loot in ipairs(self.loot) do
- local chance = math.random(10000)
- if chance <= loot.chance then
- spawnitem(loot.id, tilex, tiley)
- end
- end
- radiussound("weapons/c4_explode.wav", self.x, self.y)
- self:destroy()
- end
- function Monster:destroy()
- freeimage(self.image)
- local found
- table.remove(MONSTERS, self.id)
- for i, m in ipairs(MONSTERS) do
- m.id = i
- end
- return true
- end
- function Monster:rot(rot)
- if not rot then
- return self.ang
- else
- self.ang = (self.ang+rot)%(math.pi*2)
- end
- return true
- end
- position.lua:
- -----------------------------------------
- -- X and Y position --
- -- by: MS'ek --
- -----------------------------------------
- position = 1
- addhook("move","positon_move")
- function positon_move(id,x,y)
- if(position==1) then
- parse('hudtxt2 '..id..' 1 "©000255015Position X: '..x..' Y: '..y..' " 13 105')
- return 1
- end
- end
- addhook("movetile","positon_movet")
- function positon_movet(id,x,y)
- if(position==1) then
- parse('hudtxt2 '..id..' 2 "©000255015Tile Position X: '..x..' Y: '..y..' " 13 117')
- return 1
- end
- end
- addhook("spawn","position_spawn")
- function position_spawn(id,x,y)
- if(position==1) then
- parse('hudtxt2 '..id..' 1 "©000255015Position X: '..x..' Y: '..y..' " 13 105')
- parse('hudtxt2 '..id..' 2 "©000255015Tile Position X: '..x..' Y: '..y..' " 13 117')
- return 1
- end
- end
- addhook("parse","position_parse")
- function position_parse(cmd)
- if(cmd=="position 1") then
- position=1
- print("©255255255Position Text activated!")
- return 1
- end
- if(cmd=="position 0") then
- position=0
- print("©255255255Position Text deactivated!")
- parse('hudtxt 1 " " 13 130')
- parse('hudtxt 2 " " 13 130')
- return 1
- end
- end[/code]
- setting.lua:
- [code]parse("mp_dispenser_money 0")
- parse("mp_infammo 1")
- parse("sv_friendlyfire 1")
- --parse("sv_gamemode 3")
- parse("mp_startmoney "..Config.HoldMoney)
- parse("sv_maxplayers 32")
- parse("mp_idletime 80000")
- parse("mp_autoteambalance 0")
- parse("mp_killteambuildings 1")[/code]
- turrets.lua:
- [code]--Controllable Turrets System By Factis699--
- --To set up turret do followig steps:
- --1. Open map editor
- --2. In your map place entty "Env_Item"
- --3. In the name write: create_turret
- --4. After space write path of unmovement image (will be covered by player)
- --5. After space write path of movement image (will cover player and moved with him)
- --6. After space write ID of an item that be equipped when player sit in turret
- --7. After space write Damage of an turret
- --8. After space write Name of an turret (will be showed on kill)
- --9. Press okay, save map, Yer Done!
- --Example: create_turret gfx/turrets/part1.png gfx/turrets/part2.png 40 50 Gatling
- function totable(t,match)
- local cmd = {}
- if not match then match = "[^%s]+" end
- for word in string.gmatch(t, match) do
- table.insert(cmd, word)
- end
- return cmd
- end
- function array(m, h)
- local f = {}
- for id = 1, m do
- f[id] = h
- end
- return f
- end
- entered = array(32, 0)
- weapons = array(32, {})
- weapon_type = array(32, 0)
- turrets = {}
- next_var = 1
- addhook('drop', 'drop_hook')
- addhook('startround', 'startround_hook')
- addhook('ms100', 'ms100_hook')
- addhook('use', 'use_hook')
- addhook('hit', 'hit_hook')
- addhook('die', 'die_hook')
- addhook('leave', 'leave_hook')
- for y = 0, map'ysize' do
- for x = 0, map'xsize' do
- if entity(x, y, 'typename') == 'Env_Item' then
- local g = totable(entity(x, y, 'name'))
- if g[1] == 'create_turret' then
- turrets[next_var] = {}
- turrets[next_var][1] = image(g[2], x * 32 + 16, y * 32 + 16, 0)
- turrets[next_var][2] = image(g[3], x * 32 +16, y * 32 + 16, 3)
- turrets[next_var][3] = tonumber(g[4])
- turrets[next_var][4] = tonumber(g[5])
- turrets[next_var][5] = x
- turrets[next_var][6] = y
- turrets[next_var][7] = g[6]
- turrets[next_var][8] = g[2]
- turrets[next_var][9] = g[3]
- next_var = next_var + 1
- end
- end
- end
- end
- function startround_hook()
- for n, w in ipairs(turrets) do
- w[1] = image(w[8], w[5] * 32 + 16, w[6] * 32 + 16, 0)
- w[2] = image(w[9], w[5] * 32 + 16, w[6] * 32 + 16, 3)
- end
- for id = 1, 32 do
- entered[id] = 0
- parse('speedmod '.. id ..' 0')
- end
- end
- function use_hook(id, event, data, x, y)
- for n, w in ipairs(turrets) do
- if player(id, 'tilex') == w[5] and player(id, 'tiley') == w[6] then
- if entered[id] == 0 then
- for p = 1, 32 do
- if entered[p] == n then
- return
- end
- end
- entered[id] = n
- weapons[id] = playerweapons(id)
- weapon_type[id] = player(id, 'weapontype')
- parse('strip '.. id ..' 0')
- parse('equip '.. id ..' '.. w[3])
- parse('strip '.. id ..' 50')
- parse('setpos '.. id ..' '.. w[5] * 32 + 16 ..' '.. w[6] * 32 + 16)
- parse('speedmod '.. id ..' -100')
- freeimage(turrets[n][2])
- w[2] = image(w[9], 1, 1, 132 + id)
- else
- entered[id] = 0
- parse('strip '.. id ..' 0')
- for nn, ww in ipairs(weapons[id]) do
- parse('equip '.. id ..' '.. ww)
- end
- parse('setweapon '.. id ..' '.. weapon_type[id])
- parse('speedmod '.. id ..' 0')
- freeimage(w[2])
- w[2] = image(w[9], w[5] * 32 + 16, w[6] * 32 + 16, 3)
- imagepos(w[2], w[5] * 32 + 16, w[6] * 32 + 16, player(id, 'rot'))
- end
- end
- end
- end
- function ms100_hook()
- for id = 1, 32 do
- if entered[id] ~= 0 then
- if player(id, 'x') ~= turrets[entered[id]][5] * 32 + 16 or player(id, 'y') ~= turrets[entered[id]][6] * 32 + 16 then
- parse('setpos '.. id ..' '.. turrets[entered[id]][5] * 32 + 16 ..' '.. turrets[entered[id]][6] * 32 + 16)
- end
- end
- end
- end
- function hit_hook(id, source, weapon, hpdmg, apdmg)
- if entered[source] ~= 0 then
- if player(id, 'team') == player(source, 'team') then return 1 end
- if player(id, 'health') - turrets[entered[source]][4] <= 0 then
- parse('customkill '.. source ..' '.. turrets[entered[source]][7] ..' '.. id)
- else
- parse('sethealth '.. id ..' '.. player(id, 'health') - turrets[entered[source]][4])
- end
- return 1
- end
- end
- function die_hook(victim, killer, weapon, x, y)
- if entered[victim] ~= 0 then
- freeimage(turrets[entered[victim]][2])
- turrets[entered[victim]][2] = image(turrets[entered[victim]][9], turrets[entered[victim]][5] * 32 + 16, turrets[entered[victim]][6] * 32 + 16, 3)
- imagepos(turrets[entered[victim]][2], turrets[entered[victim]][5] * 32 + 16, turrets[entered[victim]][6] * 32 + 16, player(victim, 'rot'))
- entered[victim] = 0
- return 1
- end
- end
- function leave_hook(id)
- if entered[id] ~= 0 then
- freeimage(turrets[entered[id]][2])
- turrets[entered[id]][2] = image(turrets[entered[id]][9], turrets[entered[id]][5] * 32 + 16, turrets[entered[id]][6] * 32 + 16, 3)
- imagepos(turrets[entered[id]][2], turrets[entered[id]][5] * 32 + 16, turrets[entered[id]][6] * 32 + 16, player(id, 'rot'))
- entered[id] = 0
- end
- end
- function drop_hook(id, iid, type, ain, a, mode, x, y)
- if entered[id] ~= 0 then
- return 1
- end
- end
- ub_console.lua:
- --------------------------------------------------
- -- Console Script by Unreal Software --
- -- 23.02.2009 - www.UnrealSoftware.de --
- -- Adds new console/script commands --
- -- Works only when running a single command! --
- --------------------------------------------------
- if sample==nil then sample={} end
- sample.console={}
- -----------------------
- -- Parser Hook --
- -----------------------
- addhook("parse","sample.console.parse")
- function sample.console.parse(cmd)
- -- Encage Players
- if cmd=="!unlimit" then
- parse("sv_msg ©000255000UNLIMITED BUILDING ENABLED")
- parse('mp_building_limit "Turret" 9999')
- parse('mp_building_limit "Wall I" 9999')
- parse('mp_building_limit "Wall II" 9999')
- parse('mp_building_limit "Wall III" 9999')
- parse('mp_building_limit "Dispenser" 9999')
- parse('mp_building_limit "Supply" 9999')
- parse('mp_building_limit "Barricade" 9999')
- parse('mp_building_limit "Barbed wire" 9999')
- parse('mp_building_limit "Gate field" 9999')
- parse('mp_building_limit "Turret" 9999')
- end
- -- No Command found, normal parsing
- return 0
- end[/code]
- users.lua:
- [code]function SaveUserStat(id,UsgnID)
- file = io.open("sys/lua/Team Boss/Stats/"..UsgnID..'.txt', "w+") or io.tmpfile()
- local text = ""
- text = tostring(rp_money[id])
- text = text .." "..rp_license[id]
- if rp_arrest[id]==true then
- text = text .." 1"
- else
- text = text .." 0"
- end
- for k, v in ipairs(Addons) do
- text = text .." "..v.FLic[id]
- end
- text = text .." "..(Bankmoney[id])
- text = text .." "..h_card[id]
- file:write(text)
- file:close()
- end
- function LoadUserStat(id,file)
- for line in file:lines() do
- local parses = totable(line)
- local userMoney=tonumber(parses[1])
- if userMoney ~= nil then
- rp_money[id]= userMoney
- end
- if (tonumber(parses[2])~=nil) then
- rp_license[id]=tonumber(parses[2])
- end
- if (tonumber(parses[3]) == 1) then
- rp_arrest[id]=true
- end
- local counter=3
- for k, v in ipairs(Addons) do
- counter=counter+1
- local LicItem = tonumber(parses[counter])
- if LicItem~=nil then
- v.FLic[id]=LicItem
- else
- v.FLic[id]=0
- end
- end
- if (tonumber(parses[2])>0) then
- Bankmoney[id] = tonumber(parses[13])
- end
- if (tonumber(parses[2])>0) then
- h_card[id]=tonumber(parses[14])
- break
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement