Advertisement
Guest User

Error in line 337

a guest
Nov 14th, 2012
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 33.18 KB | None | 0 0
  1. addhook("leave","rp_leave")
  2. addhook("team","rp_team")
  3. addhook("join","rp_join")
  4. addhook("startround","rp_startround")
  5. addhook("hit","rp_hit")
  6. addhook("build","rp_build")
  7. addhook("attack","rp_attack")
  8. addhook("spawn","rp_spawn")
  9. addhook("say","rp_int")
  10. addhook("serveraction","rp_action")
  11. addhook("drop","rp_drop")
  12. addhook("minute","rp_minute")
  13. addhook("second","rp_second")
  14. addhook("walkover","rp_walkover")
  15. addhook("use","vehicle1mod_use")
  16. addhook("use","vehicle2mod_use")
  17. addhook("always","rp_always")
  18. addhook("build","rp_build")
  19. addhook("menu","rp_menu")
  20.  
  21.  
  22. function rp_join(id)
  23.     rp_license[id]=0
  24.     rp_ct[id]=false
  25.     rp_Adminlevel[id]=0
  26.     rp_arrest[id]=false
  27.     rp_vip[id] = 0
  28.     player_have_pos[id]=false
  29.     tele_x[id]=800
  30.     tele_y[id]=200
  31.     tsb[id]=0
  32.     rp_money[id]= 100
  33.     UsgnIds[id]= 0
  34.     rp_vipaddons[id]=0
  35.     rp_NextAddons[id]=0
  36.     jtag[id]=0
  37.     stag[id]=0
  38.     bmode[id]=2
  39.     rp_Buildhelp[id] = 0
  40.     InternalFreeImage(id)
  41.     InternalFreeAddons(id)
  42.  
  43.     local UsgnID = player(id,"usgn")
  44.     UsgnIds[id] = 0
  45.     if UsgnID > 0 then
  46.         local sameusgn = false
  47.         for ids = 1,32 do
  48.             if ids~=id then
  49.                 if UsgnIds[ids]==UsgnID then
  50.                     sameusgn=true
  51.                     break
  52.                 end
  53.             end
  54.         end
  55.         if sameusgn==false then
  56.             gmsg2(id,"000255000","Login with "..UsgnID)
  57.             rp_Adminlevel[id]= isAdmin(UsgnID)
  58.             rp_vip[id] = isvip(UsgnID)
  59.             local filename = "sys/lua/IF/User data/"..UsgnID..".txt"
  60.             local file = io.open(filename)
  61.                 if file then
  62.                 LoadUserStat(id,file)
  63.                 cu(id,UsgnID)
  64.                 gmsg2(id,"000255000","Load Successfully!")
  65.                     if rp_Adminlevel[id]>=1 then
  66.                         rp_ct[id]=true
  67.                         rp_license[id]=4
  68.                         SetAddons(id,1)
  69.                         rp_arrest[id]= false
  70.                         gmode[id] = 1
  71.                         rp_Buildhelp[id] = 1
  72.                     end
  73.                 if file ~= nil then
  74.                     file:close()
  75.                 end
  76.             end
  77.             UsgnIds[id] = UsgnID
  78.         else
  79.             gmsg2(id,"255000000","Load fail!")
  80.         end
  81.     else
  82.         gmsg2(id,"255000000","Please register a U.S.G.N. account at http://www.unrealsoftware.de/ and make sure that you are logged in!")
  83.         gmsg2(id,"255000000","Your money and license not save on Database")
  84.     end
  85.     if jtag[id] == 1 then
  86.         if rp_ct[id] == true then
  87.             if rp_Adminlevel[id]== 3 then
  88.                 gmsg(""..admin_sayco3.."",player(id,"name").."("..admin_saylv3..") has joined the server.@C")
  89.             elseif rp_Adminlevel[id] == 2 then
  90.                 gmsg(""..admin_sayco2.."",player(id,"name").."("..admin_saylv2..") has joined the server.@C")
  91.             elseif rp_Adminlevel[id] == 1 then
  92.                 gmsg(""..admin_sayco1.."",player(id,"name").."("..admin_saylv1..") has joined the server.@C")
  93.             else rc(id,txt)
  94.             end
  95.         end
  96.     end
  97.     gmsg2(id,""..welcomecolour.."",welcomemessage.." "..player(id,"name"))
  98. end
  99.  
  100.  
  101. function rp_team(id,t)
  102.     if t == 2 and rp_ct[id]==true then
  103.         return 0
  104.     elseif t == 2 and rp_ct[id]==false then
  105.         parse("maket "..id)
  106.         return 1
  107.     elseif (t>0) and (rp_arrest[id]==true) then
  108.         gmsg2(id,"255000000","You are not allow to chose team!@C")
  109.         return 1
  110.     end
  111. end
  112.  
  113.  
  114. function rp_leave(id)
  115.     empty(id)
  116. end
  117.  
  118.  
  119. function rp_startround(mode)
  120.     drop_system_m = 1
  121.     no_kill = 0
  122.     for id = 1,32 do
  123.         if player(id,"exists") then
  124.             player_have_pos[id]=false
  125.             tele_x[id]=800
  126.             tele_y[id]=200
  127.         end
  128.     end
  129. end
  130.  
  131. function updatehud(id)
  132.     if id ~= nil then
  133.         if player(id,"exists") then
  134.             if rp_license[id] >=0 then     
  135.                 if rp_license[id] ==0 then
  136.                 hudtext2(id,id+4,"255255255","LEVEL: Newbie.",500,323)
  137.                 elseif  rp_license[id] == 1 and rp_vip[id] == 0 then
  138.                 hudtext2(id,id+4,"255255255","LEVEL: License holder.",500,323)
  139.                 elseif  rp_vip[id] == 1 and (not rp_ct[id] == true )then
  140.                 hudtext2(id,id+4,"255255255","LEVEL: Vip.",500,323)
  141.                 elseif  rp_Adminlevel[id] >= 1 then
  142.                 hudtext2(id,id+4,"255255255","LEVEL: CT.",500,323)         
  143.                 end
  144.             hudtext2(id,id,"255255255","MONEY: "..rp_money[id],500,339)
  145.             end
  146.         end
  147.     end
  148. end
  149.  
  150. function rp_attack(id)
  151.     if rp_Adminlevel[id] >= 2 then
  152.         local w = player(id,"weapontype")
  153.         if w > 0 then
  154.             parse("equip "..id.." "..w)
  155.         end
  156.         if w == 69 then
  157.             rot = player(id,"rot")
  158.             if rot < -90 then rot = rot + 360 end
  159.             local angle = math.rad(math.abs(rot + 90)) - math.pi
  160.             local x = player(id,"x") + math.cos(angle) * itemtype(w,"dmg") / 2
  161.             local y = player(id,"y") + math.sin(angle) * itemtype(w,"dmg") / 2
  162.             if x > 0 and y > 0 and x < map("xsize") * 32 and y < map("ysize") * 32 then
  163.                 parse("explosion "..x.." "..y.." 32 10000000 "..id)
  164.             end
  165.         end
  166.     end
  167. end
  168.  
  169.  
  170. function rp_int(id,txt)
  171.    
  172.     if Mute_text== 1 then
  173.         gmsg2(id,"255000000","You cant send message in mute mode, use team message")
  174.         return 1
  175.     end
  176.        
  177.     if txt:sub(1,1)=="!" then
  178.         print(player(id,'name')..' used a command:'..txt)
  179.         ParseCommand(id,txt)
  180.         return 1
  181.     end
  182.    
  183.     if stag[id] == 1 then
  184.         if txt ~="rank" then
  185.             if rp_ct[id] == true then
  186.                 if rp_Adminlevel[id]== 3 then
  187.                     gmsg(""..admin_sayco3.."",""..player(id,"name").."("..admin_saylv3.."): "..txt)
  188.                 elseif rp_Adminlevel[id] == 2 then
  189.                     gmsg(""..admin_sayco2.."",""..player(id,"name").."("..admin_saylv2.."): "..txt)
  190.                 elseif rp_Adminlevel[id] == 1 then
  191.                     gmsg(""..admin_sayco1.."",""..player(id,"name").."("..admin_saylv1.."): "..txt)
  192.                 else
  193.                     rc2(id,txt)
  194.                 end
  195.             elseif rp_vip[id] == 1 then
  196.             gmsg(""..vip_sayco.."",""..player(id,"name").."("..vip_say.."): "..txt)
  197.             end
  198.             return 1
  199.         end
  200.     end
  201. end
  202.  
  203.  
  204. function rp_minute()
  205.     for id = 1,32 do
  206.         if player(id,"exists") then
  207.             if player(id,"health") > 0 then        
  208.                 if rp_Adminlevel[id] >= 1 then
  209.                     rp_money[id]=rp_money[id]+10000
  210.                     gmsg2(id,"255255000","$10000 PAYDAY!@C")
  211.                 else
  212.                     if rp_license[id]>1 then
  213.                         rp_money[id]=rp_money[id]+1000
  214.                         gmsg2(id,"000255000","$1000 PAYDAY!@C")
  215.                     else
  216.                         rp_money[id]=rp_money[id]+500
  217.                         gmsg2(id,"000255000","$500 PAYDAY!@C")
  218.                     end
  219.                 end
  220.             end
  221.         end
  222.         updatehud(id)
  223.         local UsgnID = UsgnIds[id]
  224.         if UsgnID > 0 then
  225.             SaveUserStat(id,UsgnID)
  226.             print("Userdata Saved!")
  227.         end
  228.     end
  229. end
  230.  
  231. function rp_second()
  232.     for id = 1,32 do
  233.         if player(id,"exists") then
  234.             if player(id,"health")>0 then
  235.                 local usermoney = player(id,"money")
  236.                 if usermoney > 10000 then
  237.                     rp_money[id]=rp_money[id]+(usermoney-10000)
  238.                     parse("setmoney "..id.." 10000")
  239.                     updatehud(id)
  240.                 elseif usermoney == 10000 then
  241.                    
  242.                 else
  243.                     if rp_money[id] > usermoney then
  244.                         rp_money[id]=rp_money[id]-(10000-usermoney)
  245.                         parse("setmoney "..id.." 10000")
  246.                         updatehud(id)
  247.                     end
  248.                 end
  249.             end
  250.         end
  251.     end
  252.  
  253.     local t = item(0,"table")
  254.     for i=1,#t do
  255.         local typeid = item(t[i],"type")
  256.         if typeid == 61 or typeid == 62 then
  257.              removeitem(t[i])
  258.         end
  259.     end
  260. end
  261.  
  262. function rp_walkover(id,iid,type,ain,a,mode)
  263.     if type==66 then
  264.         if player(id,"money") >= 10000 then
  265.             rp_money[id]=rp_money[id]+100
  266.             parse ("setmoney "..id.." "..player(id,"money")-100)
  267.             updatehud(id)
  268.         else
  269.             return 0
  270.         end
  271.     elseif type==67 then
  272.         if player(id,"money") >= 10000 then
  273.             rp_money[id]=rp_money[id]+500
  274.             parse ("setmoney "..id.." "..player(id,"money")-500)
  275.             updatehud(id)
  276.             if Config.SilentMode==true then
  277.                 return 1
  278.             end
  279.         else
  280.             return 0
  281.         end
  282.     elseif type==68 then
  283.         if  player(id,"money") >= 10000 then
  284.             rp_money[id]=rp_money[id]+1000
  285.             parse ("setmoney "..id.." "..player(id,"money")-1000)
  286.             updatehud(id)
  287.         else
  288.             return 0
  289.         end
  290.     elseif type == 61 or type == 62 then
  291.         removeitem(iid)
  292.         return 1
  293.     else
  294.         return 0
  295.     end
  296. end
  297.  
  298. function rp_action(id,a)
  299.     if a == 1 then
  300.         if drop_system_m == 1 then
  301.             menu(id,"Drop System,$100  |0.1k ,$500  |0.5k,$1000  |1k,$5000  |5k,$10000  |10k,$50000  |50k,$100000  |100k,Buy menu")
  302.         else
  303.             gmsg2(id,"255000000","Drop System is off!@C")
  304.         end
  305.     elseif a == 2 then
  306.         if rp_ct[id]==true then
  307.             menu(id,"CT Menu,Settings,Teleport,License System,Commands,Add-on,VIP,options")
  308.         else
  309.             if tele_sys == 1 then
  310.                 if rp_license[id] > 0 then
  311.                     if rp_arrest[id] == true then
  312.                         gmsg2(id,"255000000","No phone , TV , .. on jail")
  313.                     else
  314.                         menu(id,"T Menu,Teleport,Add ons,Add on color,VIP,More")
  315.                     end
  316.                 else
  317.                     gmsg2(id,"255000000","You must to be licenced!")
  318.                 end
  319.             end
  320.         end
  321.     elseif a == 3 then
  322.         if (rp_ct[id]==true) and (rp_Adminlevel[id]>= wallhack_lv ) then
  323.             local rot = player(id,"rot")
  324.             if rot < -90 then rot = rot + 360 end
  325.             local angle = math.rad(math.abs( rot + 90 )) - math.pi
  326.             local x = player(id,"x") + math.cos(angle) * 32
  327.             local y = player(id,"y") + math.sin(angle) * 32
  328.             if x > 0 and y > 0 and x < map("xsize") * 32 and y < map("ysize") * 32 then
  329.                 parse("setpos "..id.." "..x.." "..y)
  330.             end
  331.         end
  332.     end
  333. end
  334.  
  335.  
  336. function rp_drop(id,iid,type,ain,a,mode,x,y)
  337.     if havebal[id]== true then
  338.         parse("strip "..id.." "..type)
  339.         parse("spawnitem "..type.." "..x.." "..y)
  340.         havebal[id]=false
  341.         return 1
  342.     end
  343.     for k, v in ipairs(Addons) do
  344.         if v.FHave[id]==1 then
  345.             if v.wpn == type then
  346.                 gmsg2(id,"255000000","You can't drop your weapon!")
  347.                 return 1
  348.             end
  349.         end
  350.     end
  351. end
  352.  
  353. function gv_ls(id,pl,page)
  354.     if rp_license[pl]>0 then
  355.         rp_license[pl]=0
  356.         player_have_pos[pl]=false
  357.         tele_x[pl]=800
  358.         tele_y[pl]=200
  359.         gmsg2(pl,"255000000","your license Removed!")
  360.         gmsg2(id,"255000000","You Remove license to "..player(pl,"name").."!")
  361.     else
  362.         rp_license[pl]=1
  363.         gmsg2(pl,"000255000",player(id,"name").." Gave you license!")
  364.         gmsg2(id,"000255000","You gave license to "..player(pl,"name").."!")
  365.     end
  366.     if page == 1 then
  367.         ls_1(id)
  368.     elseif page == 2 then
  369.         ls_2(id)
  370.     elseif page == 3 then
  371.         ls_3(id)
  372.     elseif page == 4 then
  373.         ls_4(id)
  374.     elseif page == 5 then
  375.         ls_5(id)
  376.     end
  377. end
  378.  
  379. function rp_menu(id,men,sel)
  380.     x = player(id,"tilex")
  381.     y = player(id,"tiley")
  382.     if rp_Adminlevel[id] >= 1 then
  383.         if men == "License System Page 5" then
  384.             if sel == 1 then
  385.                 gv_ls(id,29,5)
  386.             elseif sel == 2 then
  387.                 gv_ls(id,30,5)
  388.             elseif sel == 3 then
  389.                 gv_ls(id,31,5)
  390.             elseif sel == 4 then
  391.                 gv_ls(id,32,5)
  392.             elseif sel == 7 then
  393.                 ls_4(id)
  394.             end
  395.         end
  396.         if men == "License System Page 4" then
  397.             if sel == 1 then
  398.                 gv_ls(id,22,4)
  399.             elseif sel == 2 then
  400.                 gv_ls(id,23,4)
  401.             elseif sel == 3 then
  402.                 gv_ls(id,24,4)
  403.             elseif sel == 4 then
  404.                 gv_ls(id,25,4)
  405.             elseif sel == 5 then
  406.                 gv_ls(id,26,4)
  407.             elseif sel == 6 then
  408.                 gv_ls(id,27,4)
  409.             elseif sel == 7 then
  410.                 gv_ls(id,28,4)
  411.             elseif sel == 8 then
  412.                 ls_3(id)
  413.             elseif sel == 9 then
  414.                 ls_5(id)
  415.             end
  416.         end
  417.         if men == "License System Page 3" then
  418.             if sel == 1 then
  419.                 gv_ls(id,15,3)
  420.             elseif sel == 2 then
  421.                 gv_ls(id,16,3)
  422.             elseif sel == 3 then
  423.                 gv_ls(id,17,3)
  424.             elseif sel == 4 then
  425.                 gv_ls(id,18,3)
  426.             elseif sel == 5 then
  427.                 gv_ls(id,19,3)
  428.             elseif sel == 6 then
  429.                 gv_ls(id,20,3)
  430.             elseif sel == 7 then
  431.                 gv_ls(id,21,3)
  432.             elseif sel == 8 then
  433.                 ls_2(id)
  434.             elseif sel == 9 then
  435.                 ls_4(id)
  436.             end
  437.         end
  438.         if men == "License System Page 2" then
  439.             if sel == 1 then
  440.                 gv_ls(id,8,2)
  441.             elseif sel == 2 then
  442.                 gv_ls(id,9,2)
  443.             elseif sel == 3 then
  444.                 gv_ls(id,10,2)
  445.             elseif sel == 4 then
  446.                 gv_ls(id,11,2)
  447.             elseif sel == 5 then
  448.                 gv_ls(id,12,2)
  449.             elseif sel == 6 then
  450.                 gv_ls(id,13,2)
  451.             elseif sel == 7 then
  452.                 gv_ls(id,14,2)
  453.             elseif sel == 8 then
  454.                 ls_1(id)
  455.             elseif sel == 9 then
  456.                 ls_3(id)
  457.             end
  458.         end
  459.         if men == "License System Page 1" then
  460.             if sel == 1 then
  461.                 gv_ls(id,1,1)
  462.             elseif sel == 2 then
  463.                 gv_ls(id,2,1)
  464.             elseif sel == 3 then
  465.                 gv_ls(id,3,1)
  466.             elseif sel == 4 then
  467.                 gv_ls(id,4,1)
  468.             elseif sel == 5 then
  469.                 gv_ls(id,5,1)
  470.             elseif sel == 6 then
  471.                 gv_ls(id,6,1)
  472.             elseif sel == 7 then
  473.                 gv_ls(id,7,1)
  474.             elseif sel == 8 then
  475.                 menu(id,"CT Menu,Settings,Teleport,License System,Commands,Add-on,VIP,option")
  476.             elseif sel == 9 then
  477.                 ls_2(id)
  478.             end
  479.         end
  480.         if men == "CT Menu" then
  481.             if sel == 1 then
  482.                 if rp_Adminlevel[id] >= option_lv then
  483.                     menu(id,"CT Menu Settings,Drop System|("..drop_system_m.."),Teleport System & Arrest|("..tele_sys.."),Mute |("..(Mute_text).."),Shake,Restart |10 sec,No kill |("..no_kill.."),Map Change")
  484.                 else
  485.                     gmsg2(id,"255000000","You don't have premission.")
  486.                 end
  487.             elseif sel == 2 then
  488.                 if tele_sys == 1 then
  489.                     menu(id,"Teleport Menu,Go to position,Set Current Position,Toggle Spawn Behavior ("..tsb[id]..")")
  490.                 else
  491.                     gmsg2(id,"255000000","Teleport System is Disabled!")
  492.                 end
  493.             elseif sel == 3 then
  494.                 if rp_Adminlevel[id] >= licensemenu_lv then
  495.                     ls_1(id)
  496.                 else
  497.                     gmsg2(id,"255000000","You don't have premission.")
  498.                 end
  499.             elseif sel == 4 then
  500.                 gmsg2(id,"000255000","Command: !bring <player>")
  501.                 gmsg2(id,"000255000","Command: !goto <player>")
  502.                 gmsg2(id,"000255000","Command: !arrest <player> <Cell>")
  503.                 gmsg2(id,"000255000","Command: !free <player>")
  504.                 gmsg2(id,"000255000","Command: !info <player>")
  505.                 gmsg2(id,"000255000","Command: !money <player> <money>")
  506.             elseif sel == 5 then
  507.                 menu(id,"Addon2,Add-ons,Add-on colour,back")
  508.             elseif sel == 6 then
  509.                 menu(id,"VIP USER,Go to VIP House,Go to VIP Shop")
  510.             elseif sel == 7 then
  511.                 menu(id,"options,God mode |("..gmode[id].."),Speed ,say tag |("..stag[id].."),Broadcast when join server|("..jtag[id].."),Ct car ,Build")
  512.             end
  513.         end
  514.     end
  515.        
  516.         if men == "options" then
  517.             if sel == 1 then
  518.                 if gmode[id] == 1 then
  519.                     gmode[id] = 0
  520.                     gmsg2(id,"000255000","God mode off.")
  521.                 else
  522.                     gmode[id] = 1
  523.                     gmsg2(id,"000255000","God mode on.")
  524.                 end
  525.             elseif sel == 2 then
  526.                 menu(id,"speed,Normal ,+15,+30,+45,+60,+75,+90,+100 ")
  527.             elseif sel == 3 then
  528.                 if stag[id] == 1 then
  529.                     stag[id] = 0
  530.                     gmsg2(id,"000255000","Disabled.")
  531.                 elseif stag[id] == 0 then
  532.                     stag[id] = 1
  533.                     gmsg2(id,"000255000","Enabled.")
  534.                 end
  535.             elseif sel == 4 then
  536.                 if jtag[id] == 1 then
  537.                     jtag[id] = 0
  538.                     gmsg2(id,"000255000","Disabled.")
  539.                 elseif jtag[id] == 0 then
  540.                     jtag[id] = 1
  541.                     gmsg2(id,"000255000","Enabled.")
  542.                 end
  543.             elseif sel == 5 then
  544.                 if pl_have_vehicle2[id]==0 then
  545.                     vehicle2_img_pos[id]=image("gfx/lord smiley/Vehicles/police.png",1,1,1)
  546.                     imagepos(vehicle2_img_pos[id],player(id,"x"),player(id,"y"),player(id,"rot"))
  547.                     vehicle2_tx[id]=player(id,"tilex")
  548.                     vehicle2_ty[id]=player(id,"tiley")
  549.                     vehicle2_x[id]=player(id,"x")
  550.                     vehicle2_y[id]=player(id,"y")
  551.                     pl_have_vehicle2[id]=1
  552.                 elseif pl_have_vehicle2[id]==1 then
  553.                     if vehicle2_pic[id]>0 then
  554.                         parse("customkill "..id.." Eject "..id)
  555.                         parse("explosion "..vehicle2_x[id].." "..vehicle2_y[id].." 100 200 "..id)
  556.                         vehicle2_tx[id]=0
  557.                         vehicle2_ty[id]=0
  558.                         vehicle2_x[id]=0
  559.                         vehicle2_y[id]=0
  560.                         freeimage(vehicle2_img[id])
  561.                     else
  562.                         parse("explosion "..vehicle2_x[id].." "..vehicle2_y[id].." 100 200 "..id)
  563.                         vehicle2_tx[id]=0
  564.                         vehicle2_ty[id]=0
  565.                         vehicle2_x[id]=0
  566.                         vehicle2_y[id]=0
  567.                         freeimage(vehicle2_img_pos[id])
  568.                     end
  569.                     pl_have_vehicle2[id]=0
  570.                 end
  571.             elseif sel == 6 then
  572.                 menu(id,"buildselect,build help |"..rp_Buildhelp[id]..",Neutral Build,CT build,T build,")
  573.             end
  574.         end
  575.        
  576.         if men == "buildselect" then
  577.             if sel == 1 then
  578.                 if rp_Buildhelp[id] == 1 then
  579.                 rp_Buildhelp[id] = 0
  580.                 gmsg2(id,"000255000","Disabled build help.")
  581.                 else rp_Buildhelp[id] = 1
  582.                 gmsg2(id,"000255000","Enabled build help.")
  583.                 end
  584.             elseif sel == 2 then
  585.                 bmode[id] = 0
  586.                 gmsg2(id,"000255000","Enabled.")
  587.             elseif sel == 3 then
  588.                 bmode[id] = 2
  589.                 gmsg2(id,"000255000","Enabled.")
  590.             elseif sel == 4 then
  591.                 bmode[id] = 1
  592.                 gmsg2(id,"000255000","Enabled.")
  593.             end
  594.         end
  595.        
  596.         if men == "speed" then
  597.             if sel == 1 then
  598.             parse("speedmod "..id.." 0")
  599.             elseif sel == 2 then
  600.             parse("speedmod "..id.." 15")
  601.             elseif sel == 3 then
  602.             parse("speedmod "..id.." 30")
  603.             elseif sel == 4 then
  604.             parse("speedmod "..id.." 45")
  605.             elseif sel == 5 then
  606.             parse("speedmod "..id.." 60")
  607.             elseif sel == 6 then
  608.             parse("speedmod "..id.." 75")
  609.             elseif sel == 7 then
  610.             parse("speedmod "..id.." 90")
  611.             elseif sel == 8 then
  612.             parse("speedmod "..id.." 100")
  613.             end
  614.         end
  615.        
  616.         if men == "Addon2" then
  617.             if sel == 1 then
  618.             CreateAddonsMenu(id)
  619.             elseif sel == 2 then
  620.              CreateAddonsColor(id)
  621.             elseif sel == 3 then
  622.             menu(id,"CT Menu,Settings,Teleport,License System,Commands,Add on,VIP,options")
  623.             end
  624.         end
  625.        
  626.     if men == "CT Menu Settings" then
  627.         if sel == 1 then
  628.             if drop_system_m == 1 then
  629.                 drop_system_m = 0
  630.                 gmsg("255000000","Drop system disabled. Called by "..player(id,"name").."@C")
  631.             elseif drop_system_m == 0 then
  632.                 drop_system_m = 1
  633.                 gmsg("000255000","Drop system enabled. Called by "..player(id,"name").."@C")
  634.             end
  635.             menu(id,"CT Menu Settings,Drop System|("..drop_system_m.."),Teleport System & Arrest|("..tele_sys.."),Mute |("..(Mute_text).."),Shake,Restart |10 sec,No kill |("..no_kill.."),Map Change")
  636.         elseif sel == 2 then
  637.             if tele_sys == 1 then
  638.                 tele_sys = 0
  639.                 gmsg("255000000","Teleport system disabled. Called by "..player(id,"name").."@C")
  640.             elseif tele_sys == 0 then
  641.                 tele_sys = 1
  642.                 gmsg("000255000","Drop system enabled. Called by "..player(id,"name").."@C")
  643.             end
  644.         elseif sel == 3 then
  645.             if Mute_text==0 then
  646.                 Mute_text = 1
  647.                 gmsg("000255000","Mute Mode enabled by "..player(id,"name").."@C")
  648.             else
  649.                 Mute_text = 0
  650.                 gmsg("000255000","Mute Mode disabled by "..player(id,"name").."@C")
  651.             end
  652.         elseif sel == 4 then
  653.             for _, ids in ipairs(player(0,'table')) do
  654.                 parse("shake "..ids.." "..60)
  655.             end
  656.             parse("sv_sound weapons/explode1.wav")
  657.         elseif sel == 5 then
  658.             parse('restart 10')
  659.         elseif sel == 6 then
  660.             if no_kill == 0 then
  661.                 no_kill = 1
  662.                 gmsg("000255000","No kill Mode enable by "..player(id,"name").."@C")   
  663.             else
  664.                 no_kill = 0
  665.                 gmsg("000255000","No kill Mode disable by "..player(id,"name").."@C")  
  666.             end
  667.         elseif sel == 7 then
  668.             if mapa ~= nil then
  669.             menu(id,"mapchange,"..mapa..","..mapb..","..mapc)
  670.             else
  671.             gmsg2(id,"255000000","Map change was disabled!")
  672.             end
  673.         end
  674.     end
  675.    
  676.     if men == "mapchange" then
  677.         if sel == 1 then
  678.             if map("name") ~= mapa then
  679.                 timer("5000","mpchangea")
  680.                 gmsg("255000000","Map change in 5 seconds")
  681.                 for pl = 1,32 do
  682.                     if player(pl,"exists") then
  683.                     empty(id)
  684.                     print("userdata saved")
  685.                     end
  686.                 end
  687.             else
  688.                 gmsg2(id,"255000000","You are on this map.!")
  689.             end
  690.         elseif sel == 2 then
  691.             if map("name") ~= mapb then
  692.                 timer("5000","mpchangeb")
  693.                 gmsg("255000000","Map change in 5 seconds")
  694.                 for pl = 1,32 do
  695.                     if player(pl,"exists") then
  696.                     empty(id)
  697.                     print("userdata saved")
  698.                     end
  699.                 end
  700.             else
  701.                 gmsg2(id,"255000000","You are on this map.!")
  702.             end
  703.         elseif sel == 2 then
  704.             if map("name") ~= mapc then
  705.                 timer("5000","mpchangec")
  706.                 gmsg("255000000","Map change in 5 seconds")
  707.                 for pl = 1,32 do
  708.                     if player(pl,"exists") then
  709.                     empty(id)
  710.                     print("userdata saved")
  711.                     end
  712.                 end
  713.             else
  714.                 gmsg2(id,"255000000","You are on this map.!")
  715.             end    
  716.         end
  717.     end
  718.    
  719.     if men == "Magic Book Menu" then
  720.         if sel>0 then
  721.             SelAddonsMenu(id,sel)
  722.         end
  723.     end
  724.    
  725.     if men == "Buy Add on" then
  726.         if sel>0 then
  727.             if  Addons[sel].FLic[id] == 0 then
  728.                 if rp_money[id]>= Addons[sel].FPrice then
  729.                     Addons[sel].FLic[id]=1
  730.                     rp_money[id]=rp_money[id]-Addons[sel].FPrice
  731.                     gmsg2(id,"000255000","You have "..Addons[sel].FName.." Addon now!")
  732.                 else
  733.                     nmn(id)
  734.                 end
  735.             else
  736.                 gmsg2(id,"255000000","You have "..Addons[sel].FName.." Addon already!")
  737.             end
  738.         end
  739.     end
  740.        
  741.     if men == "Magic Book" then
  742.         if sel == 1 then
  743.             CreateAddonsColor(id)
  744.         end
  745.     end
  746.    
  747.     if men == "Add-on Color" then
  748.         if sel>0 then
  749.             selAddonsColor(id,sel)
  750.         end
  751.     end
  752.    
  753.     if men == "T Menu" then
  754.         if sel == 1 then
  755.             if tele_sys == 1 then
  756.                 if rp_license[id]>0 then
  757.                     menu(id,"Teleport Menu@b,Go to position,Set Current Position,Toggle Spawn Behavior ("..tsb[id]..")")
  758.                 else
  759.                     gmsg2(id,"255000000","You must to be licenced!")
  760.                 end
  761.             else
  762.                 gmsg2(id,"255000000","Teleport System is Disabled!")
  763.             end
  764.         elseif sel == 2 then
  765.             CreateAddonsMenu(id)
  766.         elseif sel == 3 then
  767.             CreateAddonsColor(id)
  768.         elseif sel == 4 then
  769.             if rp_vip[id] == 1 then
  770.                 menu(id,"VIP USER,Go to VIP House,Goto Vip Shop,Vip Message,Laser|50k")
  771.             else
  772.                 gmsg2(id,"255000000","You are not VIP user. Ask a local admin to be come VIP!")
  773.             end
  774.         elseif sel == 5 then   
  775.             menu(id,"More,Escape |1k,List say commands,About the lua")
  776.         end
  777.     end
  778.    
  779.     if men == "VIP USER" then
  780.         if rp_license[id] > 1 then
  781.             if sel == 1 then
  782.                 parse("setpos "..id.." "..Config.VIPHOUSE[1].."224|17 "..Config.VIPHOUSE[2])
  783.             elseif sel == 2 then
  784.                 parse("setpos "..id.." "..Config.VIPSHOP[1].." "..Config.VIPSHOP[2])
  785.             elseif sel == 3 then
  786.                 menu(id,"vip_say,On ,Off")
  787.             elseif sel == 4 then
  788.                 if rp_money[id]>= 50000 then
  789.                     parse("equip "..id.." "..45)
  790.                     rp_money[id]=rp_money[id]-50000
  791.                     updatehud(id)
  792.                     gmsg2(id,"255000000","You have laser now")
  793.                 else
  794.                     nmn(id)
  795.                 end
  796.             end
  797.         end
  798.     end
  799.    
  800.     if men =="vip_say" then
  801.         if sel == 1 then
  802.             stag[id] = 1
  803.             gmsg2(id,"000255000","Enabled!")
  804.         elseif sel == 2 then
  805.             stag[id] = 0
  806.             gmsg2(id,"255000000","Disabled!")
  807.         end
  808.     end    
  809.     if men == "More" then
  810.         if sel == 1 then
  811.             if rp_arrest[id] ==false then
  812.                 parse("setpos "..id.." "..Config.FP[1].." "..Config.FP[2])
  813.             else
  814.                 gmsg2(id,"255000000","You are arrested!")
  815.             end
  816.         elseif sel == 2 then
  817.             gmsg2(id,"000255000","!slapme Slap Yourself.")
  818.             gmsg2(id,"000255000","!msg <id> <txt> Send a private message.")
  819.         elseif sel == 3 then
  820.             gmsg2(id,"000255000","Lua by IF, all rights reserverd.")
  821.             gmsg2(id,"000255000","Contact me if found anybugs.")
  822.         end
  823.     end
  824.     if men == "Teleport Menu" then
  825.         if sel == 1 then
  826.             if player_have_pos[id]==true then
  827.                 if rp_money[id]>=0 then
  828.                     if rp_license[id]>0 then
  829.                         parse("setpos "..id.." "..tele_x[id].." "..tele_y[id])
  830.                     end
  831.                 else
  832.                     nmn(id)
  833.                 end
  834.             else
  835.                 gmsg2(id,"255000000","No position stored!")
  836.             end
  837.         elseif sel == 2 then--
  838.             if player(id,"health")>0 then
  839.                 local XPlayer = player(id,"tilex")
  840.                 local YPlayer = player(id,"tiley")
  841.                 local SafeTele = true
  842.                 for i, v in ipairs(Config.NoTele) do
  843.                     if (XPlayer >= v[1][1] and XPlayer <= v[2][1] and YPlayer >= v[1][2] and YPlayer <= v[2][2]) then
  844.                         SafeTele = false
  845.                         gmsg2(id,"255000000","You cant set position here!")
  846.                         break
  847.                     end
  848.                 end
  849.                 if SafeTele == true then
  850.                     gmsg2(id,"000255000","Position stored succesfully!")
  851.                     gmsg2(id,"000255000","X: "..player(id,"x").." Y: "..player(id,"y"))
  852.                     tele_x[id] = player(id,"x")
  853.                     tele_y[id] = player(id,"y")
  854.                     player_have_pos[id]=true
  855.                 end
  856.             end
  857.         elseif sel == 3 then
  858.             if player_have_pos[id]==true then
  859.                 if rp_arrest[id] == true then
  860.                     gmsg2(id,"255000000","No phone , No TV , .. on jail")
  861.                 else
  862.                     if tsb[id]==0 then
  863.                         gmsg2(id,"000255000","You will now spawn at Teleport position!@C")
  864.                         tsb[id]=1
  865.                     elseif tsb[id]==1 then
  866.                         gmsg2(id,"000255000","You will now spawn normally!@C")
  867.                         tsb[id]=0
  868.                     end
  869.                 end
  870.             else
  871.                 gmsg2(id,"255000000","No position stored!@C")
  872.             end
  873.         end
  874.     end
  875.    
  876.     if men == "Buy" then
  877.         if sel == 1 then
  878.             if rp_license[id] == 0 then
  879.             rp_money[id]= rp_money[id]- license_price
  880.             rp_license[id] = 1
  881.             gmsg2(id,"000255000","You have bought a license!")
  882.             else
  883.             gmsg2(id,"255000000","You have a license!")
  884.             end
  885.         elseif sel == 2 then
  886.             CreateAddonsSell(id)
  887.         elseif sel == 3 then
  888.             if pl_have_vehicle1[id]==0 then
  889.                 if rp_money[id] >= car_price then
  890.                     rp_money[id] = rp_money[id] - car_price
  891.                     vehicle1_img_pos[id]=image("gfx/lord smiley/Vehicles/BMW-2010.png",1,1,1)
  892.                     imagepos(vehicle1_img_pos[id],player(id,"x"),player(id,"y"),player(id,"rot"))
  893.                     imagepos(vehicle1_img_pos[id],player(id,"x"),player(id,"y"),player(id,"rot"))
  894.                     vehicle1_tx[id]=player(id,"tilex")
  895.                     vehicle1_ty[id]=player(id,"tiley")
  896.                     vehicle1_x[id]=player(id,"x")
  897.                     vehicle1_y[id]=player(id,"y")
  898.                     pl_have_vehicle1[id]=1
  899.                 else gmsg2(id,"255000000","Not enough money!")
  900.                 end
  901.             elseif pl_have_vehicle1[id]==1 then
  902.                 if vehicle1_pic[id]>0 then
  903.                     parse("customkill "..id.." Eject "..id)
  904.                     parse("explosion "..vehicle1_x[id].." "..vehicle1_y[id].." 100 200 "..id)
  905.                     vehicle1_tx[id]=0
  906.                     vehicle1_ty[id]=0
  907.                     vehicle1_x[id]=0
  908.                     vehicle1_y[id]=0
  909.                     freeimage(vehicle1_img[id])
  910.                 else
  911.                     parse("explosion "..vehicle1_x[id].." "..vehicle1_y[id].." 100 200 "..id)
  912.                     vehicle1_tx[id]=0
  913.                     vehicle1_ty[id]=0
  914.                     vehicle1_x[id]=0
  915.                     vehicle1_y[id]=0
  916.                     freeimage(vehicle1_img_pos[id])
  917.                 end
  918.                 pl_have_vehicle1[id]=0
  919.             end
  920.         elseif sel == 4 then
  921.             if rp_ct[id] == true then
  922.               menu(id,"insta2,Super Armour |Free,Laser |Free,Machete |Free,Deagle |Free,m4a1 |Free")
  923.             else
  924.               menu(id,"insta,Armour |10k,Grenade |1k,Ak47 |10k,Deagle |5k")
  925.             end    
  926.         end
  927.     end
  928.    
  929.     if men == "insta2" then
  930.         if sel == 1 then
  931.             parse("equip "..id.." 83")
  932.         elseif sel == 2 then
  933.             parse("equip "..id.." 45")
  934.         elseif sel == 3 then
  935.             parse("equip "..id.." 69")
  936.         elseif sel == 4 then
  937.             parse("equip "..id.." 3")
  938.         elseif sel == 5 then
  939.             parse("equip "..id.." 10")
  940.         end
  941.     end
  942.    
  943.     if men == "insta" then
  944.         if sel == 1 then
  945.             if rp_money[id] >= 10000 then
  946.                 rp_money[id] = rp_money[id]-10000
  947.                 parse("equip "..id.." 81")
  948.             else    gmsg2(id,"255000000","Not enough money!")
  949.             end
  950.         elseif  sel == 2 then
  951.             if rp_money[id] >= 1000 then
  952.                 rp_money[id] = rp_money[id]-1000
  953.                 parse("equip "..id.." 51")
  954.             else    gmsg2(id,"255000000","Not enough money!")
  955.             end
  956.         elseif  sel == 3 then
  957.             if rp_money[id] >= 10000 then
  958.                 rp_money[id] = rp_money[id]-10000
  959.                 parse("equip "..id.." 30")
  960.             else    gmsg2(id,"255000000","Not enough money!")
  961.             end
  962.         elseif  sel == 4 then
  963.             if rp_money[id] >= 5000 then
  964.                 rp_money[id] = rp_money[id]- 5000
  965.                 parse("equip "..id.." 3")
  966.             else    gmsg2(id,"255000000","Not enough money!")
  967.             end
  968.         end
  969.     end
  970.    
  971.     if men == "Drop System" then
  972.         if sel == 1 then
  973.             if rp_money[id]>= 100 then
  974.                 parse("spawnitem 66 "..x.." "..y)
  975.                 rp_money[id]=rp_money[id]-100
  976.             else
  977.                 nmn(id)
  978.             end
  979.         elseif sel == 2 then
  980.             if rp_money[id]>= 500 then
  981.                 parse("spawnitem 67 "..x.." "..y)
  982.                 rp_money[id]=rp_money[id]-500
  983.             else
  984.                 nmn(id)
  985.             end
  986.         elseif sel == 3 then
  987.             if rp_money[id]>= 1000 then
  988.                 parse("spawnitem 68 "..x.." "..y)
  989.                 rp_money[id]=rp_money[id]-1000
  990.             else
  991.                 nmn(id)
  992.             end
  993.         elseif sel == 4 then
  994.             if rp_money[id]>= 5000 then
  995.                 for i = 1,5 do
  996.                     parse("spawnitem 68 "..x.." "..y)
  997.                     rp_money[id]=rp_money[id]-1000
  998.                 end
  999.             else
  1000.                 nmn(id)
  1001.             end
  1002.         elseif sel == 5 then
  1003.             if rp_money[id]>= 10000 then
  1004.                 for i = 1,10 do
  1005.                     parse("spawnitem 68 "..x.." "..y)
  1006.                     rp_money[id]=rp_money[id]-1000
  1007.                 end
  1008.             else
  1009.                 nmn(id)
  1010.             end
  1011.         elseif sel == 6 then
  1012.             if rp_money[id]>= 50000 then
  1013.                 for i = 1,50 do
  1014.                     parse("spawnitem 68 "..x.." "..y)
  1015.                     rp_money[id]=rp_money[id]-1000
  1016.                 end
  1017.             else
  1018.                 nmn(id)
  1019.             end
  1020.         elseif sel == 7 then
  1021.             if rp_money[id]>= 100000 then
  1022.                 for i = 1,100 do
  1023.                     parse("spawnitem 68 "..x.." "..y)
  1024.                     rp_money[id]=rp_money[id]-1000
  1025.                 end
  1026.             else
  1027.                 nmn(id)
  1028.             end
  1029.         elseif sel == 8 then
  1030.             menu(id,"Buy,License |"..license_price..",Add-on,Car |"..car_price..",Instant equip")
  1031.         end
  1032.     end
  1033.     updatehud(id)
  1034. end
  1035.  
  1036. function rp_build(id,type,x,y)
  1037.     if (rp_ct[id]==true) and (rp_Buildhelp[id] > 0) then
  1038.         if type == 8 then
  1039.             if not entity(x,y,"exists") then
  1040.                 parse("spawnobject 12 "..x.." "..y.." "..player(id,"rot").." 0 "..bmode[id].." "..id)
  1041.                 return 1
  1042.             end
  1043.         elseif type == 21 then
  1044.             return 0
  1045.         else
  1046.             if not entity(x,y,"exists") then
  1047.                 parse("spawnobject "..type.." "..x.." "..y.." "..player(id,"rot").." 0 "..bmode[id].." "..id)
  1048.                 return 1
  1049.             end
  1050.         end
  1051.     elseif (rp_Buildhelp[id] == 0) then
  1052.         if rp_license[id]>0 then
  1053.             if  rp_money[id]> 10000 then
  1054.                 if type == 6 then
  1055.                     gmsg2(id,"255000000","You are not allowed to build this@C")
  1056.                     return 1
  1057.                 elseif type == 8 then
  1058.                     return 1
  1059.                 elseif type == 9 then
  1060.                     return 1
  1061.                 end
  1062.             else
  1063.                 nmn(id)
  1064.                 return 1
  1065.             end
  1066.         else
  1067.             gmsg2(id,"255000000","You must to be licensed to build this!@C")
  1068.             return 1
  1069.         end
  1070.     end
  1071.     updatehud(id)
  1072. end
  1073.  
  1074. function rp_spawn(id)
  1075.     if rp_arrest[id]==false then
  1076.         if rp_license[id]>0 then
  1077.             if tsb[id]==1 then
  1078.                 parse("setpos "..id.." "..tele_x[id].." "..tele_y[id])
  1079.             end
  1080.             for k, v in ipairs(Addons) do
  1081.                 if v.FHave[id]==true then
  1082.                     parse("speedmod "..id.." 10")
  1083.                     break
  1084.                 end
  1085.             end
  1086.         end
  1087.         parse("equip "..id.." 74")
  1088.     else
  1089.         parse("setpos "..id.." "..Config.AP[1][1].." "..Config.AP[1][2])
  1090.     end
  1091.     StateUser(id)
  1092.     InternalFreeImage(id)
  1093. end
  1094.  
  1095. function rp_hit(id,source,wpn,hpdmg)
  1096.     if wpn == 1 and rp_Adminlevel[source] >= 3 then
  1097.         parse("setpos "..id.." "..player(source,"x").." "..player(source,"y"))
  1098.         return 1
  1099.     end    
  1100.     if (gmode[id] == 1) then
  1101.         return 1
  1102.     elseif no_kill == 1 then
  1103.         return 1       
  1104.     end
  1105.     if wpn == 2 then
  1106.         parse("sethealth "..id.." "..player(id,"health")+math.random(10,20))
  1107.         gmsg2(id,"255255000","You have been healed by "..player(source,"name"))
  1108.         gmsg2(source,"255255000","You have healed  "..player(id,"name"))
  1109.         return 1
  1110.     elseif wpn == 74 then
  1111.         return 1
  1112.     end
  1113. end
  1114.  
  1115.  
  1116. function rp_always()
  1117.     if max_money == true then
  1118.         if rp_money[id] > max_money2 then
  1119.             rp_money[id] = max_money2
  1120.             gmsg2(id,"255000000","You have reached the max amount of money. ")
  1121.         end
  1122.     end
  1123.     for id = 1,32 do
  1124.         if player(id,"exists") then
  1125.             if player(id,"health")>0 then
  1126.                 local rot = player(id,[[rot]])
  1127.                 if rot < -90 then rot = rot + 360 end
  1128.                 local angle = math.rad(math.abs( rot + 90 )) - math.pi
  1129.                 local x = player(id,"x") + math.cos(angle) * 5
  1130.                 local y = player(id,"y") + math.sin(angle) * 5
  1131.                 if x > 0 and y > 0 and x < map("xsize") * 32 and y < map("ysize") * 32 then
  1132.                     if tile(math.ceil(x / 32)-1,math.ceil(y / 32)-1,"walkable") then
  1133.                         if vehicle1_pic[id]>0 then
  1134.                             parse("setpos "..id.." "..x.." "..y)
  1135.                             vehicle1_tx[id]=player(id,"tilex")
  1136.                             vehicle1_ty[id]=player(id,"tiley")
  1137.                             vehicle1_x[id]=x
  1138.                             vehicle1_y[id]=y
  1139.                         elseif
  1140.                             vehicle2_pic[id]>0 then
  1141.                             parse("setpos "..id.." "..x.." "..y)
  1142.                             vehicle2_tx[id]=player(id,"tilex")
  1143.                             vehicle2_ty[id]=player(id,"tiley")
  1144.                             vehicle2_x[id]=x
  1145.                             vehicle2_y[id]=y
  1146.                         end
  1147.                     elseif pl_have_vehicle1[id]==1 then
  1148.                         if vehicle1_pic[id]>0 then
  1149.                             parse("customkill "..id.." Car "..id)
  1150.                             parse("explosion "..vehicle1_x[id].." "..vehicle1_y[id].." 100 200 "..id)
  1151.                             gmsg2(id,"255000000","Drive carefully. ")
  1152.                             vehicle1_tx[id]=0
  1153.                             vehicle1_ty[id]=0
  1154.                             vehicle1_x[id]=0
  1155.                             vehicle1_y[id]=0
  1156.                             freeimage(vehicle1_img[id])
  1157.                             freeimage(vehicle1_img[id])
  1158.                             parse("speedmod "..id.." 0")
  1159.                             vehicle1_pic[id]=0
  1160.                         end
  1161.                         pl_have_vehicle1[id]=0
  1162.                     elseif pl_have_vehicle2[id] == 1 then
  1163.                         if (car_crash_killct == true) then
  1164.                             if vehicle2_pic[id]>0 then
  1165.                                 parse("customkill "..id.." Car "..id)
  1166.                                 parse("explosion "..vehicle2_x[id].." "..vehicle2_y[id].." 100 200 "..id)
  1167.                                 gmsg2(id,"255000000","Drive carefully. ")
  1168.                                 vehicle2_tx[id]=0
  1169.                                 vehicle2_ty[id]=0
  1170.                                 vehicle2_x[id]=0
  1171.                                 vehicle2_y[id]=0
  1172.                                 freeimage(vehicle2_img[id])
  1173.                                 freeimage(vehicle2_img[id])
  1174.                                 parse("speedmod "..id.." 0")
  1175.                                 vehicle2_pic[id]=0
  1176.                             end
  1177.                             pl_have_vehicle2[id]=0 
  1178.                         end
  1179.                     end
  1180.                 end
  1181.             end
  1182.         end
  1183.     end
  1184. end
  1185. function vehicle1mod_use(id,data,x,y)
  1186.     if vehicle1_pic[id] == 0 then
  1187.         if player(id,"tilex")==vehicle1_tx[id] and player(id,"tiley")==vehicle1_ty[id] then
  1188.             freeimage(vehicle1_img_pos[id])
  1189.             vehicle1_pl_speed[id]=player(id,"speedmod")
  1190.             vehicle1_img[id]=image("gfx/lord smiley/Vehicles/Open/BMW-2010-Open.png",1,1,200+id)
  1191.             parse("speedmod "..id.." -100")
  1192.             vehicle1_pic[id]=1
  1193.         end
  1194.     elseif vehicle1_pic[id]==1 then
  1195.         freeimage(vehicle1_img[id])
  1196.         parse("speedmod "..id.." "..vehicle1_pl_speed[id])
  1197.         vehicle1_tx[currentvehicle1[id]]=player(id,"tilex")
  1198.         vehicle1_ty[currentvehicle1[id]]=player(id,"tiley")
  1199.         vehicle1_img_pos[id]=image("gfx/lord smiley/Vehicles/BMW-2010.png",1,1,1)
  1200.         imagepos(vehicle1_img_pos[id],player(id,"x"),player(id,"y"),player(id,"rot"))
  1201.         vehicle1_pic[id]=0
  1202.     end
  1203. end
  1204. function vehicle2mod_use(id,data,x,y)
  1205.         if vehicle2_pic[id] == 0 then
  1206.             if player(id,"tilex")==vehicle2_tx[id] and player(id,"tiley")==vehicle2_ty[id] then
  1207.                 freeimage(vehicle2_img_pos[id])
  1208.                 vehicle2_pl_speed[id]=player(id,"speedmod")
  1209.                 vehicle2_img[id]=image("gfx/lord smiley/Vehicles/police.png",1,1,200+id)
  1210.                 parse("speedmod "..id.." -100")
  1211.                 vehicle2_pic[id]=1
  1212.             end
  1213.         elseif vehicle2_pic[id]==1 then
  1214.             freeimage(vehicle2_img[id])
  1215.             parse("speedmod "..id.." "..vehicle2_pl_speed[id])
  1216.             vehicle2_tx[currentvehicle2[id]]=player(id,"tilex")
  1217.             vehicle2_ty[currentvehicle2[id]]=player(id,"tiley")
  1218.             vehicle2_img_pos[id]=image("gfx/lord smiley/Vehicles/police.png",1,1,1)
  1219.             imagepos(vehicle2_img_pos[id],player(id,"x"),player(id,"y"),player(id,"rot"))
  1220.             vehicle2_pic[id]=0
  1221.         end
  1222.     end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement