Advertisement
Guest User

Untitled

a guest
Aug 26th, 2013
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 180.89 KB | None | 0 0
  1. it is 7 files
  2.  
  3. this in folder called team boss:
  4. main.lua:
  5. nokill = 0
  6. --Lord Smiley's lua
  7. -- :D !smiley face!
  8.  
  9. dofile("sys/lua/Team Boss/functions.lua")
  10. dofile("sys/lua/Team Boss/config.lua")
  11. dofile("sys/lua/Team Boss/addons.lua")
  12. dofile("sys/lua/Team Boss/Admin.lua")
  13. dofile("sys/lua/Team Boss/users.lua")
  14. dofile("sys/lua/Team Boss/setting.lua")
  15. dofile("sys/lua/Team Boss/funcFootbal.lua")
  16. dofile("sys/lua/Team Boss/buying_menu.lua")
  17. UpdateHudeImages()
  18.  
  19. withd = Array(32,0)
  20. depos = Array(32,0)
  21. rp_balad = Array(32,0)
  22. h_card =Array(32,0)
  23. Bankmoney =Array(32,0)
  24. rp_ct = Array(32,false)
  25. rp_Adminlevel = Array(32,0)
  26. rp_license = Array(32,0)
  27. vehicle_license = Array(32,0)
  28. rp_money = Array(32,100)
  29. rp_arrest = Array(32,false)
  30. rp_vipaddons = Array(32,0)
  31. rp_vipmsg = Array(32,0)
  32. rp_NextAddons = Array(32,0)
  33. UsgnIds = Array(32, 0)
  34. PicImage = Array(32, 0)
  35. --footbal--
  36. team_no = Array(32,0)
  37. havebal = Array(32,false)
  38. FTWin = Array(2,1)
  39. -----------
  40. tsb = Array(32,0)
  41. player_have_pos = Array(32,false)
  42. tele_x = Array(32,0)
  43. tele_y = Array(32,0)
  44. rp_criminal = Array(32,false)
  45. ---houses---
  46. house1 = Array(32,0)
  47. house2 = Array(32,0)
  48. house3 = Array(32,0)
  49. house4 = Array(32,0)
  50. house5 = Array(32,0)
  51. house6 = Array(32,0)
  52. house7 = Array(32,0)
  53. house8 = Array(32,0)
  54. house9 = Array(32,0)
  55. house10 = Array(32,0)
  56. havehouse = Array(32,0)
  57. havehorse = Array(32,0)
  58. havehouse1 = Array(32,0)
  59. havehouse2 = Array(32,0)
  60. havehouse3 = Array(32,0)
  61. havehouse4 = Array(32,0)
  62. havehouse5 = Array(32,0)
  63. havehouse6 = Array(32,0)
  64. havehouse7 = Array(32,0)
  65. havehouse8 = Array(32,0)
  66. havehouse9 = Array(32,0)
  67. havehouse10 = Array(32,0)
  68. house1owner = "Empty"
  69. house2owner = "Empty"
  70. house3owner = "Empty"
  71. house4owner = "Empty"
  72. house5owner = "Empty"
  73. house6owner = "Empty"
  74. house7owner = "Empty"
  75. house8owner = "Empty"
  76. house9owner = "Empty"
  77. house10owner = "Empty"
  78. -- vehicles values --
  79. -- Vehicle 1 --
  80. vehicle1_tx = Array(32,0)
  81. vehicle1_ty = Array(32,0)
  82. vehicle1_x = Array(32,0)
  83. vehicle1_y = Array(32,0)
  84. vehicle1_pic = Array(32,0)
  85. vehicle1_pl_speed = Array(32,0)
  86. vehicle1_img = Array(32,0)
  87. vehicle1_img_pos = Array(32,0)
  88. currentvehicle1 = Array(32,0)
  89. pl_have_vehicle1 = Array(32,0)
  90. vehicle1_pl = Array(32,0)
  91. -- Vehicle 2 --
  92. vehicle2_tx = Array(32,0)
  93. vehicle2_ty = Array(32,0)
  94. vehicle2_x = Array(32,0)
  95. vehicle2_y = Array(32,0)
  96. vehicle2_pic = Array(32,0)
  97. vehicle2_pl_speed = Array(32,0)
  98. vehicle2_img = Array(32,0)
  99. vehicle2_img_pos = Array(32,0)
  100. currentvehicle2 = Array(32,0)
  101. pl_have_vehicle2 = Array(32,0)
  102. vehicle2_pl = Array(32,0)
  103. -- Vehicle 3 --
  104. vehicle3_tx = Array(32,0)
  105. vehicle3_ty = Array(32,0)
  106. vehicle3_x = Array(32,0)
  107. vehicle3_y = Array(32,0)
  108. vehicle3_pic = Array(32,0)
  109. vehicle3_pl_speed = Array(32,0)
  110. vehicle3_img = Array(32,0)
  111. vehicle3_img_pos = Array(32,0)
  112. currentvehicle3 = Array(32,0)
  113. pl_have_vehicle3 = Array(32,0)
  114. vehicle3_pl = Array(32,0)
  115. -- Vehicle 4 --
  116. vehicle4_tx = Array(32,0)
  117. vehicle4_ty = Array(32,0)
  118. vehicle4_x = Array(32,0)
  119. vehicle4_y = Array(32,0)
  120. vehicle4_pic = Array(32,0)
  121. vehicle4_pl_speed = Array(32,0)
  122. vehicle4_img = Array(32,0)
  123. vehicle4_img_pos = Array(32,0)
  124. currentvehicle4 = Array(32,0)
  125. pl_have_vehicle4 = Array(32,0)
  126. vehicle4_pl = Array(32,0)
  127. -- Vehicle 5 --
  128. vehicle5_tx = Array(32,0)
  129. vehicle5_ty = Array(32,0)
  130. vehicle5_x = Array(32,0)
  131. vehicle5_y = Array(32,0)
  132. vehicle5_pic = Array(32,0)
  133. vehicle5_pl_speed = Array(32,0)
  134. vehicle5_img = Array(32,0)
  135. vehicle5_img_pos = Array(32,0)
  136. currentvehicle5 = Array(32,0)
  137. pl_have_vehicle5 = Array(32,0)
  138. vehicle5_pl = Array(32,0)
  139. -- Vehicle 6 --
  140. vehicle6_tx = Array(32,0)
  141. vehicle6_ty = Array(32,0)
  142. vehicle6_x = Array(32,0)
  143. vehicle6_y = Array(32,0)
  144. vehicle6_pic = Array(32,0)
  145. vehicle6_pl_speed = Array(32,0)
  146. vehicle6_img = Array(32,0)
  147. vehicle6_img_pos = Array(32,0)
  148. currentvehicle6 = Array(32,0)
  149. pl_have_vehicle6 = Array(32,0)
  150. vehicle6_pl = Array(32,0)
  151. -- Vehicle 7 --
  152. vehicle7_tx = Array(32,0)
  153. vehicle7_ty = Array(32,0)
  154. vehicle7_x = Array(32,0)
  155. vehicle7_y = Array(32,0)
  156. vehicle7_pic = Array(32,0)
  157. vehicle7_pl_speed = Array(32,0)
  158. vehicle7_img = Array(32,0)
  159. vehicle7_img_pos = Array(32,0)
  160. currentvehicle7 = Array(32,0)
  161. pl_have_vehicle7 = Array(32,0)
  162. vehicle7_pl = Array(32,0)
  163. -- Vehicle 8 --
  164. vehicle8_tx = Array(32,0)
  165. vehicle8_ty = Array(32,0)
  166. vehicle8_x = Array(32,0)
  167. vehicle8_y = Array(32,0)
  168. vehicle8_pic = Array(32,0)
  169. vehicle8_pl_speed = Array(32,0)
  170. vehicle8_img = Array(32,0)
  171. vehicle8_img_pos = Array(32,0)
  172. currentvehicle8 = Array(32,0)
  173. pl_have_vehicle8 = Array(32,0)
  174. vehicle8_pl = Array(32,0)
  175. -- Vehicle 9 --
  176. vehicle9_tx = Array(32,0)
  177. vehicle9_ty = Array(32,0)
  178. vehicle9_x = Array(32,0)
  179. vehicle9_y = Array(32,0)
  180. vehicle9_pic = Array(32,0)
  181. vehicle9_pl_speed = Array(32,0)
  182. vehicle9_img = Array(32,0)
  183. vehicle9_img_pos = Array(32,0)
  184. currentvehicle9 = Array(32,0)
  185. pl_have_vehicle9 = Array(32,0)
  186. vehicle9_pl = Array(32,0)
  187. -- Vehicle 10 --
  188. vehicle10_tx = Array(32,0)
  189. vehicle10_ty = Array(32,0)
  190. vehicle10_x = Array(32,0)
  191. vehicle10_y = Array(32,0)
  192. vehicle10_pic = Array(32,0)
  193. vehicle10_pl_speed = Array(32,0)
  194. vehicle10_img = Array(32,0)
  195. vehicle10_img_pos = Array(32,0)
  196. currentvehicle10 = Array(32,0)
  197. pl_have_vehicle10 = Array(32,0)
  198. vehicle10_pl = Array(32,0)
  199. -- Vehicle 11 --
  200. vehicle11_tx = Array(32,0)
  201. vehicle11_ty = Array(32,0)
  202. vehicle11_x = Array(32,0)
  203. vehicle11_y = Array(32,0)
  204. vehicle11_pic = Array(32,0)
  205. vehicle11_pl_speed = Array(32,0)
  206. vehicle11_img = Array(32,0)
  207. vehicle11_img_pos = Array(32,0)
  208. currentvehicle11 = Array(32,0)
  209. pl_have_vehicle11 = Array(32,0)
  210. vehicle11_pl = Array(32,0)
  211. -- Vehicle 12 --
  212. vehicle12_tx = Array(32,0)
  213. vehicle12_ty = Array(32,0)
  214. vehicle12_x = Array(32,0)
  215. vehicle12_y = Array(32,0)
  216. vehicle12_pic = Array(32,0)
  217. vehicle12_pl_speed = Array(32,0)
  218. vehicle12_img = Array(32,0)
  219. vehicle12_img_pos = Array(32,0)
  220. currentvehicle12 = Array(32,0)
  221. pl_have_vehicle12 = Array(32,0)
  222. vehicle12_pl = Array(32,0)
  223. --horse---
  224. --horse1---
  225. horse1_tx = Array(32,0)
  226. horse1_ty = Array(32,0)
  227. horse1_x = Array(32,0)
  228. horse1_y = Array(32,0)
  229. horse1_pic = Array(32,0)
  230. horse1_pl_speed = Array(32,0)
  231. horse1_img = Array(32,0)
  232. horse1_img_pos = Array(32,0)
  233. currenthorse1 = Array(32,0)
  234. pl_have_horse1 = Array(32,0)
  235. horse1_pl = Array(32,0)
  236. ---horse2---
  237. horse2_tx = Array(32,0)
  238. horse2_ty = Array(32,0)
  239. horse2_x = Array(32,0)
  240. horse2_y = Array(32,0)
  241. horse2_pic = Array(32,0)
  242. horse2_pl_speed = Array(32,0)
  243. horse2_img = Array(32,0)
  244. horse2_img_pos = Array(32,0)
  245. currenthorse2 = Array(32,0)
  246. pl_have_horse2 = Array(32,0)
  247. horse2_pl = Array(32,0)
  248. ---horse3---
  249. horse3_tx = Array(32,0)
  250. horse3_ty = Array(32,0)
  251. horse3_x = Array(32,0)
  252. horse3_y = Array(32,0)
  253. horse3_pic = Array(32,0)
  254. horse3_pl_speed = Array(32,0)
  255. horse3_img = Array(32,0)
  256. horse3_img_pos = Array(32,0)
  257. currenthorse3 = Array(32,0)
  258. pl_have_horse3 = Array(32,0)
  259. horse3_pl = Array(32,0)
  260.  
  261. function mlicense(id)
  262. rp_msg2(id,[[255000000]],[[You must to be licensed to build this!@C]])
  263. end
  264.  
  265. function my_msg(t)
  266. parse("sv_msg "..t)
  267. end
  268.  
  269. function mlicense2(id)
  270. rp_msg2(id,[[255000000]],[[You are not allowed to build this@C]])
  271. end
  272.  
  273. function InternalFreeImage(id)
  274. if (team_no[id]>0) then
  275. freeimage(PicImage[id])
  276. team_no[id]=0
  277. else
  278. for k, v in ipairs(Addons) do
  279. if v.FHave[id]==1 then
  280. freeimage(PicImage[id])
  281. v.FHave[id]=0
  282. end
  283. end
  284. end
  285. end
  286.  
  287. addhook("join","rp_load")
  288. function rp_load(id)
  289. withd[id] = 0
  290. depos[id] = 0
  291. rp_license[id]=0
  292. vehicle_license[id]=0
  293. rp_ct[id]=false
  294. rp_Adminlevel[id]=0
  295. rp_arrest[id]=false
  296. player_have_pos[id]=false
  297. tele_x[id]=800
  298. tele_y[id]=200
  299. tsb[id]=0
  300. rp_money[id]=100
  301. UsgnIds[id]= 0
  302. rp_vipaddons[id]=0
  303. rp_vipmsg[id]=0
  304. rp_NextAddons[id]=0
  305. InternalFreeImage(id)
  306. InternalFreeAddons(id)
  307. havehouse1=0
  308. havehouse2=0
  309. havehouse3=0
  310. havehouse4=0
  311. havehouse5=0
  312. havehouse6=0
  313. havehouse7=0
  314. havehouse8=0
  315. havehouse9=0
  316. havehouse10=0
  317.  
  318. local UsgnID = player(id,"usgn")
  319. UsgnIds[id] = 0
  320. if UsgnID > 0 then
  321. local sameusgn = false
  322. for ids = 1,32 do
  323. if ids~=id then
  324. if UsgnIds[ids]==UsgnID then
  325. sameusgn=true
  326. break
  327. end
  328. end
  329. end
  330. if sameusgn==false then
  331. rp_msg2(id,"000255000","Login with "..UsgnID)
  332. rp_Adminlevel[id]= isAdmin(UsgnID)
  333. local filename = "sys/lua/Team Boss/Stats/"..UsgnID..".txt"
  334. local file = io.open(filename)
  335. if file then
  336. LoadUserStat(id,file)
  337. rp_msg2(id,"000255000","Load Successfully!")
  338. if player(id,"usgn") == 40027 then
  339. rp_license[id]=3
  340. SetAddons(id,1)
  341. vehicle_license[id]=1
  342. rp_balad[id]= 1
  343. rp_arrest[id]= false
  344. elseif rp_Adminlevel[id]>=1 then
  345. rp_ct[id]=true
  346. rp_license[id]=4
  347. SetAddons(id,1)
  348. vehicle_license[id]=1
  349. rp_balad[id] = 1
  350. rp_arrest[id]= false
  351. end
  352. if file ~= nil then
  353. file:close()
  354. end
  355. end
  356. UsgnIds[id] = UsgnID
  357. else
  358. rp_msg2(id,"255000000","Load fail!")
  359. end
  360. else
  361. 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!")
  362. rp_msg2(id,"255000000","Your money and license not save on Database")
  363. end
  364. end
  365.  
  366. addhook("team","rp_team")
  367. function rp_team(id,t)
  368. if t == 2 and rp_ct[id]==true then
  369. return 0
  370. elseif t == 2 and rp_ct[id]==false then
  371. parse("maket "..id)
  372. return 1
  373. --elseif (t>0) and (rp_arrest[id]==true) then
  374. -- rp_msg2(id,"255000000","You are not allow to chose team!@C")
  375. -- return 1
  376. end
  377. end
  378.  
  379. addhook("leave","rp_leave")
  380. function rp_leave(id)
  381. local UsgnID = UsgnIds[id]
  382. if UsgnID > 0 then
  383. SaveUserStat(id,UsgnID)
  384. end
  385. rp_license[id]=0
  386. vehicle_license[id]=0
  387. rp_ct[id]=false
  388. rp_Adminlevel[id]=0
  389. rp_arrest[id]=false
  390. rp_vipmsg[id]=0
  391. player_have_pos[id]=false
  392. tsb[id]=0
  393. tele_x[id]=800
  394. tele_y[id]=200
  395. rp_money[id]=100
  396. UsgnIds[id]= 0
  397. rp_vipaddons[id]=0
  398. rp_NextAddons[id]=0
  399. x = player(id,"tilex")
  400. y = player(id,"tiley")
  401. rp_criminal[id]=false
  402. house1[id]=0
  403. house2[id]=0
  404. house3[id]=0
  405. house4[id]=0
  406. house5[id]=0
  407. house6[id]=0
  408. house7[id]=0
  409. house8[id]=0
  410. house9[id]=0
  411. house10[id]=0
  412. havehouse[id]=0
  413. havehorse[id]=0
  414. house1owner = "Empty"
  415. house2owner = "Empty"
  416. house3owner = "Empty"
  417. house4owner = "Empty"
  418. house5owner = "Empty"
  419. house6owner = "Empty"
  420. house7owner = "Empty"
  421. house8owner = "Empty"
  422. house9owner = "Empty"
  423. house10owner = "Empty"
  424. -- horse value --
  425. -- horse 1--
  426. horse1_tx[id]=0
  427. horse1_ty[id]=0
  428. horse1_x[id]=0
  429. horse1_y[id]=0
  430. horse1_pic[id]=0
  431. horse1_pl_speed[id]=0
  432. freeimage(horse1_img[id])
  433. freeimage(horse1_img_pos[id])
  434. currenthorse1[id]=0
  435. pl_have_horse1[id]=0
  436. horse1_pl[id]=0
  437. -- horse 2--
  438. horse2_tx[id]=0
  439. horse2_ty[id]=0
  440. horse2_x[id]=0
  441. horse2_y[id]=0
  442. horse2_pic[id]=0
  443. horse2_pl_speed[id]=0
  444. freeimage(horse2_img[id])
  445. freeimage(horse2_img_pos[id])
  446. currenthorse2[id]=0
  447. pl_have_horse2[id]=0
  448. horse2_pl[id]=0
  449. -- horse 3--
  450. horse3_tx[id]=0
  451. horse3_ty[id]=0
  452. horse3_x[id]=0
  453. horse3_y[id]=0
  454. horse3_pic[id]=0
  455. horse3_pl_speed[id]=0
  456. freeimage(horse3_img[id])
  457. freeimage(horse3_img_pos[id])
  458. currenthorse3[id]=0
  459. pl_have_horse3[id]=0
  460. horse3_pl[id]=0
  461. -- Vehicles Value --
  462. -- Vehicle 1 --
  463. vehicle1_tx[id]=0
  464. vehicle1_ty[id]=0
  465. vehicle1_x[id]=0
  466. vehicle1_y[id]=0
  467. vehicle1_pic[id]=0
  468. vehicle1_pl_speed[id]=0
  469. freeimage(vehicle1_img[id])
  470. freeimage(vehicle1_img_pos[id])
  471. currentvehicle1[id]=0
  472. pl_have_vehicle1[id]=0
  473. vehicle1_pl[id]=0
  474. -- vehicle 2 --
  475. vehicle2_tx[id]=0
  476. vehicle2_ty[id]=0
  477. vehicle2_x[id]=0
  478. vehicle2_y[id]=0
  479. vehicle2_pic[id]=0
  480. vehicle2_pl_speed[id]=0
  481. freeimage(vehicle2_img[id])
  482. freeimage(vehicle2_img_pos[id])
  483. currentvehicle2[id]=0
  484. pl_have_vehicle2[id]=0
  485. vehicle2_pl[id]=0
  486. -- vehicle 3 --
  487. vehicle3_tx[id]=0
  488. vehicle3_ty[id]=0
  489. vehicle3_x[id]=0
  490. vehicle3_y[id]=0
  491. vehicle3_pic[id]=0
  492. vehicle3_pl_speed[id]=0
  493. freeimage(vehicle3_img[id])
  494. freeimage(vehicle3_img_pos[id])
  495. currentvehicle3[id]=0
  496. pl_have_vehicle3[id]=0
  497. vehicle3_pl[id]=0
  498. -- vehicle 4 --
  499. vehicle4_tx[id]=0
  500. vehicle4_ty[id]=0
  501. vehicle4_x[id]=0
  502. vehicle4_y[id]=0
  503. vehicle4_pic[id]=0
  504. vehicle4_pl_speed[id]=0
  505. freeimage(vehicle4_img[id])
  506. freeimage(vehicle4_img_pos[id])
  507. currentvehicle4[id]=0
  508. pl_have_vehicle4[id]=0
  509. vehicle4_pl[id]=0
  510. -- vehicle 5 --
  511. vehicle5_tx[id]=0
  512. vehicle5_ty[id]=0
  513. vehicle5_x[id]=0
  514. vehicle5_y[id]=0
  515. vehicle5_pic[id]=0
  516. vehicle5_pl_speed[id]=0
  517. freeimage(vehicle5_img[id])
  518. freeimage(vehicle5_img_pos[id])
  519. currentvehicle5[id]=0
  520. pl_have_vehicle5[id]=0
  521. vehicle5_pl[id]=0
  522. -- vehicle 6 --
  523. vehicle6_tx[id]=0
  524. vehicle6_ty[id]=0
  525. vehicle6_x[id]=0
  526. vehicle6_y[id]=0
  527. vehicle6_pic[id]=0
  528. vehicle6_pl_speed[id]=0
  529. freeimage(vehicle6_img[id])
  530. freeimage(vehicle6_img_pos[id])
  531. currentvehicle6[id]=0
  532. pl_have_vehicle6[id]=0
  533. vehicle6_pl[id]=0
  534. -- vehicle 7 --
  535. vehicle7_tx[id]=0
  536. vehicle7_ty[id]=0
  537. vehicle7_x[id]=0
  538. vehicle7_y[id]=0
  539. vehicle7_pic[id]=0
  540. vehicle7_pl_speed[id]=0
  541. freeimage(vehicle7_img[id])
  542. freeimage(vehicle7_img_pos[id])
  543. currentvehicle7[id]=0
  544. pl_have_vehicle7[id]=0
  545. vehicle7_pl[id]=0
  546. -- vehicle 8 --
  547. vehicle8_tx[id]=0
  548. vehicle8_ty[id]=0
  549. vehicle8_x[id]=0
  550. vehicle8_y[id]=0
  551. vehicle8_pic[id]=0
  552. vehicle8_pl_speed[id]=0
  553. freeimage(vehicle8_img[id])
  554. freeimage(vehicle8_img_pos[id])
  555. currentvehicle8[id]=0
  556. pl_have_vehicle8[id]=0
  557. vehicle8_pl[id]=0
  558. -- vehicle 9 --
  559. vehicle9_tx[id]=0
  560. vehicle9_ty[id]=0
  561. vehicle9_x[id]=0
  562. vehicle9_y[id]=0
  563. vehicle9_pic[id]=0
  564. vehicle9_pl_speed[id]=0
  565. freeimage(vehicle9_img[id])
  566. freeimage(vehicle9_img_pos[id])
  567. currentvehicle9[id]=0
  568. pl_have_vehicle9[id]=0
  569. vehicle9_pl[id]=0
  570. -- vehicle 10 --
  571. vehicle10_tx[id]=0
  572. vehicle10_ty[id]=0
  573. vehicle10_x[id]=0
  574. vehicle10_y[id]=0
  575. vehicle10_pic[id]=0
  576. vehicle10_pl_speed[id]=0
  577. freeimage(vehicle10_img[id])
  578. freeimage(vehicle10_img_pos[id])
  579. currentvehicle10[id]=0
  580. pl_have_vehicle10[id]=0
  581. vehicle10_pl[id]=0
  582. -- vehicle 11 --
  583. vehicle11_tx[id]=0
  584. vehicle11_ty[id]=0
  585. vehicle11_x[id]=0
  586. vehicle11_y[id]=0
  587. vehicle11_pic[id]=0
  588. vehicle11_pl_speed[id]=0
  589. freeimage(vehicle11_img[id])
  590. freeimage(vehicle11_img_pos[id])
  591. currentvehicle11[id]=0
  592. pl_have_vehicle11[id]=0
  593. vehicle11_pl[id]=0
  594. -- vehicle 12 --
  595. vehicle12_tx[id]=0
  596. vehicle12_ty[id]=0
  597. vehicle12_x[id]=0
  598. vehicle12_y[id]=0
  599. vehicle12_pic[id]=0
  600. vehicle12_pl_speed[id]=0
  601. freeimage(vehicle12_img[id])
  602. freeimage(vehicle12_img_pos[id])
  603. currentvehicle12[id]=0
  604. pl_have_vehicle12[id]=0
  605. vehicle12_pl[id]=0
  606. --------------------
  607. if house1[id]==2 then
  608. havehouse1=0
  609. elseif house2[id]==2 then
  610. havehouse2=0
  611. elseif house3[id]==2 then
  612. havehouse3=0
  613. elseif house4[id]==2 then
  614. havehouse4=0
  615. elseif house5[id]==2 then
  616. havehouse5=0
  617. elseif havebal[id]==true then
  618. parse("spawnitem 75 "..x.." "..y)
  619. end
  620. havebal[id]=false
  621. InternalFreeImage(id)
  622. InternalFreeAddons(id)
  623. end
  624.  
  625. addhook("startround","rp_startround")
  626. function rp_startround(mode)
  627. for id = 1,32 do
  628. if player(id,"exists") then
  629. player_have_pos[id]=false
  630. tele_x[id]=800
  631. tele_y[id]=200
  632. havebal[id]=false
  633. FTWin[1]=0
  634. FTWin[2]=0
  635. house1[id] = 0
  636. house2[id] = 0
  637. house3[id] = 0
  638. house4[id] = 0
  639. house5[id] = 0
  640. house6[id] = 0
  641. house7[id] = 0
  642. house8[id] = 0
  643. house9[id] = 0
  644. house10[id] = 0
  645. havehouse[id] = 0
  646. havehorse[id] = 0
  647. havehouse1=0
  648. havehouse2=0
  649. havehouse3=0
  650. havehouse4=0
  651. havehouse5=0
  652. havehouse6=0
  653. havehouse7=0
  654. havehouse8=0
  655. havehouse9=0
  656. havehouse10=0
  657. no_kill = 0
  658. if house1[id]==2 then
  659. house1owner = "Empty"
  660. elseif house2[id]==2 then
  661. house2owner = "Empty"
  662. elseif house3[id]==2 then
  663. house3owner = "Empty"
  664. elseif house4[id]==2 then
  665. house4owner = "Empty"
  666. elseif house5[id]==2 then
  667. house5owner = "Empty"
  668. elseif house6[id]==2 then
  669. house6owner = "Empty"
  670. elseif house7[id]==2 then
  671. house7owner = "Empty"
  672. elseif house8[id]==2 then
  673. house8owner = "Empty"
  674. elseif house9[id]==2 then
  675. house9owner = "Empty"
  676. elseif house10[id]==2 then
  677. house10owner = "Empty"
  678. InternalFreeImage(id)
  679. end
  680. end
  681. end
  682. UpdateHudeImages()
  683. end
  684.  
  685. function updatehud(id)
  686. if id ~= nil then
  687. if player(id,"exists") then
  688. if (team_no[id]~=nil) and (team_no[id]>0) then
  689. hudtext2(id,id+2,"000128255","Blue Team: "..FTWin[1],14,179)
  690. hudtext2(id,id+3,"255000000","Red Team: "..FTWin[2],14,194)
  691. elseif rp_license[id] >=0 then
  692. if rp_license[id] ==0 then
  693. hudtext2(id,id+4,"255255255","LEVEL: Newbie.",500,383)
  694. elseif rp_license[id] == 1 then
  695. hudtext2(id,id+4,"255255255","LEVEL: License holder.",500,383)
  696. elseif rp_license[id] == 2 then
  697. hudtext2(id,id+4,"255255255","LEVEL: Ticket holder.",500,383)
  698. elseif rp_license[id] == 3 then
  699. hudtext2(id,id+4,"255255255","LEVEL: Vip.",500,383)
  700. elseif rp_license[id] > 3 then
  701. hudtext2(id,id+4,"255255255","LEVEL: Admin.",500,383)
  702. end
  703. hudtext2(id,id,"255255255","MONEY: "..rp_money[id],500,339)
  704. end
  705. end
  706. end
  707. end
  708.  
  709. addhook("attack","rp_attack")
  710. function rp_attack(id)
  711. if rp_Adminlevel[id] >= 2 then
  712. local w = player(id,"weapontype")
  713. if w > 0 then
  714. parse("equip "..id.." "..w)
  715. end
  716. if w == 69 then
  717. rot = player(id,"rot")
  718. if rot < -90 then rot = rot + 360 end
  719. local angle = math.rad(math.abs(rot + 90)) - math.pi
  720. local x = player(id,"x") + math.cos(angle) * itemtype(w,"dmg") / 2
  721. local y = player(id,"y") + math.sin(angle) * itemtype(w,"dmg") / 2
  722. if x > 0 and y > 0 and x < map("xsize") * 32 and y < map("ysize") * 32 then
  723. parse("explosion "..x.." "..y.." 32 10000000 "..id)
  724. end
  725. end
  726. end
  727. end
  728.  
  729. ---shops---
  730. ---vehicle---
  731. vehiclenpcx=163
  732. vehiclenpcy=79
  733. ---vicar--
  734. vicarnpcx=149
  735. vicarnpcy=75
  736. ---license--
  737. licensenpcx=195
  738. licensenpcy=79
  739. ---magic--
  740. magicnpcx=181
  741. magicnpcy=79
  742. ----bridge---
  743. bridge1npcx=49
  744. bridge1npcy=165
  745. bridge2npcx=54
  746. bridge2npcy=165
  747. ---movie---
  748. movienpcx=25
  749. movienpcy=177
  750. ---shop---
  751. shopnpcx=59
  752. shopnpcy=181
  753. shop2npcx=25
  754. shop2npcy=126
  755. ---horse---
  756. horsenpcx=89
  757. horsenpcy=160
  758.  
  759.  
  760.  
  761.  
  762.  
  763. addhook("say","rp_int")
  764. function rp_int(id,txt)
  765.  
  766. if Mute_text== 1 then
  767. rp_msg2(id,"255000000","You cant send message in mute mode, use team message")
  768. return 1
  769. end
  770.  
  771. -- if depos[id] == 0 and checkbound(id,Config.Bank) then
  772. -- local bankamount = txt
  773. -- if rp_money[id] >= bankamount then
  774. -- rp_money[id] = rp_money[id] - bankamount
  775. -- Bankmoney[id] = Bankmoney[id] + bankamount
  776. -- updatehud(id)
  777. -- depos[id] = 0
  778. -- elseif rp_money[id] < bankamount then
  779. -- rp_msg2(id,"255255255","not enought money with you")
  780. -- depos[id] = 0
  781. -- end
  782. -- end
  783.  
  784. --if withd[id] == 1 and checkbound(id,Config.Bank) then
  785. -- local bankamount = txt
  786. -- if Bankmoney[id] >= bankamount then
  787. -- rp_money[id] = rp_money[id] + bankamount
  788. -- Bankmoney[id] = Bankmoney[id] - bankamount
  789. -- updatehud(id)
  790. -- rp_msg2(id,"255255255","You have successfuly withdrawn "..bankamount.."$ from your Bank-account!")
  791. -- withd[id] = 0
  792. -- elseif Bankmoney[id] < bankamount then
  793. -- rp_msg2(id,"255255255","not enought money on your Bank-account!")
  794. -- withd[id] = 0
  795. -- end
  796. --end
  797. --withd[id] = 0
  798.  
  799. if (txt =="hi" and player(id,"tilex")==vehiclenpcx and player(id,"tiley")==vehiclenpcy) then
  800. rp_msg2(id,"255000000","Vehicle Seller: Hello Which vehicle you would like to rent?")
  801. menu(id,"Vehicle list 1,BMW 2010 |3k,Porche |1.5k,Nissan |5k,BMW X5 |7.5k,Sedan |3k,Other Vehicles")
  802. elseif (txt=="hi" and player(id,"tilex")==horsenpcx and player(id,"tiley")==horsenpcy) then
  803. rp_msg2(id,"255000000","Horse Seller: Hello Which horse you would like to rent?")
  804. menu(id,"Horses,White horse |10k,Orange horse |10k,Brown horse |10k")
  805. elseif (txt=="hi" and player(id,"tilex")==movienpcx and player(id,"tiley")==movienpcy) then
  806. rp_msg2(id,"255000000"," Hello Which movie you would like to watch?")
  807. menu(id,"Movie,Naruto |100$,Harry Potter |100$,bye")
  808. elseif (txt=="hi" and player(id,"tilex")==bridge1npcx and player(id,"tiley")==bridge1npcy) then
  809. rp_msg2(id,"255000000","Hi,Welcome to the island.")
  810. menu(id,"Bridge,Can I pass?,Buy a ticket. |30k,Bye")
  811. elseif (txt=="hi" and player(id,"tilex")==bridge2npcx and player(id,"tiley")==bridge2npcy) then
  812. rp_msg2(id,"255000000","Hi,Welcome to the island.")
  813. menu(id,"Bridge2,Can I pass?,Buy a ticket. |30k,Bye")
  814. elseif (txt=="hi" and player(id,"tilex")==vicarnpcx and player(id,"tiley")==vicarnpcy) then
  815. rp_msg2(id,"255000000","Vicar:Welcome to the church.")
  816. menu(id,"Heal,Heal |1k,Bye")
  817. elseif (txt=="hi" and player(id,"tilex")==licensenpcx and player(id,"tiley")==licensenpcy) then
  818. rp_msg2(id,"255000000","License Seller: Hello Which License you would like to Buy?")
  819. menu(id,"License List,Normal License |100k,Vehicle License |150k,Vip |5000k,Temp Ct power |100000k,Buy speed")
  820. elseif (txt=="hi" and player(id,"tilex")==shopnpcx and player(id,"tiley")==shopnpcy) then
  821. if rp_Adminlevel[id] >= 1 then
  822. rp_msg2(id,"255000000","House Seller: Hello admin, What would you like to do?")
  823. menu(id,"sansnasa,This menu , is under, constuction!")
  824. else
  825. rp_msg2(id,"255000000","House Seller: Hello, Which house you would like to Buy?")
  826. menu(id,"Buy House,house 1 |"..house1owner..",house 2 |"..house2owner..",house 3 |"..house3owner..",house 4 |"..house4owner..",house 5 |"..house5owner..",bye")
  827. end
  828. elseif (txt=="hi" and player(id,"tilex")==shop2npcx and player(id,"tiley")==shop2npcy) then
  829. if rp_Adminlevel[id] >= 1 then
  830. rp_msg2(id,"255000000","House Seller: Hello admin, What would you like to do?")
  831. menu(id,"sansnasa2,This menu , is under, constuction!")
  832. else
  833. rp_msg2(id,"255000000","House Seller: Hello, Which house you would like to Buy?")
  834. menu(id,"Buy House2,house 6 |"..house6owner..",house 7 |"..house7owner..",house 8 |"..house8owner..",house 9 |"..house9owner..",house 10 |"..house10owner..",bye")
  835. end
  836. elseif (txt=="hi" and player(id,"tilex")==magicnpcx and player(id,"tiley")==magicnpcy) then
  837. rp_msg2(id,"255000000","Magician: Hello Which Magic you would like to learn?")
  838. CreateAddonsSell(id)
  839. elseif (txt=="hi" and checkbound(id,Config.Bank)) then
  840. rp_msg2(id,"255000000","Banker:Welcome to the bank.")
  841. menu(id,"bank,my money |"..Bankmoney[id]..",Deposit ,Withdraw,Credit card ,Info ")
  842. end
  843.  
  844. if rp_ct[id]==true then
  845. if txt:sub(1,1)=="!" then
  846. print(player(id,'name')..' used a command:'..txt)
  847. ParseAdminCommand(id,txt)
  848. return 1
  849. end
  850.  
  851. if txt:sub(1,1)=="$" then
  852. print(player(id,'name')..' made a action:'..txt)
  853. more_say(id,txt)
  854. return 1
  855. end
  856.  
  857. if rp_ct[id] == true then
  858. if txt ~="rank" then
  859. if rp_Adminlevel[id] == 11 then
  860. rp_msg("255000000",player(id,"name").."(Owner): "..txt)
  861. elseif rp_Adminlevel[id]== 10 then
  862. rp_msg("255255255",player(id,"name").."(Visitor): "..txt)
  863. elseif rp_Adminlevel[id]== 9 then
  864. rp_msg("285764183",player(id,"name").."(FEFERGEGERE): "..txt)
  865. elseif rp_Adminlevel[id]== 8 then
  866. rp_msg("284437824",player(id,"name").."(Scripter): "..txt)
  867. elseif rp_Adminlevel[id]== 7 then
  868. rp_msg("823184625",player(id,"name").."(Vice Leader): "..txt)
  869. elseif rp_Adminlevel[id]== 6 then
  870. rp_msg("233114250",player(id,"name").."(H-Admin): "..txt)
  871. elseif rp_Adminlevel[id]== 5 then
  872. rp_msg("124255062",player(id,"name").."(Admin): "..txt)
  873. elseif rp_Adminlevel[id]== 4 then
  874. rp_msg("062255245",player(id,"name").."(SuperMod): "..txt)
  875. elseif rp_Adminlevel[id]== 3 then
  876. rp_msg("071062255",player(id,"name").."(MOD): "..txt)
  877. elseif rp_Adminlevel[id] == 2 then
  878. rp_msg("250255062",player(id,"name").."(Trainee): "..txt)
  879. elseif rp_Adminlevel[id] == 1 then
  880. rp_msg("254154063",player(id,"name").."(CT): "..txt)
  881. end
  882. return 1
  883. end
  884. end
  885. end
  886.  
  887. if rp_vipmsg[id]>0 and txt ~="rank" then
  888. rp_msg("000255255",player(id,"name").."(VIP): "..txt)
  889. rp_vipmsg[id]=0
  890. return 1
  891. end
  892.  
  893. if rp_ct[id] == false then
  894. if txt ~="rank" then
  895. if rp_Adminlevel[id] == 0 then
  896. rp_msg("255255255",player(id,"name").."(Visitor): "..txt)
  897. return 1
  898. end
  899. end
  900. end
  901. end
  902.  
  903. addhook("say","news_show")
  904. function news_show(id,news)
  905. if string.sub(news,1,6)=="@news " then
  906. if rp_Adminlevel[id]>=5 then
  907. news_bari(id,news)
  908. else
  909. msg2(id,string.char(169)..'255000000Error: You´re not allowed to use this command.')
  910. end
  911. return 1
  912. end
  913. end
  914.  
  915. addhook("kill","rp_kill")
  916. function rp_kill(killer,victim,wpn)
  917. if rp_ct[killer]==true then
  918. rp_money[killer]=rp_money[killer]+300
  919. rp_money[victim]=rp_money[victim]-100
  920. else
  921. if killer~=victim then
  922. if checkbound(victim,Config.Bounce) then--
  923. local PScore = player(killer,"score")
  924. if PScore >= 0 then
  925. parse("setmoney "..killer.." "..Config.HoldMoney)
  926. parse("setscore "..killer.." "..PScore+2)
  927. rp_money[killer]=rp_money[killer]+2000
  928. rp_money[victim]=rp_money[victim]-1000
  929. rp_msg2(killer,[[000255000]],[[Good kill!@C]])
  930. else
  931. parse("setscore "..killer.." 0")
  932. parse("setmoney "..killer.." "..Config.HoldMoney)
  933. end
  934. elseif rp_criminal[victim]==true then
  935. rp_criminal[killer]=false
  936. rp_msg2(killer,[[000255000]],[[You just killed a crminal!@C]])
  937. else
  938. rp_criminal[victim]=false
  939. rp_criminal[killer]=true
  940. rp_msg2(killer,[[255000000]],[[You just Murdered!@C]])
  941. end
  942. end
  943. end
  944. updatehud(killer)
  945. updatehud(victim)
  946. end
  947.  
  948. addhook([[always]],[[rp_always]])
  949. function rp_always()
  950. for id = 1,32 do
  951. if player(id,[[exists]]) then
  952. if player(id,[[health]])>0 then
  953. -- vehicle mod Auto Walk
  954. local rot = player(id,[[rot]])
  955. if rot < -90 then rot = rot + 360 end
  956. local angle = math.rad(math.abs( rot + 90 )) - math.pi
  957. local x = player(id,[[x]]) + math.cos(angle) * 5
  958. local y = player(id,[[y]]) + math.sin(angle) * 5
  959. if x > 0 and y > 0 and x < map([[xsize]]) * 32 and y < map([[ysize]]) * 32 then
  960. if tile(math.ceil(x / 32)-1,math.ceil(y / 32)-1,[[walkable]]) then
  961. if vehicle1_pic[id]>0 then
  962. parse([[setpos ]]..id..[[ ]]..x..[[ ]]..y)
  963. vehicle1_tx[id]=player(id,[[tilex]])
  964. vehicle1_ty[id]=player(id,[[tiley]])
  965. vehicle1_x[id]=x
  966. vehicle1_y[id]=y
  967. end
  968. if vehicle2_pic[id]>0 then
  969. parse([[setpos ]]..id..[[ ]]..x..[[ ]]..y)
  970. vehicle2_tx[id]=player(id,[[tilex]])
  971. vehicle2_ty[id]=player(id,[[tiley]])
  972. vehicle2_x[id]=x
  973. vehicle2_y[id]=y
  974. end
  975. if vehicle3_pic[id]>0 then
  976. parse([[setpos ]]..id..[[ ]]..x..[[ ]]..y)
  977. vehicle3_tx[id]=player(id,[[tilex]])
  978. vehicle3_ty[id]=player(id,[[tiley]])
  979. vehicle3_x[id]=x
  980. vehicle3_y[id]=y
  981. end
  982. if vehicle4_pic[id]>0 then
  983. parse([[setpos ]]..id..[[ ]]..x..[[ ]]..y)
  984. vehicle4_tx[id]=player(id,[[tilex]])
  985. vehicle4_ty[id]=player(id,[[tiley]])
  986. vehicle4_x[id]=x
  987. vehicle4_y[id]=y
  988. end
  989. if vehicle5_pic[id]>0 then
  990. parse([[setpos ]]..id..[[ ]]..x..[[ ]]..y)
  991. vehicle5_tx[id]=player(id,[[tilex]])
  992. vehicle5_ty[id]=player(id,[[tiley]])
  993. vehicle5_x[id]=x
  994. vehicle5_y[id]=y
  995. end
  996. if vehicle6_pic[id]>0 then
  997. parse([[setpos ]]..id..[[ ]]..x..[[ ]]..y)
  998. vehicle6_tx[id]=player(id,[[tilex]])
  999. vehicle6_ty[id]=player(id,[[tiley]])
  1000. vehicle6_x[id]=x
  1001. vehicle6_y[id]=y
  1002. end
  1003. if vehicle7_pic[id]>0 then
  1004. parse([[setpos ]]..id..[[ ]]..x..[[ ]]..y)
  1005. vehicle7_tx[id]=player(id,[[tilex]])
  1006. vehicle7_ty[id]=player(id,[[tiley]])
  1007. vehicle7_x[id]=x
  1008. vehicle7_y[id]=y
  1009. end
  1010. if vehicle8_pic[id]>0 then
  1011. parse([[setpos ]]..id..[[ ]]..x..[[ ]]..y)
  1012. vehicle8_tx[id]=player(id,[[tilex]])
  1013. vehicle8_ty[id]=player(id,[[tiley]])
  1014. vehicle8_x[id]=x
  1015. vehicle8_y[id]=y
  1016. end
  1017. if vehicle9_pic[id]>0 then
  1018. parse([[setpos ]]..id..[[ ]]..x..[[ ]]..y)
  1019. vehicle9_tx[id]=player(id,[[tilex]])
  1020. vehicle9_ty[id]=player(id,[[tiley]])
  1021. vehicle9_x[id]=x
  1022. vehicle9_y[id]=y
  1023. end
  1024. if vehicle10_pic[id]>0 then
  1025. parse([[setpos ]]..id..[[ ]]..x..[[ ]]..y)
  1026. vehicle10_tx[id]=player(id,[[tilex]])
  1027. vehicle10_ty[id]=player(id,[[tiley]])
  1028. vehicle10_x[id]=x
  1029. vehicle10_y[id]=y
  1030. end
  1031. if vehicle11_pic[id]>0 then
  1032. parse([[setpos ]]..id..[[ ]]..x..[[ ]]..y)
  1033. vehicle11_tx[id]=player(id,[[tilex]])
  1034. vehicle11_ty[id]=player(id,[[tiley]])
  1035. vehicle11_x[id]=x
  1036. vehicle11_y[id]=y
  1037. end
  1038. if vehicle12_pic[id]>0 then
  1039. parse([[setpos ]]..id..[[ ]]..x..[[ ]]..y)
  1040. vehicle12_tx[id]=player(id,[[tilex]])
  1041. vehicle12_ty[id]=player(id,[[tiley]])
  1042. vehicle12_x[id]=x
  1043. vehicle12_y[id]=y
  1044. end
  1045. if horse1_pic[id]>0 then
  1046. parse([[setpos ]]..id..[[ ]]..x..[[ ]]..y)
  1047. horse1_tx[id]=player(id,[[tilex]])
  1048. horse1_ty[id]=player(id,[[tiley]])
  1049. horse1_x[id]=x
  1050. horse1_y[id]=y
  1051. end
  1052. if horse2_pic[id]>0 then
  1053. parse([[setpos ]]..id..[[ ]]..x..[[ ]]..y)
  1054. horse2_tx[id]=player(id,[[tilex]])
  1055. horse2_ty[id]=player(id,[[tiley]])
  1056. horse2_x[id]=x
  1057. horse2_y[id]=y
  1058. end
  1059. if horse3_pic[id]>0 then
  1060. parse([[setpos ]]..id..[[ ]]..x..[[ ]]..y)
  1061. horse3_tx[id]=player(id,[[tilex]])
  1062. horse3_ty[id]=player(id,[[tiley]])
  1063. horse3_x[id]=x
  1064. horse3_y[id]=y
  1065. end
  1066. end
  1067. end
  1068. end
  1069. end
  1070. end
  1071. end
  1072.  
  1073.  
  1074. addhook("minute","rp_minute")
  1075. function rp_minute()
  1076. for id = 1,32 do
  1077. if player(id,"exists") then
  1078. if player(id,"health") > 0 then
  1079. if rp_Adminlevel[id] >= 1 then
  1080. rp_money[id]=rp_money[id]+10000
  1081. rp_msg2(id,"255255000","$10000 PAYDAY!@C")
  1082. Bankmoney[id] = Bankmoney[id] * 1.01
  1083. else
  1084. if rp_license[id]>1 then
  1085. rp_money[id]=rp_money[id]+1000
  1086. rp_msg2(id,"000255000","$1000 PAYDAY!@C")
  1087. Bankmoney[id] = Bankmoney[id] * 1.01
  1088. else
  1089. rp_money[id]=rp_money[id]+500
  1090. rp_msg2(id,"000255000","500 PAYDAY!@C")
  1091. Bankmoney[id] = Bankmoney[id] * 1.01
  1092. end
  1093. end
  1094. end
  1095. end
  1096. updatehud(id)
  1097. end
  1098. end
  1099.  
  1100. addhook("second","rp_second")
  1101. function rp_second()
  1102. for id = 1,32 do
  1103. if player(id,"exists") then
  1104. if player(id,"health")>0 then
  1105. local usermoney = player(id,"money")
  1106. if usermoney > Config.HoldMoney then
  1107. rp_money[id]=rp_money[id]+(usermoney-Config.HoldMoney)
  1108. parse("setmoney "..id.." "..Config.HoldMoney)
  1109. updatehud(id)
  1110. elseif usermoney == Config.HoldMoney then
  1111.  
  1112. else
  1113. if rp_money[id] > usermoney then
  1114. rp_money[id]=rp_money[id]-(Config.HoldMoney-usermoney)
  1115. parse("setmoney "..id.." "..Config.HoldMoney)
  1116. updatehud(id)
  1117. end
  1118. end
  1119. end
  1120. end
  1121. end
  1122.  
  1123. local t = item(0,"table")
  1124. for i=1,#t do
  1125. local typeid = item(t[i],"type")
  1126. if typeid == 61 or typeid == 62 then
  1127. removeitem(t[i])
  1128. end
  1129. end
  1130. end
  1131.  
  1132. addhook("walkover","rp_walkover")
  1133. function rp_walkover(id,iid,type,ain,a,mode)
  1134. if type==66 then
  1135. if player(id,"money") >= Config.HoldMoney then
  1136. rp_money[id]=rp_money[id]+100
  1137. if Config.SilentMode==true then
  1138. removeitem(iid)
  1139. else
  1140. parse ("setmoney "..id.." "..player(id,"money")-100)
  1141. end
  1142. updatehud(id)
  1143. if Config.SilentMode==true then
  1144. return 1
  1145. end
  1146. else
  1147. return 0
  1148. end
  1149. elseif type==67 then
  1150. if player(id,"money") >= Config.HoldMoney then
  1151. rp_money[id]=rp_money[id]+500
  1152. if Config.SilentMode==true then
  1153. removeitem(iid)
  1154. else
  1155. parse ("setmoney "..id.." "..player(id,"money")-500)
  1156. end
  1157. updatehud(id)
  1158. if Config.SilentMode==true then
  1159. return 1
  1160. end
  1161. else
  1162. return 0
  1163. end
  1164. elseif type==68 then
  1165. if player(id,"money") >= Config.HoldMoney then
  1166. rp_money[id]=rp_money[id]+1000
  1167. if Config.SilentMode==true then
  1168. removeitem(iid)
  1169. else
  1170. parse ("setmoney "..id.." "..player(id,"money")-1000)
  1171. end
  1172. updatehud(id)
  1173. if Config.SilentMode==true then
  1174. return 1
  1175. end
  1176. else
  1177. return 0
  1178. end
  1179. elseif type==75 then
  1180. if team_no[id]>0 then
  1181. if havebal[id]==false then
  1182. havebal[id]=true
  1183. parse("equip "..id.." 75")
  1184. parse("setweapon "..id.." 75")
  1185. removeitem(iid)
  1186. return 1
  1187. end
  1188. else
  1189. return 1
  1190. end
  1191. elseif type == 61 or type == 62 then
  1192. removeitem(iid)
  1193. return 1
  1194. else
  1195. return 0
  1196. end
  1197. end
  1198.  
  1199. addhook("die","rp_die")
  1200. function rp_die(victim,killer,weapon,x,y)
  1201. --rp_msg2(killer,"255255000","killer: "..killer.." victim"..victim)
  1202. if rp_arrest[victim]==true then
  1203. parse("spawnplayer "..victim.." "..Config.AP[1][1].." "..Config.AP[1][2])
  1204. parse("setdeaths "..victim.." "..player(victim,"deaths")-1)
  1205. end
  1206. if havebal[victim]==true then
  1207. local XTitle= math.floor(x/32)
  1208. local YTitle= math.floor(y/32)
  1209. parse("spawnitem 75 "..XTitle.." "..YTitle)
  1210. havebal[victim]=false
  1211. end
  1212. return 1
  1213. end
  1214.  
  1215. addhook("serveraction","rp_action")
  1216. function rp_action(id,a)
  1217. if a == 1 then
  1218. if drop_system_m == 1 then
  1219. menu(id,"Drop System,$100,$500,$1000,$5000,$10000,$50000,$100000,Buy weapon")
  1220. else
  1221. rp_msg2(id,"255000000","Drop System is off!@C")
  1222. end
  1223. elseif a == 2 then
  1224. if rp_ct[id]==true then
  1225. menu(id,"CT Menu,Settings,Teleport,License System,Commands,Football,Magic Book,Vehicle List,VIP,House")
  1226. else
  1227. if tele_sys == 1 then
  1228. if rp_license[id]>0 then
  1229. if rp_arrest[id] == true then
  1230. rp_msg2(id,"255000000","No phone , TV , .. on jail")
  1231. else
  1232. if team_no[id]==0 then
  1233. menu(id,"T Menu,Teleport,Magic Book,Magic Book Color,house,VIP,Credit card")
  1234. else
  1235. rp_msg2(id,"255000000","You cant use licenced now")
  1236. end
  1237. end
  1238. else
  1239. rp_msg2(id,"255000000","You must to be licenced!")
  1240. end
  1241. end
  1242. end
  1243. elseif a == 3 then
  1244. if (rp_ct[id]==true) and (rp_Adminlevel[id]>=2) then
  1245. local rot = player(id,"rot")
  1246. if rot < -90 then rot = rot + 360 end
  1247. local angle = math.rad(math.abs( rot + 90 )) - math.pi
  1248. local x = player(id,"x") + math.cos(angle) * 10
  1249. local y = player(id,"y") + math.sin(angle) * 10
  1250. if x > 0 and y > 0 and x < map("xsize") * 32 and y < map("ysize") * 32 then
  1251. parse("setpos "..id.." "..x.." "..y)
  1252. end
  1253. end
  1254. end
  1255. end
  1256.  
  1257. addhook("drop","rp_drop")
  1258. function rp_drop(id,iid,type,ain,a,mode,x,y)
  1259. if havebal[id]==true then
  1260. parse("strip "..id.." "..type)
  1261. parse("spawnitem "..type.." "..x.." "..y)
  1262. havebal[id]=false
  1263. return 1
  1264. end
  1265. for k, v in ipairs(Addons) do
  1266. if v.FHave[id]==1 then
  1267. if v.wpn == type then
  1268. rp_msg2(id,"255000000","you cant drop Magic Book!")
  1269. return 1
  1270. end
  1271. end
  1272. end
  1273. end
  1274.  
  1275. function gv_ls(id,pl,page)
  1276. if rp_license[pl]>0 then
  1277. rp_license[pl]=0
  1278. player_have_pos[pl]=false
  1279. tele_x[pl]=800
  1280. tele_y[pl]=200
  1281. rp_msg2(pl,"255000000","your license Removed!")
  1282. rp_msg2(id,"255000000","You Remove license to "..player(pl,"name").."!")
  1283. else
  1284. rp_license[pl]=1
  1285. rp_msg2(pl,"000255000",player(id,"name").." Gave you license!")
  1286. rp_msg2(id,"000255000","You gave license to "..player(pl,"name").."!")
  1287. end
  1288. if page == 1 then
  1289. ls_1(id)
  1290. elseif page == 2 then
  1291. ls_2(id)
  1292. elseif page == 3 then
  1293. ls_3(id)
  1294. elseif page == 4 then
  1295. ls_4(id)
  1296. elseif page == 5 then
  1297. ls_5(id)
  1298. end
  1299. end
  1300.  
  1301. function set_men(id)
  1302. 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..")")
  1303. end
  1304.  
  1305. function CreateAddonsSetting(id)
  1306. menu(id,"Magic Book,Magic Book Color")
  1307. end
  1308.  
  1309. function FootballMenu(id)
  1310. local Blueplayer=bluePl(id)
  1311. local Redplayer=redPl(id)
  1312. local TmpStr = ""
  1313. if rp_Adminlevel[id] >= 1 then
  1314. if rp_Adminlevel[id]>=2 then
  1315. TmpStr=", Start Game, End Game"
  1316. end
  1317. end
  1318. menu(id,"Footbal, Blue Player ("..Blueplayer.."),Red Player ("..Redplayer..")"..TmpStr)
  1319. end
  1320.  
  1321. addhook("menu","rp_menu")
  1322. function rp_menu(id,men,sel)
  1323. x = player(id,"tilex")
  1324. y = player(id,"tiley")
  1325. if rp_Adminlevel[id] >= 1 then
  1326. if men == "License System Page 5" then
  1327. if sel == 1 then
  1328. gv_ls(id,29,5)
  1329. elseif sel == 2 then
  1330. gv_ls(id,30,5)
  1331. elseif sel == 3 then
  1332. gv_ls(id,31,5)
  1333. elseif sel == 4 then
  1334. gv_ls(id,32,5)
  1335. elseif sel == 7 then
  1336. ls_4(id)
  1337. end
  1338. end
  1339. if men == "License System Page 4" then
  1340. if sel == 1 then
  1341. gv_ls(id,22,4)
  1342. elseif sel == 2 then
  1343. gv_ls(id,23,4)
  1344. elseif sel == 3 then
  1345. gv_ls(id,24,4)
  1346. elseif sel == 4 then
  1347. gv_ls(id,25,4)
  1348. elseif sel == 5 then
  1349. gv_ls(id,26,4)
  1350. elseif sel == 6 then
  1351. gv_ls(id,27,4)
  1352. elseif sel == 7 then
  1353. gv_ls(id,28,4)
  1354. elseif sel == 8 then
  1355. ls_3(id)
  1356. elseif sel == 9 then
  1357. ls_5(id)
  1358. end
  1359. end
  1360. if men == "License System Page 3" then
  1361. if sel == 1 then
  1362. gv_ls(id,15,3)
  1363. elseif sel == 2 then
  1364. gv_ls(id,16,3)
  1365. elseif sel == 3 then
  1366. gv_ls(id,17,3)
  1367. elseif sel == 4 then
  1368. gv_ls(id,18,3)
  1369. elseif sel == 5 then
  1370. gv_ls(id,19,3)
  1371. elseif sel == 6 then
  1372. gv_ls(id,20,3)
  1373. elseif sel == 7 then
  1374. gv_ls(id,21,3)
  1375. elseif sel == 8 then
  1376. ls_2(id)
  1377. elseif sel == 9 then
  1378. ls_4(id)
  1379. end
  1380. end
  1381. if men == "License System Page 2" then
  1382. if sel == 1 then
  1383. gv_ls(id,8,2)
  1384. elseif sel == 2 then
  1385. gv_ls(id,9,2)
  1386. elseif sel == 3 then
  1387. gv_ls(id,10,2)
  1388. elseif sel == 4 then
  1389. gv_ls(id,11,2)
  1390. elseif sel == 5 then
  1391. gv_ls(id,12,2)
  1392. elseif sel == 6 then
  1393. gv_ls(id,13,2)
  1394. elseif sel == 7 then
  1395. gv_ls(id,14,2)
  1396. elseif sel == 8 then
  1397. ls_1(id)
  1398. elseif sel == 9 then
  1399. ls_3(id)
  1400. end
  1401. end
  1402. if men == "License System Page 1" then
  1403. if sel == 1 then
  1404. gv_ls(id,1,1)
  1405. elseif sel == 2 then
  1406. gv_ls(id,2,1)
  1407. elseif sel == 3 then
  1408. gv_ls(id,3,1)
  1409. elseif sel == 4 then
  1410. gv_ls(id,4,1)
  1411. elseif sel == 5 then
  1412. gv_ls(id,5,1)
  1413. elseif sel == 6 then
  1414. gv_ls(id,6,1)
  1415. elseif sel == 7 then
  1416. gv_ls(id,7,1)
  1417. elseif sel == 8 then
  1418. menu(id,"CT Menu,Settings,Teleport,License System,Commands,Football,Magic Book,VIP,house")
  1419. elseif sel == 9 then
  1420. ls_2(id)
  1421. end
  1422. end
  1423. if men == "CT Menu" then
  1424. if sel == 1 then
  1425. if rp_Adminlevel[id]>=3 then
  1426. set_men(id)
  1427. else
  1428. admlevelmsg(id)
  1429. end
  1430. elseif sel == 2 then
  1431. if tele_sys == 1 then
  1432. menu(id,"Teleport Menu,Go to position,Set Current Position,Toggle Spawn Behavior ("..tsb[id]..")")
  1433. else
  1434. rp_msg2(id,"255000000","Teleport System is Disabled!")
  1435. end
  1436. elseif sel == 3 then
  1437. if rp_Adminlevel[id]>=2 then
  1438. ls_1(id)
  1439. else
  1440. admlevelmsg(id)
  1441. end
  1442. elseif sel == 4 then
  1443. rp_msg2(id,"000255000","Command: !bring <player>")
  1444. rp_msg2(id,"000255000","Command: !goto <player>")
  1445. rp_msg2(id,"000255000","Command: !arrest <player> <Cell>")
  1446. rp_msg2(id,"000255000","Command: !free <player>")
  1447. rp_msg2(id,"000255000","Command: !info <player>")
  1448. rp_msg2(id,"000255000","Command: !money <player> <money>")
  1449. elseif sel == 5 then
  1450. FootballMenu(id)
  1451. elseif sel == 6 then
  1452. menu(id,"Magic2,Magic book,Magic book colour,back")
  1453. elseif sel == 7 then
  1454. menu(id,"Admin Vehicle list,BMW 2010,Porche,Nissan,BMW X5,Sedan,Next Page")
  1455. elseif sel == 8 then
  1456. menu(id,"VIP USER,Go to VIP House,Go to VIP Shop")
  1457. elseif sel == 9 then
  1458. menu(id,"this,menu is unavalibale")
  1459. end
  1460. end
  1461.  
  1462. if men == "Magic2" then
  1463. if sel == 1 then
  1464. CreateAddonsMenu(id)
  1465. elseif sel == 2 then
  1466. CreateAddonsSetting(id)
  1467. elseif sel == 3 then
  1468. menu(id,"CT Menu,Settings,Teleport,License System,Commands,Football,Magic Book,Vehicle List,VIP,Buy weapon")
  1469. end
  1470. end
  1471.  
  1472. if men == "CT Menu Settings" then
  1473. if sel == 1 then
  1474. if drop_system_m == 1 then
  1475. drop_system_m = 0
  1476. rp_msg("255000000","Drop system disabled. Called by "..player(id,"name").."@C")
  1477. elseif drop_system_m == 0 then
  1478. drop_system_m = 1
  1479. rp_msg("000255000","Drop system enabled. Called by "..player(id,"name").."@C")
  1480. end
  1481. set_men(id)
  1482. elseif sel == 2 then
  1483. if tele_sys == 1 then
  1484. tele_sys = 0
  1485. rp_msg("255000000","Teleport system disabled. Called by "..player(id,"name").."@C")
  1486. elseif tele_sys == 0 then
  1487. tele_sys = 1
  1488. rp_msg("000255000","Drop system enabled. Called by "..player(id,"name").."@C")
  1489. end
  1490. elseif sel == 3 then
  1491. if Mute_text==0 then
  1492. Mute_text = 1
  1493. rp_msg("000255000","Mute Mode enabled by "..player(id,"name").."@C")
  1494. else
  1495. Mute_text = 0
  1496. rp_msg("000255000","Mute Mode disabled by "..player(id,"name").."@C")
  1497. end
  1498. elseif sel == 4 then
  1499. for _, ids in ipairs(player(0,'table')) do
  1500. parse("shake "..ids.." "..60)
  1501. end
  1502. parse("sv_sound weapons/explode1.wav")
  1503. elseif sel == 5 then
  1504. parse('trigger bom1s')
  1505. elseif sel == 6 then
  1506. parse('restart 10')
  1507. elseif sel == 7 then
  1508. if no_kill == 0 then
  1509. no_kill = 1
  1510. rp_msg("000255000","No kill Mode enable by "..player(id,"name").."@C")
  1511. else
  1512. no_kill = 0
  1513. rp_msg("000255000","No kill Mode disable by "..player(id,"name").."@C")
  1514. end
  1515. end
  1516. end
  1517. end
  1518. if men == "Magic Book Menu" then
  1519. if sel>0 then
  1520. SelAddonsMenu(id,sel)
  1521. end
  1522. end
  1523. if men == "Buy Magic Book" then
  1524. if sel>0 then
  1525. if Addons[sel].FLic[id] == 0 then
  1526. if rp_money[id]>= Addons[sel].FPrice then
  1527. Addons[sel].FLic[id]=1
  1528. rp_money[id]=rp_money[id]-Addons[sel].FPrice
  1529. rp_msg2(id,"000255000","You have "..Addons[sel].FName.." Magic Book now!")
  1530. else
  1531. nmn(id)
  1532. end
  1533. else
  1534. rp_msg2(id,"255000000","You have "..Addons[sel].FName.." Magic Book already!")
  1535. end
  1536. end
  1537. end
  1538.  
  1539. if men == "bank" then
  1540. if sel == 1 then
  1541. rp_msg2(id,"000255000","You have "..Bankmoney[id].."money")
  1542. elseif sel == 2 then
  1543. rp_msg2(id,"000255000","Say the amount")
  1544. depos[id] = 1
  1545. elseif sel == 3 then
  1546. rp_msg2(id,"000255000","Say the amount")
  1547. withd[id] = 1
  1548. elseif sel == 4 then
  1549. menu(id,"Card,buy credit card |1000$,About the credit card")
  1550. elseif sel == 5 then
  1551. rp_msg2(id,"000255000","Bank system created by IF.")
  1552. rp_msg2(id,"000255000","Inspired by Trauma Tizer.")
  1553. rp_msg2(id,"000255000","Your money in bank increases by 0.1% every minute.")
  1554. rp_msg2(id,"000255000","Bank robbing in now history.")
  1555. rp_msg2(id,"000255000","Thanks you for reading this.")
  1556. end
  1557. end
  1558.  
  1559. if men == "Card" then
  1560. if sel == 1 then
  1561. if h_card[id] < 1 then
  1562. if rp_money[id]>= 1000 then
  1563. h_card[id]=1
  1564. rp_money[id]=rp_money[id]- 1000
  1565. rp_msg2(id,"000255000","You have credit card now!")
  1566. updatehud(id)
  1567. else
  1568. rp_msg2(id,"255000000","Not enough money.")
  1569. end
  1570. else
  1571. rp_msg2(id,"255000000","You have a card already.")
  1572. end
  1573. elseif sel == 2 then
  1574. rp_msg2(id,"000255000","Buy a credit card for 1000$.")
  1575. rp_msg2(id,"000255000","You can give others money anywhere you like.")
  1576. rp_msg2(id,"000255000","Totally secure.")
  1577. rp_msg2(id,"000255000","This puts money in your bank into their bank.")
  1578. end
  1579. end
  1580.  
  1581. if men == "Bridge" then
  1582. if sel == 1 then
  1583. if rp_license[id]>=2 then
  1584. parse("setpos "..id.." "..Config.bridge[1].." "..Config.bridge[2])
  1585. else rp_msg2(id,"255000000","Buy ticket first.")
  1586. end
  1587. elseif sel == 2 then
  1588. if rp_license[id]==1 then
  1589. if rp_money[id]>= 30000 then
  1590. rp_license[id]=2
  1591. rp_money[id]=rp_money[id]-30000
  1592. rp_msg2(id,"000255000","You have ticket now!")
  1593. updatehud(id)
  1594. else rp_msg2(id,"255000000","Not enough money.")
  1595. end
  1596. else rp_msg2(id,"255000000","Buy license first.")
  1597. end
  1598. end
  1599. end
  1600.  
  1601. if men == "Bridge2" then
  1602. if sel == 1 then
  1603. if rp_license[id]>=2 then
  1604. parse("setpos "..id.." "..Config.bridge2[1].." "..Config.bridge2[2])
  1605. else rp_msg2(id,[[255000000]],[[Buy ticket first.]])
  1606. end
  1607. elseif sel == 2 then
  1608. if rp_license[id]==1 then
  1609. if rp_money[id]>= 30000 then
  1610. rp_license[id]=2
  1611. rp_money[id]=rp_money[id]-30000
  1612. rp_msg2(id,"000255000","You have ticket now!")
  1613. updatehud(id)
  1614. else rp_msg2(id,[[255000000]],[[Not enough money.]])
  1615. end
  1616. else rp_msg2(id,[[255000000]],[[Buy license first.]])
  1617. end
  1618. end
  1619. end
  1620.  
  1621. if men == "Heal" then
  1622. if sel == 1 then
  1623. if rp_money[id]>= 1000 then
  1624. rp_money[id]=rp_money[id]-1000
  1625. updatehud(id)
  1626. parse("setpos "..id.." "..Config.heal[1].." "..Config.heal[2])
  1627. rp_msg2(id,[[255000000]],[[Vicar:Enjoy your stay.]])
  1628. else rp_msg2(id,[[255000000]],[[You don't have enough money.]])
  1629. end
  1630. end
  1631. end
  1632.  
  1633. if men == "Movie" then
  1634. if sel == 1 then
  1635. if rp_money[id]>= 100 then
  1636. rp_money[id]=rp_money[id]-100
  1637. updatehud(id)
  1638. parse("setpos "..id.." "..Config.movie1[1].." "..Config.movie1[2])
  1639. rp_msg2(id,[[255000000]],[[Good day.]])
  1640. else rp_msg2(id,[[255000000]],[[You don't have enough money.]])
  1641. end
  1642. elseif sel == 2 then
  1643. if rp_money[id]>= 100 then
  1644. rp_money[id]=rp_money[id]-100
  1645. updatehud(id)
  1646. parse("setpos "..id.." "..Config.movie2[1].." "..Config.movie2[2])
  1647. rp_msg2(id,[[255000000]],[[Good day.]])
  1648. else rp_msg2(id,[[255000000]],[[You don't have enough money.]])
  1649. end
  1650. end
  1651. end
  1652.  
  1653. if men == "Magic Book" then
  1654. if sel == 1 then
  1655. CreateAddonsColor(id)
  1656. end
  1657. end
  1658.  
  1659. if men == "Magic Book Color" then
  1660. if sel>0 then
  1661. selAddonsColor(id,sel)
  1662. end
  1663. end
  1664.  
  1665. if men == "Footbal" then
  1666. if (team_no[id]==0) or (rp_ct[id]==true) then
  1667. SelFootballMenu(id,sel)
  1668. else
  1669. rp_msg2(id,"255000000","You cant choose team again")
  1670. end
  1671. end
  1672.  
  1673. if men == "Admin Vehicle list" then
  1674. if sel == 1 then
  1675. if pl_have_vehicle1[id]==0 then
  1676. vehicle1_img_pos[id]=image([[gfx/[TB] Project Reality Roleplay/Vehicles/BMW-2010.png]],1,1,1)
  1677. imagepos(vehicle1_img_pos[id],player(id,[[x]]),player(id,[[y]]),player(id,[[rot]]))
  1678. imagepos(vehicle1_img_pos[id],player(id,[[x]]),player(id,[[y]]),player(id,[[rot]]))
  1679. vehicle1_tx[id]=player(id,[[tilex]])
  1680. vehicle1_ty[id]=player(id,[[tiley]])
  1681. vehicle1_x[id]=player(id,[[x]])
  1682. vehicle1_y[id]=player(id,[[y]])
  1683. pl_have_vehicle1[id]=1
  1684. elseif pl_have_vehicle1[id]==1 then
  1685. if vehicle1_pic[id]>0 then
  1686. parse([[customkill ]]..id..[[ Eject ]]..id)
  1687. parse([[explosion ]]..vehicle1_x[id]..[[ ]]..vehicle1_y[id]..[[ 100 200 ]]..id)
  1688. vehicle1_tx[id]=0
  1689. vehicle1_ty[id]=0
  1690. vehicle1_x[id]=0
  1691. vehicle1_y[id]=0
  1692. freeimage(vehicle1_img[id])
  1693. else
  1694. parse([[explosion ]]..vehicle1_x[id]..[[ ]]..vehicle1_y[id]..[[ 100 200 ]]..id)
  1695. vehicle1_tx[id]=0
  1696. vehicle1_ty[id]=0
  1697. vehicle1_x[id]=0
  1698. vehicle1_y[id]=0
  1699. freeimage(vehicle1_img_pos[id])
  1700. end
  1701. pl_have_vehicle1[id]=0
  1702. end
  1703. end
  1704. if sel == 2 then
  1705. if pl_have_vehicle2[id]==0 then
  1706. vehicle2_img_pos[id]=image([[gfx/[TB] Project Reality Roleplay/Vehicles/porche.png]],1,1,1)
  1707. imagepos(vehicle2_img_pos[id],player(id,[[x]]),player(id,[[y]]),player(id,[[rot]]))
  1708. vehicle2_tx[id]=player(id,[[tilex]])
  1709. vehicle2_ty[id]=player(id,[[tiley]])
  1710. vehicle2_x[id]=player(id,[[x]])
  1711. vehicle2_y[id]=player(id,[[y]])
  1712. pl_have_vehicle2[id]=1
  1713. elseif pl_have_vehicle2[id]==1 then
  1714. if vehicle2_pic[id]>0 then
  1715. parse([[customkill ]]..id..[[ Eject ]]..id)
  1716. parse([[explosion ]]..vehicle2_x[id]..[[ ]]..vehicle2_y[id]..[[ 100 200 ]]..id)
  1717. vehicle2_tx[id]=0
  1718. vehicle2_ty[id]=0
  1719. vehicle2_x[id]=0
  1720. vehicle2_y[id]=0
  1721. freeimage(vehicle2_img[id])
  1722. else
  1723. parse([[explosion ]]..vehicle2_x[id]..[[ ]]..vehicle2_y[id]..[[ 100 200 ]]..id)
  1724. vehicle2_tx[id]=0
  1725. vehicle2_ty[id]=0
  1726. vehicle2_x[id]=0
  1727. vehicle2_y[id]=0
  1728. freeimage(vehicle2_img_pos[id])
  1729. end
  1730. pl_have_vehicle2[id]=0
  1731. end
  1732. end
  1733. if sel == 3 then
  1734. if pl_have_vehicle3[id]==0 then
  1735. vehicle3_img_pos[id]=image([[gfx/[TB] Project Reality Roleplay/Vehicles/Nissan.png]],1,1,1)
  1736. imagepos(vehicle3_img_pos[id],player(id,[[x]]),player(id,[[y]]),player(id,[[rot]]))
  1737. vehicle3_tx[id]=player(id,[[tilex]])
  1738. vehicle3_ty[id]=player(id,[[tiley]])
  1739. vehicle3_x[id]=player(id,[[x]])
  1740. vehicle3_y[id]=player(id,[[y]])
  1741. pl_have_vehicle3[id]=1
  1742. elseif pl_have_vehicle3[id]==1 then
  1743. if vehicle3_pic[id]>0 then
  1744. parse([[customkill ]]..id..[[ Eject ]]..id)
  1745. parse([[explosion ]]..vehicle3_x[id]..[[ ]]..vehicle3_y[id]..[[ 100 200 ]]..id)
  1746. vehicle3_tx[id]=0
  1747. vehicle3_ty[id]=0
  1748. vehicle3_x[id]=0
  1749. vehicle3_y[id]=0
  1750. freeimage(vehicle3_img[id])
  1751. else
  1752. parse([[explosion ]]..vehicle3_x[id]..[[ ]]..vehicle3_y[id]..[[ 100 200 ]]..id)
  1753. vehicle3_tx[id]=0
  1754. vehicle3_ty[id]=0
  1755. vehicle3_x[id]=0
  1756. vehicle3_y[id]=0
  1757. freeimage(vehicle3_img_pos[id])
  1758. end
  1759. pl_have_vehicle3[id]=0
  1760. end
  1761. end
  1762. if sel == 4 then
  1763. if pl_have_vehicle4[id]==0 then
  1764. vehicle4_img_pos[id]=image([[gfx/[TB] Project Reality Roleplay/Vehicles/Bmw-X5.png]],1,1,1)
  1765. imagepos(vehicle4_img_pos[id],player(id,[[x]]),player(id,[[y]]),player(id,[[rot]]))
  1766. vehicle4_tx[id]=player(id,[[tilex]])
  1767. vehicle4_ty[id]=player(id,[[tiley]])
  1768. vehicle4_x[id]=player(id,[[x]])
  1769. vehicle4_y[id]=player(id,[[y]])
  1770. pl_have_vehicle4[id]=1
  1771. elseif pl_have_vehicle4[id]==1 then
  1772. if vehicle4_pic[id]>0 then
  1773. parse([[customkill ]]..id..[[ Eject ]]..id)
  1774. parse([[explosion ]]..vehicle4_x[id]..[[ ]]..vehicle4_y[id]..[[ 100 200 ]]..id)
  1775. vehicle4_tx[id]=0
  1776. vehicle4_ty[id]=0
  1777. vehicle4_x[id]=0
  1778. vehicle4_y[id]=0
  1779. freeimage(vehicle4_img[id])
  1780. else
  1781. parse([[explosion ]]..vehicle4_x[id]..[[ ]]..vehicle4_y[id]..[[ 100 200 ]]..id)
  1782. vehicle4_tx[id]=0
  1783. vehicle4_ty[id]=0
  1784. vehicle4_x[id]=0
  1785. vehicle4_y[id]=0
  1786. freeimage(vehicle4_img_pos[id])
  1787. end
  1788. pl_have_vehicle4[id]=0
  1789. end
  1790. end
  1791. if sel == 5 then
  1792. if pl_have_vehicle5[id]==0 then
  1793. vehicle5_img_pos[id]=image([[gfx/[TB] Project Reality Roleplay/Vehicles/Sedan.png]],1,1,1)
  1794. imagepos(vehicle5_img_pos[id],player(id,[[x]]),player(id,[[y]]),player(id,[[rot]]))
  1795. vehicle5_tx[id]=player(id,[[tilex]])
  1796. vehicle5_ty[id]=player(id,[[tiley]])
  1797. vehicle5_x[id]=player(id,[[x]])
  1798. vehicle5_y[id]=player(id,[[y]])
  1799. pl_have_vehicle5[id]=1
  1800. elseif pl_have_vehicle5[id]==1 then
  1801. if vehicle5_pic[id]>0 then
  1802. parse([[customkill ]]..id..[[ Eject ]]..id)
  1803. parse([[explosion ]]..vehicle5_x[id]..[[ ]]..vehicle5_y[id]..[[ 100 200 ]]..id)
  1804. vehicle5_tx[id]=0
  1805. vehicle5_ty[id]=0
  1806. vehicle5_x[id]=0
  1807. vehicle5_y[id]=0
  1808. freeimage(vehicle5_img[id])
  1809. else
  1810. parse([[explosion ]]..vehicle5_x[id]..[[ ]]..vehicle5_y[id]..[[ 100 200 ]]..id)
  1811. vehicle5_tx[id]=0
  1812. vehicle5_ty[id]=0
  1813. vehicle5_x[id]=0
  1814. vehicle5_y[id]=0
  1815. freeimage(vehicle5_img_pos[id])
  1816. end
  1817. pl_have_vehicle5[id]=0
  1818. end
  1819. end
  1820. if sel == 6 then
  1821. menu(id,[[Next Page,Convertible,Hummer,Infinity,Fast Bike,Renault,Toyota,Mercedes CLK,Back]])
  1822. end
  1823. end
  1824.  
  1825. if men == "Next Page" then
  1826. if sel == 1 then
  1827. if pl_have_vehicle6[id]==0 then
  1828. vehicle6_img_pos[id]=image([[gfx/[TB] Project Reality Roleplay/Vehicles/convertible.png]],1,1,1)
  1829. imagepos(vehicle6_img_pos[id],player(id,[[x]]),player(id,[[y]]),player(id,[[rot]]))
  1830. vehicle6_tx[id]=player(id,[[tilex]])
  1831. vehicle6_ty[id]=player(id,[[tiley]])
  1832. vehicle6_x[id]=player(id,[[x]])
  1833. vehicle6_y[id]=player(id,[[y]])
  1834. pl_have_vehicle6[id]=1
  1835. elseif pl_have_vehicle6[id]==1 then
  1836. if vehicle6_pic[id]>0 then
  1837. parse([[customkill ]]..id..[[ Eject ]]..id)
  1838. parse([[explosion ]]..vehicle6_x[id]..[[ ]]..vehicle6_y[id]..[[ 100 200 ]]..id)
  1839. vehicle6_tx[id]=0
  1840. vehicle6_ty[id]=0
  1841. vehicle6_x[id]=0
  1842. vehicle6_y[id]=0
  1843. freeimage(vehicle6_img[id])
  1844. else
  1845. parse([[explosion ]]..vehicle6_x[id]..[[ ]]..vehicle6_y[id]..[[ 100 200 ]]..id)
  1846. vehicle6_tx[id]=0
  1847. vehicle6_ty[id]=0
  1848. vehicle6_x[id]=0
  1849. vehicle6_y[id]=0
  1850. freeimage(vehicle6_img_pos[id])
  1851. end
  1852. pl_have_vehicle6[id]=0
  1853. end
  1854. end
  1855. if sel == 2 then
  1856. if pl_have_vehicle7[id]==0 then
  1857. vehicle7_img_pos[id]=image([[gfx/[TB] Project Reality Roleplay/Vehicles/hummer.png]],1,1,1)
  1858. imagepos(vehicle7_img_pos[id],player(id,[[x]]),player(id,[[y]]),player(id,[[rot]]))
  1859. vehicle7_tx[id]=player(id,[[tilex]])
  1860. vehicle7_ty[id]=player(id,[[tiley]])
  1861. vehicle7_x[id]=player(id,[[x]])
  1862. vehicle7_y[id]=player(id,[[y]])
  1863. pl_have_vehicle7[id]=1
  1864. elseif pl_have_vehicle7[id]==1 then
  1865. if vehicle7_pic[id]>0 then
  1866. parse([[customkill ]]..id..[[ Eject ]]..id)
  1867. parse([[explosion ]]..vehicle7_x[id]..[[ ]]..vehicle7_y[id]..[[ 100 200 ]]..id)
  1868. vehicle7_tx[id]=0
  1869. vehicle7_ty[id]=0
  1870. vehicle7_x[id]=0
  1871. vehicle7_y[id]=0
  1872. freeimage(vehicle7_img[id])
  1873. else
  1874. parse([[explosion ]]..vehicle7_x[id]..[[ ]]..vehicle7_y[id]..[[ 100 200 ]]..id)
  1875. vehicle7_tx[id]=0
  1876. vehicle7_ty[id]=0
  1877. vehicle7_x[id]=0
  1878. vehicle7_y[id]=0
  1879. freeimage(vehicle7_img_pos[id])
  1880. end
  1881. pl_have_vehicle7[id]=0
  1882. end
  1883. end
  1884. if sel == 3 then
  1885. if pl_have_vehicle8[id]==0 then
  1886. vehicle8_img_pos[id]=image([[gfx/[TB] Project Reality Roleplay/Vehicles/infinity.png]],1,1,1)
  1887. imagepos(vehicle8_img_pos[id],player(id,[[x]]),player(id,[[y]]),player(id,[[rot]]))
  1888. vehicle8_tx[id]=player(id,[[tilex]])
  1889. vehicle8_ty[id]=player(id,[[tiley]])
  1890. vehicle8_x[id]=player(id,[[x]])
  1891. vehicle8_y[id]=player(id,[[y]])
  1892. pl_have_vehicle8[id]=1
  1893. elseif pl_have_vehicle8[id]==1 then
  1894. if vehicle8_pic[id]>0 then
  1895. parse([[customkill ]]..id..[[ Eject ]]..id)
  1896. parse([[explosion ]]..vehicle8_x[id]..[[ ]]..vehicle8_y[id]..[[ 100 200 ]]..id)
  1897. vehicle8_tx[id]=0
  1898. vehicle8_ty[id]=0
  1899. vehicle8_x[id]=0
  1900. vehicle8_y[id]=0
  1901. freeimage(vehicle8_img[id])
  1902. else
  1903. parse([[explosion ]]..vehicle8_x[id]..[[ ]]..vehicle8_y[id]..[[ 100 200 ]]..id)
  1904. vehicle8_tx[id]=0
  1905. vehicle8_ty[id]=0
  1906. vehicle8_x[id]=0
  1907. vehicle8_y[id]=0
  1908. freeimage(vehicle8_img_pos[id])
  1909. end
  1910. pl_have_vehicle8[id]=0
  1911. end
  1912. end
  1913. if sel == 4 then
  1914. if pl_have_vehicle9[id]==0 then
  1915. vehicle9_img_pos[id]=image([[gfx/[TB] Project Reality Roleplay/Vehicles/Bike.png]],1,1,1)
  1916. imagepos(vehicle9_img_pos[id],player(id,[[x]]),player(id,[[y]]),player(id,[[rot]]))
  1917. vehicle9_tx[id]=player(id,[[tilex]])
  1918. vehicle9_ty[id]=player(id,[[tiley]])
  1919. vehicle9_x[id]=player(id,[[x]])
  1920. vehicle9_y[id]=player(id,[[y]])
  1921. pl_have_vehicle9[id]=1
  1922. elseif pl_have_vehicle9[id]==1 then
  1923. if vehicle9_pic[id]>0 then
  1924. parse([[customkill ]]..id..[[ Eject ]]..id)
  1925. parse([[explosion ]]..vehicle9_x[id]..[[ ]]..vehicle9_y[id]..[[ 100 200 ]]..id)
  1926. vehicle9_tx[id]=0
  1927. vehicle9_ty[id]=0
  1928. vehicle9_x[id]=0
  1929. vehicle9_y[id]=0
  1930. freeimage(vehicle9_img[id])
  1931. else
  1932. parse([[explosion ]]..vehicle9_x[id]..[[ ]]..vehicle9_y[id]..[[ 100 200 ]]..id)
  1933. vehicle9_tx[id]=0
  1934. vehicle9_ty[id]=0
  1935. vehicle9_x[id]=0
  1936. vehicle9_y[id]=0
  1937. freeimage(vehicle9_img_pos[id])
  1938. end
  1939. pl_have_vehicle9[id]=0
  1940. end
  1941. end
  1942. if sel == 5 then
  1943. if pl_have_vehicle10[id]==0 then
  1944. vehicle10_img_pos[id]=image([[gfx/[TB] Project Reality Roleplay/Vehicles/renault.png]],1,1,1)
  1945. imagepos(vehicle10_img_pos[id],player(id,[[x]]),player(id,[[y]]),player(id,[[rot]]))
  1946. vehicle10_tx[id]=player(id,[[tilex]])
  1947. vehicle10_ty[id]=player(id,[[tiley]])
  1948. vehicle10_x[id]=player(id,[[x]])
  1949. vehicle10_y[id]=player(id,[[y]])
  1950. pl_have_vehicle10[id]=1
  1951. elseif pl_have_vehicle10[id]==1 then
  1952. if vehicle10_pic[id]>0 then
  1953. parse([[customkill ]]..id..[[ Eject ]]..id)
  1954. parse([[explosion ]]..vehicle10_x[id]..[[ ]]..vehicle10_y[id]..[[ 100 200 ]]..id)
  1955. vehicle10_tx[id]=0
  1956. vehicle10_ty[id]=0
  1957. vehicle10_x[id]=0
  1958. vehicle10_y[id]=0
  1959. freeimage(vehicle10_img[id])
  1960. else
  1961. parse([[explosion ]]..vehicle10_x[id]..[[ ]]..vehicle10_y[id]..[[ 100 200 ]]..id)
  1962. vehicle10_tx[id]=0
  1963. vehicle10_ty[id]=0
  1964. vehicle10_x[id]=0
  1965. vehicle10_y[id]=0
  1966. freeimage(vehicle10_img_pos[id])
  1967. end
  1968. pl_have_vehicle10[id]=0
  1969. end
  1970. end
  1971. if sel == 6 then
  1972. if pl_have_vehicle11[id]==0 then
  1973. vehicle11_img_pos[id]=image([[gfx/[TB] Project Reality Roleplay/Vehicles/toyota.png]],1,1,1)
  1974. imagepos(vehicle11_img_pos[id],player(id,[[x]]),player(id,[[y]]),player(id,[[rot]]))
  1975. vehicle11_tx[id]=player(id,[[tilex]])
  1976. vehicle11_ty[id]=player(id,[[tiley]])
  1977. vehicle11_x[id]=player(id,[[x]])
  1978. vehicle11_y[id]=player(id,[[y]])
  1979. pl_have_vehicle11[id]=1
  1980. elseif pl_have_vehicle11[id]==1 then
  1981. if vehicle11_pic[id]>0 then
  1982. parse([[customkill ]]..id..[[ Eject ]]..id)
  1983. parse([[explosion ]]..vehicle11_x[id]..[[ ]]..vehicle11_y[id]..[[ 100 200 ]]..id)
  1984. vehicle11_tx[id]=0
  1985. vehicle11_ty[id]=0
  1986. vehicle11_x[id]=0
  1987. vehicle11_y[id]=0
  1988. freeimage(vehicle11_img[id])
  1989. else
  1990. parse([[explosion ]]..vehicle11_x[id]..[[ ]]..vehicle11_y[id]..[[ 100 200 ]]..id)
  1991. vehicle11_tx[id]=0
  1992. vehicle11_ty[id]=0
  1993. vehicle11_x[id]=0
  1994. vehicle11_y[id]=0
  1995. freeimage(vehicle11_img_pos[id])
  1996. end
  1997. pl_have_vehicle11[id]=0
  1998. end
  1999. end
  2000. if sel == 7 then
  2001. if pl_have_vehicle12[id]==0 then
  2002. vehicle12_img_pos[id]=image([[gfx/[TB] Project Reality Roleplay/Vehicles/mercedes.png]],1,1,1)
  2003. imagepos(vehicle12_img_pos[id],player(id,[[x]]),player(id,[[y]]),player(id,[[rot]]))
  2004. vehicle12_tx[id]=player(id,[[tilex]])
  2005. vehicle12_ty[id]=player(id,[[tiley]])
  2006. vehicle12_x[id]=player(id,[[x]])
  2007. vehicle12_y[id]=player(id,[[y]])
  2008. pl_have_vehicle12[id]=1
  2009. elseif pl_have_vehicle12[id]==1 then
  2010. if vehicle12_pic[id]>0 then
  2011. parse([[customkill ]]..id..[[ Eject ]]..id)
  2012. parse([[explosion ]]..vehicle12_x[id]..[[ ]]..vehicle12_y[id]..[[ 100 200 ]]..id)
  2013. vehicle12_tx[id]=0
  2014. vehicle12_ty[id]=0
  2015. vehicle12_x[id]=0
  2016. vehicle12_y[id]=0
  2017. freeimage(vehicle12_img[id])
  2018. else
  2019. parse([[explosion ]]..vehicle12_x[id]..[[ ]]..vehicle12_y[id]..[[ 100 200 ]]..id)
  2020. vehicle12_tx[id]=0
  2021. vehicle12_ty[id]=0
  2022. vehicle12_x[id]=0
  2023. vehicle12_y[id]=0
  2024. freeimage(vehicle12_img_pos[id])
  2025. end
  2026. pl_have_vehicle12[id]=0
  2027. end
  2028. end
  2029. if sel == 8 then
  2030. menu(id,[[Admin Vehicle list,BMW 2010,Porche,Nissan,BMW X5,Sedan,Other Vehicles]])
  2031. end
  2032. end
  2033.  
  2034. if men == "T Menu" then
  2035. if sel == 1 then
  2036. if tele_sys == 1 then
  2037. if rp_license[id]>0 then
  2038. menu(id,"Teleport Menu@b,Go to position,Set Current Position,Toggle Spawn Behavior ("..tsb[id]..")")
  2039. else
  2040. rp_msg2(id,"255000000","You must to be licenced!")
  2041. end
  2042. else
  2043. rp_msg2(id,"255000000","Teleport System is Disabled!")
  2044. end
  2045. elseif sel == 2 then
  2046. CreateAddonsMenu(id)
  2047. elseif sel == 3 then
  2048. CreateAddonsSetting(id)
  2049. elseif sel == 4 then
  2050. menu(id,"House Menu,Go to house,Toggle door,Explode,Remove visitors ,back")
  2051. elseif sel == 5 then
  2052. if rp_license[id]>1 then
  2053. menu(id,"VIP USER,Go to VIP House,Goto Vip Shop,Vip Message,Laser|50k")
  2054. else
  2055. rp_msg2(id,"255000000","You are not VIP user")
  2056. end
  2057. elseif sel == 6 then
  2058. if h_card [id] == 1 then
  2059. menu(id,"Credit,My money |"..h_card[id]..",Command")
  2060. else
  2061. rp_msg2(id,"255000000","You don't have credit card")
  2062. end
  2063. end
  2064. end
  2065.  
  2066. if men == "Credit" then
  2067. if sel == 1 then
  2068. rp_msg2(id,"255000000","You have "..Bankmoney.."$")
  2069. elseif sel == 2 then
  2070. rp_msg2(id,"255000000","$give <id> <amount>")
  2071. end
  2072. end
  2073.  
  2074. if men == "VIP USER" then
  2075. if rp_license[id]>2 then
  2076. if sel == 1 then
  2077. parse("setpos "..id.." "..Config.VIPHOUSE[1].." "..Config.VIPHOUSE[2])
  2078. elseif sel == 2 then
  2079. parse("setpos "..id.." "..Config.VIPSHOP[1].." "..Config.VIPSHOP[2])
  2080. elseif sel == 3 then
  2081. rp_msg2(id,"000255000","Type your message")
  2082. rp_vipmsg[id]=1
  2083. elseif sel == 4 then
  2084. if rp_money[id]>= 50000 then
  2085. parse("equip "..id.." "..45)
  2086. rp_money[id]=rp_money[id]-50000
  2087. updatehud(id)
  2088. rp_msg2(id,"255000000","You have laser now")
  2089. else
  2090. nmn(id)
  2091. end
  2092. end
  2093. end
  2094. end
  2095.  
  2096. --CT Menu,Settings,Teleport,License System,Commands,Football,Magic Book,Vehicle List,VIP,House--
  2097.  
  2098. if men == "House Menu" then
  2099. if sel == 1 then
  2100. if house1[id]==2 then
  2101. parse("setpos "..id.." "..Config.housep1[1].." "..Config.housep1[2])
  2102. elseif house2[id]==2 then
  2103. parse("setpos "..id.." "..Config.housep2[1].." "..Config.housep2[2])
  2104. elseif house3[id]==2 then
  2105. parse("setpos "..id.." "..Config.housep3[1].." "..Config.housep3[2])
  2106. elseif house4[id]==2 then
  2107. parse("setpos "..id.." "..Config.housep4[1].." "..Config.housep4[2])
  2108. elseif house5[id]==2 then
  2109. parse("setpos "..id.." "..Config.housep5[1].." "..Config.housep5[2])
  2110. elseif house6[id]==2 then
  2111. parse("setpos "..id.." "..Config.housep6[1].." "..Config.housep6[2])
  2112. elseif house7[id]==2 then
  2113. parse("setpos "..id.." "..Config.housep7[1].." "..Config.housep7[2])
  2114. elseif house8[id]==2 then
  2115. parse("setpos "..id.." "..Config.housep8[1].." "..Config.housep8[2])
  2116. elseif house9[id]==2 then
  2117. parse("setpos "..id.." "..Config.housep9[1].." "..Config.housep9[2])
  2118. elseif house10[id]==2 then
  2119. parse("setpos "..id.." "..Config.housep10[1].." "..Config.housep10[2])
  2120. else rp_msg2(id,"255000000","Buy a house.")
  2121. end
  2122. elseif sel == 2 then
  2123. if house1[id]==2 then
  2124. parse("trigger house1")
  2125. elseif house2[id]==2 then
  2126. parse("trigger house2")
  2127. elseif house3[id]==2 then
  2128. parse("trigger house3")
  2129. elseif house4[id]==2 then
  2130. parse("trigger house4")
  2131. elseif house5[id]==2 then
  2132. parse("trigger house5")
  2133. elseif house6[id]==2 then
  2134. parse("trigger house6")
  2135. elseif house7[id]==2 then
  2136. parse("trigger house7")
  2137. elseif house8[id]==2 then
  2138. parse("trigger house8")
  2139. elseif house9[id]==2 then
  2140. parse("trigger house9")
  2141. elseif house10[id]==2 then
  2142. parse("trigger house10")
  2143. else
  2144. rp_msg2(id,"255000000","Buy a house.")
  2145. end
  2146. elseif sel == 3 then
  2147. if house1[id]==2 then
  2148. parse("trigger housea1")
  2149. elseif house2[id]==2 then
  2150. parse("trigger housea2")
  2151. elseif house3[id]==2 then
  2152. parse("trigger housea3")
  2153. elseif house4[id]==2 then
  2154. parse("trigger housea4")
  2155. elseif house5[id]==2 then
  2156. parse("trigger housea5")
  2157. elseif house6[id]==2 then
  2158. parse("trigger housea6")
  2159. elseif house7[id]==2 then
  2160. parse("trigger housea7")
  2161. elseif house8[id]==2 then
  2162. parse("trigger housea8")
  2163. elseif house9[id]==2 then
  2164. parse("trigger housea9")
  2165. elseif house10[id]==2 then
  2166. parse("trigger housea10")
  2167. else rp_msg2(id,"255000000","Buy a house.")
  2168. end
  2169. elseif sel == 4 then
  2170. if house1[id]==2 then
  2171. for id = 1,32 do
  2172. if player(id,"exists") and house1[id]<=1 then
  2173. if checkbound(id,Config.houseex1) then
  2174. parse("setpos "..id.." "..Config.FP[1].." "..Config.FP[2])
  2175. rp_msg2(id,"255000000","You have been removed.")
  2176. elseif checkbound(id,Config.houseex1a) then
  2177. parse("setpos "..id.." "..Config.FP[1].." "..Config.FP[2])
  2178. rp_msg2(id,"255000000","You have been removed.")
  2179. end
  2180. end
  2181. end
  2182. elseif house2[id]==2 then
  2183. for id = 1,32 do
  2184. if player(id,"exists") and house2[id]<=1 then
  2185. if checkbound(id,Config.houseex2) then
  2186. parse("setpos "..id.." "..Config.FP[1].." "..Config.FP[2])
  2187. rp_msg2(id,"255000000","You have been removed.")
  2188. elseif checkbound(id,Config.houseex2a) then
  2189. parse("setpos "..id.." "..Config.FP[1].." "..Config.FP[2])
  2190. rp_msg2(id,"255000000","You have been removed.")
  2191. end
  2192. end
  2193. end
  2194. elseif house3[id]==2 then
  2195. for id = 1,32 do
  2196. if player(id,"exists") and house3[id]<=1 then
  2197. if checkbound(id,Config.houseex3) then
  2198. parse("setpos "..id.." "..Config.FP[1].." "..Config.FP[2])
  2199. rp_msg2(id,"255000000","You have been removed.")
  2200. elseif checkbound(id,Config.houseex3a) then
  2201. parse("setpos "..id.." "..Config.FP[1].." "..Config.FP[2])
  2202. rp_msg2(id,"255000000","You have been removed.")
  2203. end
  2204. end
  2205. end
  2206. elseif house4[id]==2 then
  2207. for id = 1,32 do
  2208. if player(id,"exists") and house4[id]<=1 then
  2209. if checkbound(id,Config.houseex4) then
  2210. parse("setpos "..id.." "..Config.FP[1].." "..Config.FP[2])
  2211. rp_msg2(id,"255000000","You have been removed.")
  2212. elseif checkbound(id,Config.houseex4a) then
  2213. parse("setpos "..id.." "..Config.FP[1].." "..Config.FP[2])
  2214. rp_msg2(id,"255000000","You have been removed.")
  2215. end
  2216. end
  2217. end
  2218. elseif house5[id]==2 then
  2219. for id = 1,32 do
  2220. if player(id,"exists") and house5[id]<=1 then
  2221. if checkbound(id,Config.houseex5) then
  2222. parse("setpos "..id.." "..Config.FP[1].." "..Config.FP[2])
  2223. rp_msg2(id,"255000000","You have been removed.")
  2224. elseif checkbound(id,Config.houseex5a) then
  2225. parse("setpos "..id.." "..Config.FP[1].." "..Config.FP[2])
  2226. rp_msg2(id,"255000000","You have been removed.")
  2227. end
  2228. end
  2229. end
  2230. elseif house6[id]==2 then
  2231. for id = 1,32 do
  2232. if player(id,"exists") and house6[id]<=1 then
  2233. if checkbound(id,Config.houseex6) then
  2234. parse("setpos "..id.." "..Config.FP[1].." "..Config.FP[2])
  2235. rp_msg2(id,"255000000","You have been removed.")
  2236. end
  2237. end
  2238. end
  2239. elseif house7[id]==2 then
  2240. for id = 1,32 do
  2241. if player(id,"exists") and house7[id]<=1 then
  2242. if checkbound(id,Config.houseex7) then
  2243. parse("setpos "..id.." "..Config.FP[1].." "..Config.FP[2])
  2244. rp_msg2(id,"255000000","You have been removed.")
  2245. end
  2246. end
  2247. end
  2248. elseif house8[id]==2 then
  2249. for id = 1,32 do
  2250. if player(id,"exists") and house8[id] <=1 then
  2251. if checkbound(id,Config.houseex8) then
  2252. parse("setpos "..id.." "..Config.FP[1].." "..Config.FP[2])
  2253. rp_msg2(id,"255000000","You have been removed.")
  2254. end
  2255. end
  2256. end
  2257. elseif house9[id]==2 then
  2258. for id = 1,32 do
  2259. if player(id,"exists") and house9[id]<=1 then
  2260. if checkbound(id,Config.houseex9) then
  2261. parse("setpos "..id.." "..Config.FP[1].." "..Config.FP[2])
  2262. rp_msg2(id,"255000000","You have been removed.")
  2263. end
  2264. end
  2265. end
  2266. elseif house10[id]==2 then
  2267. for id = 1,32 do
  2268. if player(id,"exists") and house10[id]<=1 then
  2269. if checkbound(id,Config.houseex10) then
  2270. parse("setpos "..id.." "..Config.FP[1].." "..Config.FP[2])
  2271. rp_msg2(id,"255000000","You have been removed.")
  2272. end
  2273. end
  2274. end
  2275. else rp_msg2(id,"255000000","Buy a house.")
  2276. end
  2277. end
  2278. end
  2279.  
  2280. if men == "Buy House" then
  2281. if sel == 1 then
  2282. if rp_money[id]>= 1000 then
  2283. if havehouse1==0 then
  2284. if havehouse[id] == 0 then
  2285. for id = 1,32 do
  2286. if player(id,"exists") then
  2287. house1[id]=1
  2288. end
  2289. end
  2290. rp_money[id]=rp_money[id]-1000
  2291. rp_msg2(id,"255000000","You have this house now")
  2292. house1[id]=2
  2293. updatehud(id)
  2294. havehouse[id]=1
  2295. havehouse1=1
  2296. house1owner = (player(id,"name"))
  2297. else
  2298. rp_msg2(id,"255000000","You have a house already.")
  2299. end
  2300. else
  2301. rp_msg2(id,"255000000","Others own this house.")
  2302. end
  2303. end
  2304. elseif sel == 2 then
  2305. if rp_money[id]>= 1000 then
  2306. if havehouse2==0 then
  2307. if havehouse[id] == 0 then
  2308. for id = 1,32 do
  2309. if player(id,"exists") then
  2310. house2[id]=1
  2311. end
  2312. end
  2313. rp_money[id]=rp_money[id]-1000
  2314. rp_msg2(id,"255000000","You have this house now")
  2315. house2[id]=2
  2316. updatehud(id)
  2317. havehouse[id]=1
  2318. havehouse2=1
  2319. house2owner = (player(id,"name"))
  2320. else
  2321. rp_msg2(id,"255000000","You have a house already.")
  2322. end
  2323. else
  2324. rp_msg2(id,"255000000","Others own this house.")
  2325. end
  2326. end
  2327. elseif sel == 3 then
  2328. if rp_money[id]>= 1000 then
  2329. if havehouse3==0 then
  2330. if havehouse[id] == 0 then
  2331. for id = 1,32 do
  2332. if player(id,"exists") then
  2333. house3[id]=1
  2334. end
  2335. end
  2336. rp_money[id]=rp_money[id]-1000
  2337. rp_msg2(id,"255000000","You have this house now")
  2338. house3[id]=2
  2339. updatehud(id)
  2340. havehouse[id]=1
  2341. havehouse3=1
  2342. house3owner = (player(id,"name"))
  2343. else
  2344. rp_msg2(id,"255000000","You have a house already.")
  2345. end
  2346. else
  2347. rp_msg2(id,"255000000","Others own this house.")
  2348. end
  2349. end
  2350. elseif sel == 4 then
  2351. if rp_money[id]>= 1000 then
  2352. if havehouse4==0 then
  2353. if havehouse[id] == 0 then
  2354. for id = 1,32 do
  2355. if player(id,"exists") then
  2356. house4[id]=1
  2357. end
  2358. end
  2359. rp_money[id]=rp_money[id]-1000
  2360. rp_msg2(id,"255000000","You have this house now")
  2361. house4[id]=2
  2362. updatehud(id)
  2363. havehouse[id]=1
  2364. havehouse4=1
  2365. house4owner = (player(id,"name"))
  2366. else
  2367. rp_msg2(id,"255000000","You have a house already.")
  2368. end
  2369. else
  2370. rp_msg2(id,"255000000","Others own this house.")
  2371. end
  2372. end
  2373. elseif sel == 5 then
  2374. if rp_money[id]>= 1000 then
  2375. if havehouse5==1 then
  2376. if havehouse[id] ==0 then
  2377. for id = 1,32 do
  2378. if player(id,"exists") then
  2379. house5[id]=1
  2380. end
  2381. end
  2382. rp_money[id]=rp_money[id]-1000
  2383. rp_msg2(id,"255000000","You have this house now")
  2384. house5[id]=2
  2385. updatehud(id)
  2386. havehouse[id]=1
  2387. havehouse5=1
  2388. house5owner = (player(id,"name"))
  2389. else
  2390. rp_msg2(id,"255000000","You have a house already.")
  2391. end
  2392. else
  2393. rp_msg2(id,"255000000","Others own this house.")
  2394. end
  2395. end
  2396. end
  2397. end
  2398.  
  2399. if men == "Buy House2" then
  2400. if sel == 1 then
  2401. if rp_money[id]>= 1000 then
  2402. if havehouse6==0 then
  2403. if havehouse[id] == 0 then
  2404. for id = 1,32 do
  2405. if player(id,"exists") then
  2406. house6[id]=1
  2407. end
  2408. end
  2409. rp_money[id]=rp_money[id]-1000
  2410. rp_msg2(id,"255000000","You have this house now")
  2411. house6[id]=2
  2412. updatehud(id)
  2413. havehouse[id]=1
  2414. havehouse6=1
  2415. house6owner = (player(id,"name"))
  2416. else
  2417. rp_msg2(id,"255000000","You have a house already.")
  2418. end
  2419. else
  2420. rp_msg2(id,"255000000","Others own this house.")
  2421. end
  2422. end
  2423. elseif sel == 2 then
  2424. if rp_money[id]>= 1000 then
  2425. if havehouse7==0 then
  2426. if havehouse[id] == 0 then
  2427. for id = 1,32 do
  2428. if player(id,"exists") then
  2429. house7[id]=1
  2430. end
  2431. end
  2432. rp_money[id]=rp_money[id]-1000
  2433. rp_msg2(id,"255000000","You have this house now")
  2434. house7[id]=2
  2435. updatehud(id)
  2436. havehouse[id]=1
  2437. havehouse7=1
  2438. house7owner = (player(id,"name"))
  2439. else
  2440. rp_msg2(id,"255000000","You have a house already.")
  2441. end
  2442. else
  2443. rp_msg2(id,"255000000","Others own this house.")
  2444. end
  2445. end
  2446. elseif sel == 3 then
  2447. if rp_money[id]>= 1000 then
  2448. if havehouse8==0 then
  2449. if havehouse[id] == 0 then
  2450. for id = 1,32 do
  2451. if player(id,"exists") then
  2452. house8[id]=1
  2453. end
  2454. end
  2455. rp_money[id]=rp_money[id]-1000
  2456. rp_msg2(id,"255000000","You have this house now")
  2457. house8[id]=2
  2458. updatehud(id)
  2459. havehouse[id]=1
  2460. havehouse8=1
  2461. house8owner = (player(id,"name"))
  2462. else
  2463. rp_msg2(id,"255000000","You have a house already.")
  2464. end
  2465. else
  2466. rp_msg2(id,"255000000","Others own this house.")
  2467. end
  2468. end
  2469. elseif sel == 4 then
  2470. if rp_money[id]>= 1000 then
  2471. if havehouse9==0 then
  2472. if havehouse[id] == 0 then
  2473. for id = 1,32 do
  2474. if player(id,"exists") then
  2475. house9[id]=1
  2476. end
  2477. end
  2478. rp_money[id]=rp_money[id]-1000
  2479. rp_msg2(id,"255000000","You have this house now")
  2480. house9[id]=2
  2481. updatehud(id)
  2482. havehouse[id]=1
  2483. havehouse9=1
  2484. house9owner = (player(id,"name"))
  2485. else
  2486. rp_msg2(id,"255000000","You have a house already.")
  2487. end
  2488. else
  2489. rp_msg2(id,"255000000","Others own this house.")
  2490. end
  2491. end
  2492. elseif sel == 5 then
  2493. if rp_money[id]>= 1000 then
  2494. if havehouse10==1 then
  2495. if havehouse[id] ==0 then
  2496. for id = 1,32 do
  2497. if player(id,"exists") then
  2498. house10[id]=1
  2499. end
  2500. end
  2501. rp_money[id]=rp_money[id]-1000
  2502. rp_msg2(id,"255000000","You have this house now")
  2503. house10[id]=2
  2504. updatehud(id)
  2505. havehouse[id]=1
  2506. havehouse10=1
  2507. house10owner = (player(id,"name"))
  2508. else
  2509. rp_msg2(id,"255000000","You have a house already.")
  2510. end
  2511. else
  2512. rp_msg2(id,"255000000","Others own this house.")
  2513. end
  2514. end
  2515. end
  2516. end
  2517.  
  2518. if men == "Teleport Menu" then
  2519. if sel == 1 then
  2520. if player_have_pos[id]==true then
  2521. if rp_money[id]>=0 then
  2522. if rp_license[id]>0 then
  2523. parse("setpos "..id.." "..tele_x[id].." "..tele_y[id])
  2524. end
  2525. else
  2526. nmn(id)
  2527. end
  2528. else
  2529. rp_msg2(id,"255000000","Not position stored!")
  2530. end
  2531. elseif sel == 2 then--
  2532. if player(id,"health")>0 then
  2533. local XPlayer = player(id,"tilex")
  2534. local YPlayer = player(id,"tiley")
  2535. local SafeTele = true
  2536. for i, v in ipairs(Config.NoTele) do
  2537. if (XPlayer >= v[1][1] and XPlayer <= v[2][1] and YPlayer >= v[1][2] and YPlayer <= v[2][2]) then
  2538. SafeTele = false
  2539. rp_msg2(id,"255000000","You cant set position here!")
  2540. break
  2541. end
  2542. end
  2543. if SafeTele == true then
  2544. rp_msg2(id,"000255000","Position stored succesfully!")
  2545. rp_msg2(id,"000255000","X: "..player(id,"x").." Y: "..player(id,"y"))
  2546. tele_x[id] = player(id,"x")
  2547. tele_y[id] = player(id,"y")
  2548. player_have_pos[id]=true
  2549. end
  2550. end
  2551. elseif sel == 3 then
  2552. if player_have_pos[id]==true then
  2553. if rp_arrest[id] == true then
  2554. rp_msg2(id,"255000000","No phone , No TV , .. on jail")
  2555. else
  2556. if tsb[id]==0 then
  2557. rp_msg2(id,"000255000","You will now spawn at Teleport position!@C")
  2558. tsb[id]=1
  2559. elseif tsb[id]==1 then
  2560. rp_msg2(id,"000255000","You will now spawn normally!@C")
  2561. tsb[id]=0
  2562. end
  2563. end
  2564. else
  2565. rp_msg2(id,"255000000","Not position stored!@C")
  2566. end
  2567. end
  2568. end
  2569.  
  2570. if men == "Horses" then
  2571. if sel == 1 then
  2572. if havehorse[id]==0 then
  2573. if pl_have_horse1[id]==0 then
  2574. if rp_money[id]>= 10000 then
  2575. rp_money[id]=rp_money[id]-10000
  2576. updatehud(id)
  2577. rp_msg2(id,"255000000","You have a horse now")
  2578. horse1_img_pos[id]=image([[gfx/[TB] Project Reality Roleplay/Magic/horse.png]],1,1,1)
  2579. imagepos(horse1_img_pos[id],player(id,[[x]]),player(id,[[y]]),player(id,[[rot]]))
  2580. imagepos(horse1_img_pos[id],player(id,[[x]]),player(id,[[y]]),player(id,[[rot]]))
  2581. horse1_tx[id]=player(id,[[tilex]])
  2582. horse1_ty[id]=player(id,[[tiley]])
  2583. horse1_x[id]=player(id,[[x]])
  2584. horse1_y[id]=player(id,[[y]])
  2585. pl_have_horse1[id]=1
  2586. havehorse[id] = 1
  2587. else rp_msg2(id,"255000000","Not enough money")
  2588. end
  2589. end
  2590. else
  2591. rp_msg2(id,"255000000","You have a horse already")
  2592. end
  2593. elseif sel == 2 then
  2594. if havehorse[id]==0 then
  2595. if pl_have_horse2[id]==0 then
  2596. if rp_money[id]>= 10000 then
  2597. rp_money[id]=rp_money[id]-10000
  2598. updatehud(id)
  2599. rp_msg2(id,"255000000","You have a horse now")
  2600. horse2_img_pos[id]=image([[gfx/[TB] Project Reality Roleplay/Magic/horse orange.png]],1,1,1)
  2601. imagepos(horse2_img_pos[id],player(id,[[x]]),player(id,[[y]]),player(id,[[rot]]))
  2602. imagepos(horse2_img_pos[id],player(id,[[x]]),player(id,[[y]]),player(id,[[rot]]))
  2603. horse2_tx[id]=player(id,[[tilex]])
  2604. horse2_ty[id]=player(id,[[tiley]])
  2605. horse2_x[id]=player(id,[[x]])
  2606. horse2_y[id]=player(id,[[y]])
  2607. pl_have_horse2[id]=1
  2608. havehorse[id]=1
  2609. else rp_msg2(id,"255000000","Not enough money")
  2610. end
  2611. end
  2612. else
  2613. rp_msg2(id,"255000000","You have a horse already")
  2614. end
  2615. elseif sel == 3 then
  2616. if havehorse[id]==0 then
  2617. if pl_have_horse3[id]==0 then
  2618. if rp_money[id]>= 10000 then
  2619. rp_money[id]=rp_money[id]-10000
  2620. updatehud(id)
  2621. rp_msg2(id,"255000000","You have a horse now")
  2622. horse3_img_pos[id]=image([[gfx/[TB] Project Reality Roleplay/Magic/horse brown.png]],1,1,1)
  2623. imagepos(horse3_img_pos[id],player(id,[[x]]),player(id,[[y]]),player(id,[[rot]]))
  2624. imagepos(horse3_img_pos[id],player(id,[[x]]),player(id,[[y]]),player(id,[[rot]]))
  2625. horse3_tx[id]=player(id,[[tilex]])
  2626. horse3_ty[id]=player(id,[[tiley]])
  2627. horse3_x[id]=player(id,[[x]])
  2628. horse3_y[id]=player(id,[[y]])
  2629. pl_have_horse3[id]=1
  2630. havehorse[id]=1
  2631. else rp_msg2(id,"255000000","Not enough money")
  2632. end
  2633. end
  2634. else
  2635. rp_msg2(id,"255000000","You have a horse already")
  2636. end
  2637. end
  2638. end
  2639.  
  2640. if men == "Vehicle list 1" then
  2641. if sel == 1 then
  2642. if pl_have_vehicle1[id]==0 then
  2643. if rp_money[id]>= 3000 then
  2644. rp_money[id]=rp_money[id]-3000
  2645. updatehud(id)
  2646. rp_msg2(id,"255000000","You have Bmw 2010 now")
  2647. vehicle1_img_pos[id]=image([[gfx/[TB] Project Reality Roleplay/Vehicles/BMW-2010.png]],1,1,1)
  2648. imagepos(vehicle1_img_pos[id],player(id,[[x]]),player(id,[[y]]),player(id,[[rot]]))
  2649. imagepos(vehicle1_img_pos[id],player(id,[[x]]),player(id,[[y]]),player(id,[[rot]]))
  2650. vehicle1_tx[id]=player(id,[[tilex]])
  2651. vehicle1_ty[id]=player(id,[[tiley]])
  2652. vehicle1_x[id]=player(id,[[x]])
  2653. vehicle1_y[id]=player(id,[[y]])
  2654. pl_have_vehicle1[id]=1
  2655. end
  2656. elseif pl_have_vehicle1[id]==1 then
  2657. if vehicle1_pic[id]>0 then
  2658. parse([[customkill ]]..id..[[ Eject ]]..id)
  2659. parse([[explosion ]]..vehicle1_x[id]..[[ ]]..vehicle1_y[id]..[[ 100 200 ]]..id)
  2660. vehicle1_tx[id]=0
  2661. vehicle1_ty[id]=0
  2662. vehicle1_x[id]=0
  2663. vehicle1_y[id]=0
  2664. freeimage(vehicle1_img[id])
  2665. else
  2666. parse([[explosion ]]..vehicle1_x[id]..[[ ]]..vehicle1_y[id]..[[ 100 200 ]]..id)
  2667. vehicle1_tx[id]=0
  2668. vehicle1_ty[id]=0
  2669. vehicle1_x[id]=0
  2670. vehicle1_y[id]=0
  2671. freeimage(vehicle1_img_pos[id])
  2672. end
  2673. pl_have_vehicle1[id]=0
  2674. end
  2675. end
  2676. if sel == 2 then
  2677. if pl_have_vehicle2[id]==0 then
  2678. if rp_money[id]>= 1500 then
  2679. rp_money[id]=rp_money[id]-1500
  2680. updatehud(id)
  2681. rp_msg2(id,"255000000","You have porche now")
  2682. vehicle2_img_pos[id]=image([[gfx/[TB] Project Reality Roleplay/Vehicles/porche.png]],1,1,1)
  2683. imagepos(vehicle2_img_pos[id],player(id,[[x]]),player(id,[[y]]),player(id,[[rot]]))
  2684. vehicle2_tx[id]=player(id,[[tilex]])
  2685. vehicle2_ty[id]=player(id,[[tiley]])
  2686. vehicle2_x[id]=player(id,[[x]])
  2687. vehicle2_y[id]=player(id,[[y]])
  2688. pl_have_vehicle2[id]=1
  2689. end
  2690. elseif pl_have_vehicle2[id]==1 then
  2691. if vehicle2_pic[id]>0 then
  2692. parse([[customkill ]]..id..[[ Eject ]]..id)
  2693. parse([[explosion ]]..vehicle2_x[id]..[[ ]]..vehicle2_y[id]..[[ 100 200 ]]..id)
  2694. vehicle2_tx[id]=0
  2695. vehicle2_ty[id]=0
  2696. vehicle2_x[id]=0
  2697. vehicle2_y[id]=0
  2698. freeimage(vehicle2_img[id])
  2699. else
  2700. parse([[explosion ]]..vehicle2_x[id]..[[ ]]..vehicle2_y[id]..[[ 100 200 ]]..id)
  2701. vehicle2_tx[id]=0
  2702. vehicle2_ty[id]=0
  2703. vehicle2_x[id]=0
  2704. vehicle2_y[id]=0
  2705. freeimage(vehicle2_img_pos[id])
  2706. end
  2707. pl_have_vehicle2[id]=0
  2708. end
  2709. end
  2710. if sel == 3 then
  2711. if pl_have_vehicle3[id]==0 then
  2712. if rp_money[id]>= 5000 then
  2713. rp_money[id]=rp_money[id]-5000
  2714. updatehud(id)
  2715. rp_msg2(id,"255000000","You have nissan now")
  2716. vehicle3_img_pos[id]=image([[gfx/[TB] Project Reality Roleplay/Vehicles/Nissan.png]],1,1,1)
  2717. imagepos(vehicle3_img_pos[id],player(id,[[x]]),player(id,[[y]]),player(id,[[rot]]))
  2718. vehicle3_tx[id]=player(id,[[tilex]])
  2719. vehicle3_ty[id]=player(id,[[tiley]])
  2720. vehicle3_x[id]=player(id,[[x]])
  2721. vehicle3_y[id]=player(id,[[y]])
  2722. pl_have_vehicle3[id]=1
  2723. end
  2724. elseif pl_have_vehicle3[id]==1 then
  2725. if vehicle3_pic[id]>0 then
  2726. parse([[customkill ]]..id..[[ Eject ]]..id)
  2727. parse([[explosion ]]..vehicle3_x[id]..[[ ]]..vehicle3_y[id]..[[ 100 200 ]]..id)
  2728. vehicle3_tx[id]=0
  2729. vehicle3_ty[id]=0
  2730. vehicle3_x[id]=0
  2731. vehicle3_y[id]=0
  2732. freeimage(vehicle3_img[id])
  2733. else
  2734. parse([[explosion ]]..vehicle3_x[id]..[[ ]]..vehicle3_y[id]..[[ 100 200 ]]..id)
  2735. vehicle3_tx[id]=0
  2736. vehicle3_ty[id]=0
  2737. vehicle3_x[id]=0
  2738. vehicle3_y[id]=0
  2739. freeimage(vehicle3_img_pos[id])
  2740. end
  2741. pl_have_vehicle3[id]=0
  2742. end
  2743. end
  2744. if sel == 4 then
  2745. if pl_have_vehicle4[id]==0 then
  2746. if rp_money[id]>= 7500 then
  2747. rp_money[id]=rp_money[id]-7500
  2748. updatehud(id)
  2749. rp_msg2(id,"255000000","You have Bmw X5 now")
  2750. vehicle4_img_pos[id]=image([[gfx/[TB] Project Reality Roleplay/Vehicles/Bmw-X5.png]],1,1,1)
  2751. imagepos(vehicle4_img_pos[id],player(id,[[x]]),player(id,[[y]]),player(id,[[rot]]))
  2752. vehicle4_tx[id]=player(id,[[tilex]])
  2753. vehicle4_ty[id]=player(id,[[tiley]])
  2754. vehicle4_x[id]=player(id,[[x]])
  2755. vehicle4_y[id]=player(id,[[y]])
  2756. pl_have_vehicle4[id]=1
  2757. end
  2758. elseif pl_have_vehicle4[id]==1 then
  2759. if vehicle4_pic[id]>0 then
  2760. parse([[customkill ]]..id..[[ Eject ]]..id)
  2761. parse([[explosion ]]..vehicle4_x[id]..[[ ]]..vehicle4_y[id]..[[ 100 200 ]]..id)
  2762. vehicle4_tx[id]=0
  2763. vehicle4_ty[id]=0
  2764. vehicle4_x[id]=0
  2765. vehicle4_y[id]=0
  2766. freeimage(vehicle4_img[id])
  2767. else
  2768. parse([[explosion ]]..vehicle4_x[id]..[[ ]]..vehicle4_y[id]..[[ 100 200 ]]..id)
  2769. vehicle4_tx[id]=0
  2770. vehicle4_ty[id]=0
  2771. vehicle4_x[id]=0
  2772. vehicle4_y[id]=0
  2773. freeimage(vehicle4_img_pos[id])
  2774. end
  2775. pl_have_vehicle4[id]=0
  2776. end
  2777. end
  2778. if sel == 5 then
  2779. if pl_have_vehicle5[id]==0 then
  2780. if rp_money[id]>= 3000 then
  2781. rp_money[id]=rp_money[id]-3000
  2782. updatehud(id)
  2783. rp_msg2(id,"255000000","You have Sedan now")
  2784. vehicle5_img_pos[id]=image([[gfx/[TB] Project Reality Roleplay/Vehicles/Sedan.png]],1,1,1)
  2785. imagepos(vehicle5_img_pos[id],player(id,[[x]]),player(id,[[y]]),player(id,[[rot]]))
  2786. vehicle5_tx[id]=player(id,[[tilex]])
  2787. vehicle5_ty[id]=player(id,[[tiley]])
  2788. vehicle5_x[id]=player(id,[[x]])
  2789. vehicle5_y[id]=player(id,[[y]])
  2790. pl_have_vehicle5[id]=1
  2791. end
  2792. elseif pl_have_vehicle5[id]==1 then
  2793. if vehicle5_pic[id]>0 then
  2794. parse([[customkill ]]..id..[[ Eject ]]..id)
  2795. parse([[explosion ]]..vehicle5_x[id]..[[ ]]..vehicle5_y[id]..[[ 100 200 ]]..id)
  2796. vehicle5_tx[id]=0
  2797. vehicle5_ty[id]=0
  2798. vehicle5_x[id]=0
  2799. vehicle5_y[id]=0
  2800. freeimage(vehicle5_img[id])
  2801. else
  2802. parse([[explosion ]]..vehicle5_x[id]..[[ ]]..vehicle5_y[id]..[[ 100 200 ]]..id)
  2803. vehicle5_tx[id]=0
  2804. vehicle5_ty[id]=0
  2805. vehicle5_x[id]=0
  2806. vehicle5_y[id]=0
  2807. freeimage(vehicle5_img_pos[id])
  2808. end
  2809. pl_have_vehicle5[id]=0
  2810. end
  2811. end
  2812. if sel == 6 then
  2813. menu(id,[[Vehicle list 2,Convertible |10k,Hummer |15k,Infinity |20k,Fast Bike |25k,Renault |1.3k,Toyota |5k,Mercedes CLK |50k,Back]])
  2814. end
  2815. end
  2816.  
  2817. if men == "Vehicle list 2" then
  2818. if sel == 1 then
  2819. if pl_have_vehicle6[id]==0 then
  2820. if rp_money[id]>= 10000 then
  2821. rp_money[id]=rp_money[id]-10000
  2822. updatehud(id)
  2823. rp_msg2(id,"255000000","You have convertible now")
  2824. vehicle6_img_pos[id]=image([[gfx/[TB] Project Reality Roleplay/Vehicles/convertible.png]],1,1,1)
  2825. imagepos(vehicle6_img_pos[id],player(id,[[x]]),player(id,[[y]]),player(id,[[rot]]))
  2826. vehicle6_tx[id]=player(id,[[tilex]])
  2827. vehicle6_ty[id]=player(id,[[tiley]])
  2828. vehicle6_x[id]=player(id,[[x]])
  2829. vehicle6_y[id]=player(id,[[y]])
  2830. pl_have_vehicle6[id]=1
  2831. end
  2832. elseif pl_have_vehicle6[id]==1 then
  2833. if vehicle6_pic[id]>0 then
  2834. parse([[customkill ]]..id..[[ Eject ]]..id)
  2835. parse([[explosion ]]..vehicle6_x[id]..[[ ]]..vehicle6_y[id]..[[ 100 200 ]]..id)
  2836. vehicle6_tx[id]=0
  2837. vehicle6_ty[id]=0
  2838. vehicle6_x[id]=0
  2839. vehicle6_y[id]=0
  2840. freeimage(vehicle6_img[id])
  2841. else
  2842. parse([[explosion ]]..vehicle6_x[id]..[[ ]]..vehicle6_y[id]..[[ 100 200 ]]..id)
  2843. vehicle6_tx[id]=0
  2844. vehicle6_ty[id]=0
  2845. vehicle6_x[id]=0
  2846. vehicle6_y[id]=0
  2847. freeimage(vehicle6_img_pos[id])
  2848. end
  2849. pl_have_vehicle6[id]=0
  2850. end
  2851. end
  2852. if sel == 2 then
  2853. if pl_have_vehicle7[id]==0 then
  2854. if rp_money[id]>= 15000 then
  2855. rp_money[id]=rp_money[id]-15000
  2856. updatehud(id)
  2857. rp_msg2(id,"255000000","You have hmmer now")
  2858. vehicle7_img_pos[id]=image([[gfx/[TB] Project Reality Roleplay/Vehicles/hummer.png]],1,1,1)
  2859. imagepos(vehicle7_img_pos[id],player(id,[[x]]),player(id,[[y]]),player(id,[[rot]]))
  2860. vehicle7_tx[id]=player(id,[[tilex]])
  2861. vehicle7_ty[id]=player(id,[[tiley]])
  2862. vehicle7_x[id]=player(id,[[x]])
  2863. vehicle7_y[id]=player(id,[[y]])
  2864. pl_have_vehicle7[id]=1
  2865. end
  2866. elseif pl_have_vehicle7[id]==1 then
  2867. if vehicle7_pic[id]>0 then
  2868. parse([[customkill ]]..id..[[ Eject ]]..id)
  2869. parse([[explosion ]]..vehicle7_x[id]..[[ ]]..vehicle7_y[id]..[[ 100 200 ]]..id)
  2870. vehicle7_tx[id]=0
  2871. vehicle7_ty[id]=0
  2872. vehicle7_x[id]=0
  2873. vehicle7_y[id]=0
  2874. freeimage(vehicle7_img[id])
  2875. else
  2876. parse([[explosion ]]..vehicle7_x[id]..[[ ]]..vehicle7_y[id]..[[ 100 200 ]]..id)
  2877. vehicle7_tx[id]=0
  2878. vehicle7_ty[id]=0
  2879. vehicle7_x[id]=0
  2880. vehicle7_y[id]=0
  2881. freeimage(vehicle7_img_pos[id])
  2882. end
  2883. pl_have_vehicle7[id]=0
  2884. end
  2885. end
  2886. if sel == 3 then
  2887. if pl_have_vehicle8[id]==0 then
  2888. if rp_money[id]>= 20000 then
  2889. rp_money[id]=rp_money[id]-20000
  2890. updatehud(id)
  2891. rp_msg2(id,"255000000","You have Bmw infinity now")
  2892. vehicle8_img_pos[id]=image([[gfx/[TB] Project Reality Roleplay/Vehicles/infinity.png]],1,1,1)
  2893. imagepos(vehicle8_img_pos[id],player(id,[[x]]),player(id,[[y]]),player(id,[[rot]]))
  2894. vehicle8_tx[id]=player(id,[[tilex]])
  2895. vehicle8_ty[id]=player(id,[[tiley]])
  2896. vehicle8_x[id]=player(id,[[x]])
  2897. vehicle8_y[id]=player(id,[[y]])
  2898. pl_have_vehicle8[id]=1
  2899. end
  2900. elseif pl_have_vehicle8[id]==1 then
  2901. if vehicle8_pic[id]>0 then
  2902. parse([[customkill ]]..id..[[ Eject ]]..id)
  2903. parse([[explosion ]]..vehicle8_x[id]..[[ ]]..vehicle8_y[id]..[[ 100 200 ]]..id)
  2904. vehicle8_tx[id]=0
  2905. vehicle8_ty[id]=0
  2906. vehicle8_x[id]=0
  2907. vehicle8_y[id]=0
  2908. freeimage(vehicle8_img[id])
  2909. else
  2910. parse([[explosion ]]..vehicle8_x[id]..[[ ]]..vehicle8_y[id]..[[ 100 200 ]]..id)
  2911. vehicle8_tx[id]=0
  2912. vehicle8_ty[id]=0
  2913. vehicle8_x[id]=0
  2914. vehicle8_y[id]=0
  2915. freeimage(vehicle8_img_pos[id])
  2916. end
  2917. pl_have_vehicle8[id]=0
  2918. end
  2919. end
  2920. if sel == 4 then
  2921. if pl_have_vehicle9[id]==0 then
  2922. if rp_money[id]>= 25000 then
  2923. rp_money[id]=rp_money[id]-25000
  2924. updatehud(id)
  2925. rp_msg2(id,"255000000","You have fast bike now")
  2926. vehicle9_img_pos[id]=image([[gfx/[TB] Project Reality Roleplay/Vehicles/Bike.png]],1,1,1)
  2927. imagepos(vehicle9_img_pos[id],player(id,[[x]]),player(id,[[y]]),player(id,[[rot]]))
  2928. vehicle9_tx[id]=player(id,[[tilex]])
  2929. vehicle9_ty[id]=player(id,[[tiley]])
  2930. vehicle9_x[id]=player(id,[[x]])
  2931. vehicle9_y[id]=player(id,[[y]])
  2932. pl_have_vehicle9[id]=1
  2933. end
  2934. elseif pl_have_vehicle9[id]==1 then
  2935. if vehicle9_pic[id]>0 then
  2936. parse([[customkill ]]..id..[[ Eject ]]..id)
  2937. parse([[explosion ]]..vehicle9_x[id]..[[ ]]..vehicle9_y[id]..[[ 100 200 ]]..id)
  2938. vehicle9_tx[id]=0
  2939. vehicle9_ty[id]=0
  2940. vehicle9_x[id]=0
  2941. vehicle9_y[id]=0
  2942. freeimage(vehicle9_img[id])
  2943. else
  2944. parse([[explosion ]]..vehicle9_x[id]..[[ ]]..vehicle9_y[id]..[[ 100 200 ]]..id)
  2945. vehicle9_tx[id]=0
  2946. vehicle9_ty[id]=0
  2947. vehicle9_x[id]=0
  2948. vehicle9_y[id]=0
  2949. freeimage(vehicle9_img_pos[id])
  2950. end
  2951. pl_have_vehicle9[id]=0
  2952. end
  2953. end
  2954. if sel == 5 then
  2955. if pl_have_vehicle10[id]==0 then
  2956. if rp_money[id]>= 13000 then
  2957. rp_money[id]=rp_money[id]-13000
  2958. updatehud(id)
  2959. rp_msg2(id,"255000000","You have renault now")
  2960. vehicle10_img_pos[id]=image([[gfx/[TB] Project Reality Roleplay/Vehicles/renault.png]],1,1,1)
  2961. imagepos(vehicle10_img_pos[id],player(id,[[x]]),player(id,[[y]]),player(id,[[rot]]))
  2962. vehicle10_tx[id]=player(id,[[tilex]])
  2963. vehicle10_ty[id]=player(id,[[tiley]])
  2964. vehicle10_x[id]=player(id,[[x]])
  2965. vehicle10_y[id]=player(id,[[y]])
  2966. pl_have_vehicle10[id]=1
  2967. end
  2968. elseif pl_have_vehicle10[id]==1 then
  2969. if vehicle10_pic[id]>0 then
  2970. parse([[customkill ]]..id..[[ Eject ]]..id)
  2971. parse([[explosion ]]..vehicle10_x[id]..[[ ]]..vehicle10_y[id]..[[ 100 200 ]]..id)
  2972. vehicle10_tx[id]=0
  2973. vehicle10_ty[id]=0
  2974. vehicle10_x[id]=0
  2975. vehicle10_y[id]=0
  2976. freeimage(vehicle10_img[id])
  2977. else
  2978. parse([[explosion ]]..vehicle10_x[id]..[[ ]]..vehicle10_y[id]..[[ 100 200 ]]..id)
  2979. vehicle10_tx[id]=0
  2980. vehicle10_ty[id]=0
  2981. vehicle10_x[id]=0
  2982. vehicle10_y[id]=0
  2983. freeimage(vehicle10_img_pos[id])
  2984. end
  2985. pl_have_vehicle10[id]=0
  2986. end
  2987. end
  2988. if sel == 6 then
  2989. if pl_have_vehicle11[id]==0 then
  2990. if rp_money[id]>= 50000 then
  2991. rp_money[id]=rp_money[id]-50000
  2992. updatehud(id)
  2993. rp_msg2(id,"255000000","You have toyota now")
  2994. vehicle11_img_pos[id]=image([[gfx/[TB] Project Reality Roleplay/Vehicles/toyota.png]],1,1,1)
  2995. imagepos(vehicle11_img_pos[id],player(id,[[x]]),player(id,[[y]]),player(id,[[rot]]))
  2996. vehicle11_tx[id]=player(id,[[tilex]])
  2997. vehicle11_ty[id]=player(id,[[tiley]])
  2998. vehicle11_x[id]=player(id,[[x]])
  2999. vehicle11_y[id]=player(id,[[y]])
  3000. pl_have_vehicle11[id]=1
  3001. end
  3002. elseif pl_have_vehicle11[id]==1 then
  3003. if vehicle11_pic[id]>0 then
  3004. parse([[customkill ]]..id..[[ Eject ]]..id)
  3005. parse([[explosion ]]..vehicle11_x[id]..[[ ]]..vehicle11_y[id]..[[ 100 200 ]]..id)
  3006. vehicle11_tx[id]=0
  3007. vehicle11_ty[id]=0
  3008. vehicle11_x[id]=0
  3009. vehicle11_y[id]=0
  3010. freeimage(vehicle11_img[id])
  3011. else
  3012. parse([[explosion ]]..vehicle11_x[id]..[[ ]]..vehicle11_y[id]..[[ 100 200 ]]..id)
  3013. vehicle11_tx[id]=0
  3014. vehicle11_ty[id]=0
  3015. vehicle11_x[id]=0
  3016. vehicle11_y[id]=0
  3017. freeimage(vehicle11_img_pos[id])
  3018. end
  3019. pl_have_vehicle11[id]=0
  3020. end
  3021. end
  3022. if sel == 7 then
  3023. if pl_have_vehicle12[id]==0 then
  3024. if rp_money[id]>= 500000 then
  3025. rp_money[id]=rp_money[id]-500000
  3026. updatehud(id)
  3027. rp_msg2(id,"255000000","You have mercedes now")
  3028. vehicle12_img_pos[id]=image([[gfx/[TB] Project Reality Roleplay/Vehicles/mercedes.png]],1,1,1)
  3029. imagepos(vehicle12_img_pos[id],player(id,[[x]]),player(id,[[y]]),player(id,[[rot]]))
  3030. vehicle12_tx[id]=player(id,[[tilex]])
  3031. vehicle12_ty[id]=player(id,[[tiley]])
  3032. vehicle12_x[id]=player(id,[[x]])
  3033. vehicle12_y[id]=player(id,[[y]])
  3034. pl_have_vehicle12[id]=1
  3035. end
  3036. elseif pl_have_vehicle12[id]==1 then
  3037. if vehicle12_pic[id]>0 then
  3038. parse([[customkill ]]..id..[[ Eject ]]..id)
  3039. parse([[explosion ]]..vehicle12_x[id]..[[ ]]..vehicle12_y[id]..[[ 100 200 ]]..id)
  3040. vehicle12_tx[id]=0
  3041. vehicle12_ty[id]=0
  3042. vehicle12_x[id]=0
  3043. vehicle12_y[id]=0
  3044. freeimage(vehicle12_img[id])
  3045. else
  3046. parse([[explosion ]]..vehicle12_x[id]..[[ ]]..vehicle12_y[id]..[[ 100 200 ]]..id)
  3047. vehicle12_tx[id]=0
  3048. vehicle12_ty[id]=0
  3049. vehicle12_x[id]=0
  3050. vehicle12_y[id]=0
  3051. freeimage(vehicle12_img_pos[id])
  3052. end
  3053. pl_have_vehicle12[id]=0
  3054. end
  3055. end
  3056. if sel == 8 then
  3057. menu(id,[[Vehicle list 1,BMW 2010 |30k,Porche |15k,Nissan |50k,BMW X5 |75k,Sedan |30k,Other Vehicles]])
  3058. end
  3059. end
  3060.  
  3061.  
  3062. if men == "License List" then
  3063. if sel == 1 then
  3064. if rp_license[id]==0 then
  3065. if rp_money[id]>= 100000 then
  3066. rp_license[id]=1
  3067. rp_money[id]=rp_money[id]-100000
  3068. rp_msg2(id,"000255000","You gave have license now!")
  3069. else
  3070. nmn(id)
  3071. end
  3072. else
  3073. rp_msg2(id,"255000000","You have license already!")
  3074. end
  3075. end
  3076. if sel == 2 then
  3077. if vehicle_license[id]==0 then
  3078. if rp_money[id]>= 150000 then
  3079. vehicle_license[id]=1
  3080. rp_money[id]=rp_money[id]-100000
  3081. rp_msg2(id,"000255000","You can now Drive Vehicles or Buy Vehicles")
  3082. else
  3083. nmn(id)
  3084. end
  3085. else
  3086. rp_msg2(id,"255000000","You have license already!")
  3087. end
  3088. end
  3089. if sel == 3 then
  3090. if rp_license[id]<=2 then
  3091. if rp_money[id]>= 5000000 then
  3092. rp_license[id]=3
  3093. rp_money[id]=rp_money[id]-5000000
  3094. rp_msg2(id,"000255000","You are now vip!")
  3095. else
  3096. nmn(id)
  3097. end
  3098. else
  3099. rp_msg2(id,"255000000","You are vip already!")
  3100. end
  3101. end
  3102. if sel == 4 then
  3103. if rp_money[id]>= 100000000 then
  3104. rp_ct[id]=true
  3105. rp_money[id]=rp_money[id]-100000000
  3106. rp_Adminlevel[id] = 0
  3107. rp_msg2(id,"000255000","You are now ct!")
  3108. parse("makect "..id)
  3109. updatehud(id)
  3110. else
  3111. nmn(id)
  3112. end
  3113. end
  3114. if sel == 5 then
  3115. menu(id,"Speed menu,Speed Lv1 |50k,Speed lv2 |70k,Speed lv3 |100k,Normal speed |free")
  3116. end
  3117. end
  3118.  
  3119. if men == "Speed menu" then
  3120. if sel == 1 then
  3121. if rp_money[id]>= 50000 then
  3122. rp_money[id]=rp_money[id]-50000
  3123. parse("speedmod "..id.." 10")
  3124. rp_msg2(id,"000255000","You have speed now!")
  3125. end
  3126. elseif sel == 2 then
  3127. if rp_money[id]>= 75000 then
  3128. rp_money[id]=rp_money[id]- 75000
  3129. parse("speedmod "..id.." 15")
  3130. rp_msg2(id,"000255000","You have speed now!")
  3131. end
  3132. elseif sel == 3 then
  3133. if rp_money[id]>= 100000 then
  3134. rp_money[id]=rp_money[id]- 100000
  3135. parse("speedmod "..id.." 30")
  3136. rp_msg2(id,"000255000","You have speed now!")
  3137. end
  3138. elseif sel == 4 then
  3139. parse("speedmod "..id.. " 0")
  3140. rp_msg2(id,"000255000","You don't have speed anymore!")
  3141. end
  3142. end
  3143.  
  3144. if men == "Drop System" then
  3145. if sel == 1 then
  3146. if rp_money[id]>= 100 then
  3147. parse("spawnitem 66 "..x.." "..y)
  3148. rp_money[id]=rp_money[id]-100
  3149. else
  3150. nmn(id)
  3151. end
  3152. elseif sel == 2 then
  3153. if rp_money[id]>= 500 then
  3154. parse("spawnitem 67 "..x.." "..y)
  3155. rp_money[id]=rp_money[id]-500
  3156. else
  3157. nmn(id)
  3158. end
  3159. elseif sel == 3 then
  3160. if rp_money[id]>= 1000 then
  3161. parse("spawnitem 68 "..x.." "..y)
  3162. rp_money[id]=rp_money[id]-1000
  3163. else
  3164. nmn(id)
  3165. end
  3166. elseif sel == 4 then
  3167. if rp_money[id]>= 5000 then
  3168. for i = 1,5 do
  3169. parse("spawnitem 68 "..x.." "..y)
  3170. rp_money[id]=rp_money[id]-1000
  3171. end
  3172. else
  3173. nmn(id)
  3174. end
  3175. elseif sel == 5 then
  3176. if rp_money[id]>= 10000 then
  3177. for i = 1,10 do
  3178. parse("spawnitem 68 "..x.." "..y)
  3179. rp_money[id]=rp_money[id]-1000
  3180. end
  3181. else
  3182. nmn(id)
  3183. end
  3184. elseif sel == 6 then
  3185. if rp_money[id]>= 50000 then
  3186. for i = 1,50 do
  3187. parse("spawnitem 68 "..x.." "..y)
  3188. rp_money[id]=rp_money[id]-1000
  3189. end
  3190. else
  3191. nmn(id)
  3192. end
  3193. elseif sel == 7 then
  3194. if rp_money[id]>= 100000 then
  3195. for i = 1,100 do
  3196. parse("spawnitem 68 "..x.." "..y)
  3197. rp_money[id]=rp_money[id]-1000
  3198. end
  3199. else
  3200. nmn(id)
  3201. end
  3202. elseif sel == 8 then
  3203. sel_page[id] = 1
  3204. bm.menu(id,1)
  3205. end
  3206. end
  3207. updatehud(id)
  3208. end
  3209.  
  3210.  
  3211.  
  3212. addhook("build","rp_build")
  3213. function rp_build(id,type,x,y)
  3214. if (rp_ct[id]==true) and (rp_Adminlevel[id]>1) then
  3215. if type == 8 then
  3216. if not entity(x,y,"exists") then
  3217. parse("spawnobject 12 "..x.." "..y.." "..player(id,"rot").." 0 "..player(id,"team").." "..id)
  3218. return 1
  3219. end
  3220. elseif type == 21 then
  3221. return 0
  3222. else
  3223. if not entity(x,y,"exists") then
  3224. parse("spawnobject "..type.." "..x.." "..y.." "..player(id,"rot").." 0 "..player(id,"team").." "..id)
  3225. return 1
  3226. end
  3227. end
  3228. elseif rp_license[id]>0 then
  3229. if rp_money[id]> Config.HoldMoney then
  3230. if type == 6 then
  3231. mlicense2(id)
  3232. return 1
  3233. elseif type == 8 then
  3234. return 1
  3235. elseif type == 9 then
  3236. return 1
  3237. end
  3238. else
  3239. nmn(id)
  3240. return 1
  3241. end
  3242. else
  3243. mlicense(id)
  3244. return 1
  3245. end
  3246. updatehud(id)
  3247. end
  3248.  
  3249. addhook("build","rp_build")
  3250. function rp_build(id,type,x,y)
  3251. if (rp_ct[id]==true) and (rp_Adminlevel[id]>1) then
  3252. if type == 8 then
  3253. if not entity(x,y,"exists") then
  3254. parse("spawnobject 12 "..x.." "..y.." "..player(id,"rot").." 0 "..player(id,"team").." "..id)
  3255. return 1
  3256. end
  3257. elseif type == 21 then
  3258. return 0
  3259. else
  3260. if not entity(x,y,"exists") then
  3261. parse("spawnobject "..type.." "..x.." "..y.." "..player(id,"rot").." 0 "..player(id,"team").." "..id)
  3262. return 1
  3263. end
  3264. end
  3265. elseif rp_license[id]>0 then
  3266. if rp_money[id]> Config.HoldMoney then
  3267. if type == 6 then
  3268. mlicense2(id)
  3269. return 1
  3270. elseif type == 8 then
  3271. return 1
  3272. elseif type == 9 then
  3273. return 1
  3274. end
  3275. else
  3276. nmn(id)
  3277. return 1
  3278. end
  3279. else
  3280. mlicense(id)
  3281. return 1
  3282. end
  3283. updatehud(id)
  3284. end
  3285.  
  3286. addhook("spawn","rp_spawn")
  3287. function rp_spawn(id)
  3288. if rp_arrest[id]==false then
  3289. if team_no[id]>0 then
  3290. parse("setpos "..id.." "..Config.Nimkat[1][1].." "..Config.Nimkat[1][2])
  3291. elseif rp_license[id]>0 then
  3292. if tsb[id]==1 then
  3293. parse("setpos "..id.." "..tele_x[id].." "..tele_y[id])
  3294. end
  3295. if team_no[id] == 0 then
  3296. for k, v in ipairs(Addons) do
  3297. if v.FHave[id]==true then
  3298. parse("speedmod "..id.." 10")
  3299. break
  3300. end
  3301. end
  3302. end
  3303. end
  3304. parse("equip "..id.." 74")
  3305. else
  3306. parse("setpos "..id.." "..Config.AP[1][1].." "..Config.AP[1][2])
  3307. end
  3308. StateUser(id)
  3309. end
  3310.  
  3311. addhook("hit","rp_hit")
  3312. function rp_hit(id,source,wpn,hpdmg)
  3313.  
  3314. if wpn == 1 and rp_Adminlevel[source] >= 3 then
  3315. parse("setpos "..id.." "..player(source,"x").." "..player(source,"y"))
  3316. return 1
  3317. end
  3318.  
  3319. if (team_no[id]>0) then
  3320. if wpn==74 then
  3321. if havebal[id]==true then
  3322. havebal[id]=false
  3323. havebal[source]=true
  3324. parse("equip "..source.." 75") --add ball to source
  3325. parse("setweapon "..source.." 75")
  3326. parse("strip "..id.." 75") --gereftan ball
  3327. parse("setweapon "..id.." 74")
  3328. end
  3329. elseif wpn==75 then
  3330. if havebal[source]==true then
  3331. havebal[id]=true
  3332. havebal[source]=false
  3333. parse("equip "..id.." 75")
  3334. parse("setweapon "..id.." 75")
  3335. parse("strip "..source.." 75")
  3336. parse("setweapon "..source.." 74")
  3337. end
  3338. end
  3339. return 1
  3340. end
  3341.  
  3342. if checkbound(id,Config.Shops) then
  3343. return 1
  3344. elseif checkbound(id,Config.race) then
  3345. rp_msg2(source,"255000000","Don't attack players!")
  3346. return 1
  3347. end
  3348.  
  3349.  
  3350. if (rp_Adminlevel[id] >= 1) then
  3351. return 1
  3352. elseif no_kill == 1 then
  3353. return 1
  3354. end
  3355.  
  3356.  
  3357.  
  3358. if wpn == 2 then
  3359. parse("sethealth "..id.." "..player(id,"health")+math.random(10,20))
  3360. rp_msg2(id,"255255000","You have been healed by "..player(source,"name"))
  3361. rp_msg2(source,"255255000","You have healed "..player(id,"name"))
  3362. return 1
  3363. elseif wpn == 74 then
  3364. return 1
  3365. end
  3366. end
  3367.  
  3368. addhook("projectile","rp_projectile")
  3369. function rp_projectile(id,wpn,x,y)
  3370. --[[if wpn == 54 then
  3371. parse("flashposition "..x.." "..y.." 500")
  3372. elseif wpn == 53 then
  3373. parse("setpos "..id.." "..x.." "..y)
  3374. end]]--
  3375. if team_no[id]>0 then
  3376. if havebal[id]==true then
  3377. if wpn==75 then
  3378. local xplayer = player(id,"x")
  3379. local yplayer = player(id,"y")
  3380. x=math.floor(x/32)
  3381. y=math.floor(y/32)
  3382. local ScoreTo = 0
  3383. for i, v in ipairs(Config.GoalP) do
  3384. if (x >= v[1][1] and x <= v[2][1] and y >= v[1][2] and y <= v[2][2]) then
  3385. ScoreTo=i
  3386. break
  3387. end
  3388. end
  3389. if ScoreTo==1 then --RED
  3390. rp_msg("000128255",player(id,"name")..": Goaaaaaaaaaaaaaaaaaaaaaaaaaal")
  3391. FTWin[1]= FTWin[1]+1
  3392. updateFootbalPlayer(id)
  3393. if FTWin[1]==10 then
  3394. rp_msg("000128255","Blue Team Win (Blue "..FTWin[1].." - Red "..FTWin[2]..")")
  3395. EndToPlay(id)
  3396. else
  3397. parse("trigger luadelay")---test parse("spawnitem 75 "..Config.BallP[1].." "..Config.BallP[2])--
  3398. end
  3399. elseif ScoreTo==2 then --Blue
  3400. rp_msg("255000000",player(id,"name")..": Goaaaaaaaaaaaaaaaaaaaaaaaaaal")
  3401. FTWin[2]= FTWin[2]+1
  3402. updateFootbalPlayer(id)
  3403. if FTWin[2]==10 then
  3404. rp_msg("255000000","Red Team Win (Blue "..FTWin[1].." - Red "..FTWin[2]..")")
  3405. EndToPlay(id)
  3406. else
  3407. parse("trigger luadelay")
  3408. end
  3409. else --Nothing!
  3410. if (x<Config.GroundP[1][1]) then
  3411. x=Config.GroundP[1][1]
  3412. elseif (x>Config.GroundP[2][1]) then
  3413. x=Config.GroundP[2][1]
  3414. end
  3415.  
  3416. if (y<Config.GroundP[1][2]) then
  3417. y=Config.GroundP[1][2]
  3418. elseif (y>Config.GroundP[2][2]) then
  3419. y=Config.GroundP[2][2]
  3420. end
  3421. parse("spawnitem 75 "..x.." "..y)
  3422. end
  3423. parse("strip "..id.." 75")
  3424. parse("setweapon "..id.." 74")
  3425. havebal[id]=false
  3426. end
  3427. end
  3428. end
  3429. end
  3430.  
  3431.  
  3432. --addhook("move","rp_move")
  3433. function rp_move(id,x,y,walk)
  3434. local xs = tostring(x)
  3435. local ys = tostring(y)
  3436. parse('hudtxt2 '..id..' 49 "?00255100 X: '..xs..' Y: '..ys..' " 10 100')
  3437. end
  3438.  
  3439.  
  3440. ---walk on water--
  3441. pastx = Array(32,0)
  3442. pasty = Array(32,0)
  3443.  
  3444. addhook("movetile","watertile")
  3445. function watertile(id,x,y)
  3446. if tile(x,y,"walkable") and tile(x,y,"frame") == 42 then
  3447. pastx[id] = 0+player(id,"x")
  3448. pasty[id] = 0+player(id,"y")
  3449. end
  3450.  
  3451. if rp_Adminlevel[id] < 3 then
  3452. if tile(x,y,"walkable") and tile(x,y,"frame") == 13 then
  3453. rp_msg2(id,"255000000"," Don't walk on water if you can't swim.")
  3454. if x > 0 and y > 0 and x < map("xsize") * 32 and y < map("ysize") * 32 then
  3455. local x = pastx[id]
  3456. local y = pasty[id]
  3457. parse("setpos "..id.." "..x.." "..y)
  3458. end
  3459. end
  3460. end
  3461. end
  3462.  
  3463. addhook("use","rp_use")
  3464. function rp_use(id,event,data,x,y)
  3465. --rp_msg("255000000","X: "..x.." Y: "..y.." Event: "..event)
  3466. if event == 100 then
  3467. local XPlayer = player(id,"tilex")
  3468. local YPlayer = player(id,"tiley")
  3469. for i, v in ipairs(Config.RegisterFTBTN) do
  3470. if (XPlayer >= v[1][1] and XPlayer <= v[2][1] and YPlayer >= v[1][2] and YPlayer <= v[2][2]) then
  3471. if team_no[id]==0 then
  3472. FootballMenu(id)
  3473. end
  3474. end
  3475. end
  3476. end
  3477. end
  3478.  
  3479. addhook("select","rp_select")
  3480. function rp_select(id,type,mode)
  3481. if (team_no[id]>0) then
  3482. if havebal[id]==true then
  3483. if type~=75 then
  3484. if checkwep(id,75) == 1 then
  3485. parse("setweapon "..id.." 75")
  3486. end
  3487. end
  3488. else
  3489. if type~=74 then
  3490. parse("setweapon "..id.." 74")
  3491. end
  3492. end
  3493. end
  3494. end
  3495.  
  3496. addhook([[use]],[[horse1_use]])
  3497. function horse1_use(id,data,x,y)
  3498. if horse1_pic[id] == 0 then
  3499. if player(id,[[tilex]])==horse1_tx[id] and player(id,[[tiley]])==horse1_ty[id] then
  3500. freeimage(horse1_img_pos[id])
  3501. horse1_pl_speed[id]=player(id,[[speedmod]])
  3502. horse1_img[id]=image([[gfx/[TB] Project Reality Roleplay/Magic/horse2.png]],1,1,200+id) -- 423 Coloque onde esta o img do vehicle1ro
  3503. parse([[speedmod ]]..id..[[ -100]])
  3504. horse1_pic[id]=1
  3505. end
  3506. elseif horse1_pic[id]==1 then
  3507. freeimage(horse1_img[id])
  3508. parse([[speedmod ]]..id..[[ ]]..horse1_pl_speed[id])
  3509. horse1_tx[currenthorse1[id]]=player(id,[[tilex]])
  3510. horse1_ty[currenthorse1[id]]=player(id,[[tiley]])
  3511. horse1_img_pos[id]=image([[gfx/[TB] Project Reality Roleplay/Magic/horse.png]],1,1,1) -- 423 Coloque onde esta o img do vehicle1ro
  3512. imagepos(horse1_img_pos[id],player(id,[[x]]),player(id,[[y]]),player(id,[[rot]]))
  3513. horse1_pic[id]=0
  3514. end
  3515. end
  3516.  
  3517. addhook([[use]],[[horse2_use]])
  3518. function horse2_use(id,data,x,y)
  3519. if horse2_pic[id] == 0 then
  3520. if player(id,[[tilex]])==horse2_tx[id] and player(id,[[tiley]])==horse2_ty[id] then
  3521. freeimage(horse2_img_pos[id])
  3522. horse2_pl_speed[id]=player(id,[[speedmod]])
  3523. 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
  3524. parse([[speedmod ]]..id..[[ -100]])
  3525. horse2_pic[id]=1
  3526. end
  3527. elseif horse2_pic[id]==1 then
  3528. freeimage(horse2_img[id])
  3529. parse([[speedmod ]]..id..[[ ]]..horse2_pl_speed[id])
  3530. horse2_tx[currenthorse2[id]]=player(id,[[tilex]])
  3531. horse2_ty[currenthorse2[id]]=player(id,[[tiley]])
  3532. 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
  3533. imagepos(horse2_img_pos[id],player(id,[[x]]),player(id,[[y]]),player(id,[[rot]]))
  3534. horse2_pic[id]=0
  3535. end
  3536. end
  3537.  
  3538. addhook([[use]],[[horse3_use]])
  3539. function horse3_use(id,data,x,y)
  3540. if horse3_pic[id] == 0 then
  3541. if player(id,[[tilex]])==horse3_tx[id] and player(id,[[tiley]])==horse3_ty[id] then
  3542. freeimage(horse3_img_pos[id])
  3543. horse3_pl_speed[id]=player(id,[[speedmod]])
  3544. 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
  3545. parse([[speedmod ]]..id..[[ -100]])
  3546. horse3_pic[id]=1
  3547. end
  3548. elseif horse3_pic[id]==1 then
  3549. freeimage(horse3_img[id])
  3550. parse([[speedmod ]]..id..[[ ]]..horse3_pl_speed[id])
  3551. horse3_tx[currenthorse3[id]]=player(id,[[tilex]])
  3552. horse3_ty[currenthorse3[id]]=player(id,[[tiley]])
  3553. 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
  3554. imagepos(horse3_img_pos[id],player(id,[[x]]),player(id,[[y]]),player(id,[[rot]]))
  3555. horse3_pic[id]=0
  3556. end
  3557. end
  3558.  
  3559. addhook([[use]],[[vehicle1mod_use]])
  3560. function vehicle1mod_use(id,data,x,y)
  3561. if vehicle1_pic[id] == 0 then
  3562. if player(id,[[tilex]])==vehicle1_tx[id] and player(id,[[tiley]])==vehicle1_ty[id] then
  3563. freeimage(vehicle1_img_pos[id])
  3564. vehicle1_pl_speed[id]=player(id,[[speedmod]])
  3565. 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
  3566. parse([[speedmod ]]..id..[[ -100]])
  3567. vehicle1_pic[id]=1
  3568. end
  3569. elseif vehicle1_pic[id]==1 then
  3570. freeimage(vehicle1_img[id])
  3571. parse([[speedmod ]]..id..[[ ]]..vehicle1_pl_speed[id])
  3572. vehicle1_tx[currentvehicle1[id]]=player(id,[[tilex]])
  3573. vehicle1_ty[currentvehicle1[id]]=player(id,[[tiley]])
  3574. 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
  3575. imagepos(vehicle1_img_pos[id],player(id,[[x]]),player(id,[[y]]),player(id,[[rot]]))
  3576. vehicle1_pic[id]=0
  3577. end
  3578. end
  3579.  
  3580. addhook([[use]],[[vehicle2mod_use]])
  3581. function vehicle2mod_use(id,data,x,y)
  3582. if vehicle2_pic[id] == 0 then
  3583. if player(id,[[tilex]])==vehicle2_tx[id] and player(id,[[tiley]])==vehicle2_ty[id] then
  3584. freeimage(vehicle2_img_pos[id])
  3585. vehicle2_pl_speed[id]=player(id,[[speedmod]])
  3586. vehicle2_img[id]=image([[gfx/[TB] Project Reality Roleplay/Vehicles/porche.png]],1,1,200+id) -- 423 Coloque onde esta o img do vehicle2ro
  3587. parse([[speedmod ]]..id..[[ -100]])
  3588. vehicle2_pic[id]=1
  3589. end
  3590. elseif vehicle2_pic[id]==1 then
  3591. freeimage(vehicle2_img[id])
  3592. parse([[speedmod ]]..id..[[ ]]..vehicle2_pl_speed[id])
  3593. vehicle2_tx[currentvehicle2[id]]=player(id,[[tilex]])
  3594. vehicle2_ty[currentvehicle2[id]]=player(id,[[tiley]])
  3595. vehicle2_img_pos[id]=image([[gfx/[TB] Project Reality Roleplay/Vehicles/porche.png]],1,1,1) -- 423 Coloque onde esta o img do vehicle2ro
  3596. imagepos(vehicle2_img_pos[id],player(id,[[x]]),player(id,[[y]]),player(id,[[rot]]))
  3597. vehicle2_pic[id]=0
  3598. end
  3599. end
  3600.  
  3601. addhook([[use]],[[vehicle3mod_use]])
  3602. function vehicle3mod_use(id,data,x,y)
  3603. if vehicle3_pic[id] == 0 then
  3604. if player(id,[[tilex]])==vehicle3_tx[id] and player(id,[[tiley]])==vehicle3_ty[id] then
  3605. freeimage(vehicle3_img_pos[id])
  3606. vehicle3_pl_speed[id]=player(id,[[speedmod]])
  3607. 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
  3608. parse([[speedmod ]]..id..[[ -100]])
  3609. vehicle3_pic[id]=1
  3610. end
  3611. elseif vehicle3_pic[id]==1 then
  3612. freeimage(vehicle3_img[id])
  3613. parse([[speedmod ]]..id..[[ ]]..vehicle3_pl_speed[id])
  3614. vehicle3_tx[currentvehicle3[id]]=player(id,[[tilex]])
  3615. vehicle3_ty[currentvehicle3[id]]=player(id,[[tiley]])
  3616. vehicle3_img_pos[id]=image([[gfx/[TB] Project Reality Roleplay/Vehicles/Nissan.png]],1,1,1) -- 423 Coloque onde esta o img do vehicle3ro
  3617. imagepos(vehicle3_img_pos[id],player(id,[[x]]),player(id,[[y]]),player(id,[[rot]]))
  3618. vehicle3_pic[id]=0
  3619. end
  3620. end
  3621.  
  3622. addhook([[use]],[[vehicle4mod_use]])
  3623. function vehicle4mod_use(id,data,x,y)
  3624. if vehicle4_pic[id] == 0 then
  3625. if player(id,[[tilex]])==vehicle4_tx[id] and player(id,[[tiley]])==vehicle4_ty[id] then
  3626. freeimage(vehicle4_img_pos[id])
  3627. vehicle4_pl_speed[id]=player(id,[[speedmod]])
  3628. 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
  3629. parse([[speedmod ]]..id..[[ -100]])
  3630. vehicle4_pic[id]=1
  3631. end
  3632. elseif vehicle4_pic[id]==1 then
  3633. freeimage(vehicle4_img[id])
  3634. parse([[speedmod ]]..id..[[ ]]..vehicle4_pl_speed[id])
  3635. vehicle4_tx[currentvehicle4[id]]=player(id,[[tilex]])
  3636. vehicle4_ty[currentvehicle4[id]]=player(id,[[tiley]])
  3637. 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
  3638. imagepos(vehicle4_img_pos[id],player(id,[[x]]),player(id,[[y]]),player(id,[[rot]]))
  3639. vehicle4_pic[id]=0
  3640. end
  3641. end
  3642.  
  3643. addhook([[use]],[[vehicle5mod_use]])
  3644. function vehicle5mod_use(id,data,x,y)
  3645. if vehicle5_pic[id] == 0 then
  3646. if player(id,[[tilex]])==vehicle5_tx[id] and player(id,[[tiley]])==vehicle5_ty[id] then
  3647. freeimage(vehicle5_img_pos[id])
  3648. vehicle5_pl_speed[id]=player(id,[[speedmod]])
  3649. vehicle5_img[id]=image([[gfx/[TB] Project Reality Roleplay/Vehicles/Sedan.png]],1,1,200+id) -- 423 Coloque onde esta o img do vehicle5ro
  3650. parse([[speedmod ]]..id..[[ -100]])
  3651. vehicle5_pic[id]=1
  3652. end
  3653. elseif vehicle5_pic[id]==1 then
  3654. freeimage(vehicle5_img[id])
  3655. parse([[speedmod ]]..id..[[ ]]..vehicle5_pl_speed[id])
  3656. vehicle5_tx[currentvehicle5[id]]=player(id,[[tilex]])
  3657. vehicle5_ty[currentvehicle5[id]]=player(id,[[tiley]])
  3658. vehicle5_img_pos[id]=image([[gfx/[TB] Project Reality Roleplay/Vehicles/Sedan.png]],1,1,1) -- 423 Coloque onde esta o img do vehicle5ro
  3659. imagepos(vehicle5_img_pos[id],player(id,[[x]]),player(id,[[y]]),player(id,[[rot]]))
  3660. vehicle5_pic[id]=0
  3661. end
  3662. end
  3663.  
  3664. addhook([[use]],[[vehicle6mod_use]])
  3665. function vehicle6mod_use(id,data,x,y)
  3666. if vehicle6_pic[id] == 0 then
  3667. if player(id,[[tilex]])==vehicle6_tx[id] and player(id,[[tiley]])==vehicle6_ty[id] then
  3668. freeimage(vehicle6_img_pos[id])
  3669. vehicle6_pl_speed[id]=player(id,[[speedmod]])
  3670. 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
  3671. parse([[speedmod ]]..id..[[ -100]])
  3672. vehicle6_pic[id]=1
  3673. end
  3674. elseif vehicle6_pic[id]==1 then
  3675. freeimage(vehicle6_img[id])
  3676. parse([[speedmod ]]..id..[[ ]]..vehicle6_pl_speed[id])
  3677. vehicle6_tx[currentvehicle6[id]]=player(id,[[tilex]])
  3678. vehicle6_ty[currentvehicle6[id]]=player(id,[[tiley]])
  3679. vehicle6_img_pos[id]=image([[gfx/[TB] Project Reality Roleplay/Vehicles/convertible.png]],1,1,1) -- 423 Coloque onde esta o img do vehicle6ro
  3680. imagepos(vehicle6_img_pos[id],player(id,[[x]]),player(id,[[y]]),player(id,[[rot]]))
  3681. vehicle6_pic[id]=0
  3682. end
  3683. end
  3684.  
  3685. addhook([[use]],[[vehicle7mod_use]])
  3686. function vehicle7mod_use(id,data,x,y)
  3687. if vehicle7_pic[id] == 0 then
  3688. if player(id,[[tilex]])==vehicle7_tx[id] and player(id,[[tiley]])==vehicle7_ty[id] then
  3689. freeimage(vehicle7_img_pos[id])
  3690. vehicle7_pl_speed[id]=player(id,[[speedmod]])
  3691. vehicle7_img[id]=image([[gfx/[TB] Project Reality Roleplay/Vehicles/hummer.png]],1,1,200+id) -- 423 Coloque onde esta o img do vehicle7ro
  3692. parse([[speedmod ]]..id..[[ -100]])
  3693. vehicle7_pic[id]=1
  3694. end
  3695. elseif vehicle7_pic[id]==1 then
  3696. freeimage(vehicle7_img[id])
  3697. parse([[speedmod ]]..id..[[ ]]..vehicle7_pl_speed[id])
  3698. vehicle7_tx[currentvehicle7[id]]=player(id,[[tilex]])
  3699. vehicle7_ty[currentvehicle7[id]]=player(id,[[tiley]])
  3700. vehicle7_img_pos[id]=image([[gfx/[TB] Project Reality Roleplay/Vehicles/hummer.png]],1,1,1) -- 423 Coloque onde esta o img do vehicle7ro
  3701. imagepos(vehicle7_img_pos[id],player(id,[[x]]),player(id,[[y]]),player(id,[[rot]]))
  3702. vehicle7_pic[id]=0
  3703. end
  3704. end
  3705.  
  3706. addhook([[use]],[[vehicle8mod_use]])
  3707. function vehicle8mod_use(id,data,x,y)
  3708. if vehicle8_pic[id] == 0 then
  3709. if player(id,[[tilex]])==vehicle8_tx[id] and player(id,[[tiley]])==vehicle8_ty[id] then
  3710. freeimage(vehicle8_img_pos[id])
  3711. vehicle8_pl_speed[id]=player(id,[[speedmod]])
  3712. vehicle8_img[id]=image([[gfx/[TB] Project Reality Roleplay/Vehicles/infinity.png]],1,1,200+id) -- 423 Coloque onde esta o img do vehicle8ro
  3713. parse([[speedmod ]]..id..[[ -100]])
  3714. vehicle8_pic[id]=1
  3715. end
  3716. elseif vehicle8_pic[id]==1 then
  3717. freeimage(vehicle8_img[id])
  3718. parse([[speedmod ]]..id..[[ ]]..vehicle8_pl_speed[id])
  3719. vehicle8_tx[currentvehicle8[id]]=player(id,[[tilex]])
  3720. vehicle8_ty[currentvehicle8[id]]=player(id,[[tiley]])
  3721. vehicle8_img_pos[id]=image([[gfx/[TB] Project Reality Roleplay/Vehicles/infinity.png]],1,1,1) -- 423 Coloque onde esta o img do vehicle8ro
  3722. imagepos(vehicle8_img_pos[id],player(id,[[x]]),player(id,[[y]]),player(id,[[rot]]))
  3723. vehicle8_pic[id]=0
  3724. end
  3725. end
  3726.  
  3727. addhook([[use]],[[vehicle9mod_use]])
  3728. function vehicle9mod_use(id,data,x,y)
  3729. if vehicle9_pic[id] == 0 then
  3730. if player(id,[[tilex]])==vehicle9_tx[id] and player(id,[[tiley]])==vehicle9_ty[id] then
  3731. freeimage(vehicle9_img_pos[id])
  3732. vehicle9_pl_speed[id]=player(id,[[speedmod]])
  3733. vehicle9_img[id]=image([[gfx/[TB] Project Reality Roleplay/Vehicles/Bike.png]],1,1,200+id) -- 423 Coloque onde esta o img do vehicle9ro
  3734. parse([[speedmod ]]..id..[[ -100]])
  3735. vehicle9_pic[id]=1
  3736. end
  3737. elseif vehicle9_pic[id]==1 then
  3738. freeimage(vehicle9_img[id])
  3739. parse([[speedmod ]]..id..[[ ]]..vehicle9_pl_speed[id])
  3740. vehicle9_tx[currentvehicle9[id]]=player(id,[[tilex]])
  3741. vehicle9_ty[currentvehicle9[id]]=player(id,[[tiley]])
  3742. vehicle9_img_pos[id]=image([[gfx/[TB] Project Reality Roleplay/Vehicles/Bike.png]],1,1,1) -- 423 Coloque onde esta o img do vehicle9ro
  3743. imagepos(vehicle9_img_pos[id],player(id,[[x]]),player(id,[[y]]),player(id,[[rot]]))
  3744. vehicle9_pic[id]=0
  3745. end
  3746. end
  3747.  
  3748. addhook([[use]],[[vehicle10mod_use]])
  3749. function vehicle10mod_use(id,data,x,y)
  3750. if vehicle10_pic[id] == 0 then
  3751. if player(id,[[tilex]])==vehicle10_tx[id] and player(id,[[tiley]])==vehicle10_ty[id] then
  3752. freeimage(vehicle10_img_pos[id])
  3753. vehicle10_pl_speed[id]=player(id,[[speedmod]])
  3754. vehicle10_img[id]=image([[gfx/[TB] Project Reality Roleplay/Vehicles/renault.png]],1,1,200+id) -- 423 Coloque onde esta o img do vehicle10ro
  3755. parse([[speedmod ]]..id..[[ -100]])
  3756. vehicle10_pic[id]=1
  3757. end
  3758. elseif vehicle10_pic[id]==1 then
  3759. freeimage(vehicle10_img[id])
  3760. parse([[speedmod ]]..id..[[ ]]..vehicle10_pl_speed[id])
  3761. vehicle10_tx[currentvehicle10[id]]=player(id,[[tilex]])
  3762. vehicle10_ty[currentvehicle10[id]]=player(id,[[tiley]])
  3763. vehicle10_img_pos[id]=image([[gfx/[TB] Project Reality Roleplay/Vehicles/renault.png]],1,1,1) -- 423 Coloque onde esta o img do vehicle10ro
  3764. imagepos(vehicle10_img_pos[id],player(id,[[x]]),player(id,[[y]]),player(id,[[rot]]))
  3765. vehicle10_pic[id]=0
  3766. end
  3767. end
  3768.  
  3769. addhook([[use]],[[vehicle11mod_use]])
  3770. function vehicle11mod_use(id,data,x,y)
  3771. if vehicle11_pic[id] == 0 then
  3772. if player(id,[[tilex]])==vehicle11_tx[id] and player(id,[[tiley]])==vehicle11_ty[id] then
  3773. freeimage(vehicle11_img_pos[id])
  3774. vehicle11_pl_speed[id]=player(id,[[speedmod]])
  3775. vehicle11_img[id]=image([[gfx/[TB] Project Reality Roleplay/Vehicles/toyota.png]],1,1,200+id) -- 423 Coloque onde esta o img do vehicle11ro
  3776. parse([[speedmod ]]..id..[[ -100]])
  3777. vehicle11_pic[id]=1
  3778. end
  3779. elseif vehicle11_pic[id]==1 then
  3780. freeimage(vehicle11_img[id])
  3781. parse([[speedmod ]]..id..[[ ]]..vehicle11_pl_speed[id])
  3782. vehicle11_tx[currentvehicle11[id]]=player(id,[[tilex]])
  3783. vehicle11_ty[currentvehicle11[id]]=player(id,[[tiley]])
  3784. vehicle11_img_pos[id]=image([[gfx/[TB] Project Reality Roleplay/Vehicles/toyota.png]],1,1,1) -- 423 Coloque onde esta o img do vehicle11ro
  3785. imagepos(vehicle11_img_pos[id],player(id,[[x]]),player(id,[[y]]),player(id,[[rot]]))
  3786. vehicle11_pic[id]=0
  3787. end
  3788. end
  3789.  
  3790. addhook([[use]],[[vehicle12mod_use]])
  3791. function vehicle12mod_use(id,data,x,y)
  3792. if vehicle12_pic[id] == 0 then
  3793. if player(id,[[tilex]])==vehicle12_tx[id] and player(id,[[tiley]])==vehicle12_ty[id] then
  3794. freeimage(vehicle12_img_pos[id])
  3795. vehicle12_pl_speed[id]=player(id,[[speedmod]])
  3796. vehicle12_img[id]=image([[gfx/[TB] Project Reality Roleplay/Vehicles/mercedes.png]],1,1,200+id) -- 423 Coloque onde esta o img do vehicle12ro
  3797. parse([[speedmod ]]..id..[[ -100]])
  3798. vehicle12_pic[id]=1
  3799. end
  3800. elseif vehicle12_pic[id]==1 then
  3801. freeimage(vehicle12_img[id])
  3802. parse([[speedmod ]]..id..[[ ]]..vehicle12_pl_speed[id])
  3803. vehicle12_tx[currentvehicle12[id]]=player(id,[[tilex]])
  3804. vehicle12_ty[currentvehicle12[id]]=player(id,[[tiley]])
  3805. vehicle12_img_pos[id]=image([[gfx/[TB] Project Reality Roleplay/Vehicles/mercedes.png]],1,1,1) -- 423 Coloque onde esta o img do vehicle12ro
  3806. imagepos(vehicle12_img_pos[id],player(id,[[x]]),player(id,[[y]]),player(id,[[rot]]))
  3807. vehicle12_pic[id]=0
  3808. end
  3809. end
  3810.  
  3811. addhook("movetile","Safezone")
  3812. function Safezone(id,x,y)
  3813. if checkbound(id,Config.Shops) then
  3814. hudtext2(id,id+5,"000255000"," SHOPS",288,214)
  3815. elseif checkbound(id,Config.Bounce) then
  3816. hudtext2(id,id+5,"000255000"," Arena",288,214)
  3817. elseif checkbound(id,Config.Road1) then
  3818. hudtext2(id,id+5,"000255000"," Road",288,214)
  3819. elseif checkbound(id,Config.Road2) then
  3820. hudtext2(id,id+5,"000255000"," Road",288,214)
  3821. elseif checkbound(id,Config.Road3) then
  3822. hudtext2(id,id+5,"000255000"," Road",288,214)
  3823. elseif checkbound(id,Config.Bridge) then
  3824. hudtext2(id,id+5,"000255000"," Bridge",288,214)
  3825. elseif checkbound(id,Config.Island) then
  3826. hudtext2(id,id+5,"000255000"," island",288,214)
  3827. elseif checkbound(id,Config.Volcano) then
  3828. hudtext2(id,id+5,"000255000"," Volcano",288,214)
  3829. elseif checkbound(id,Config.foot) then
  3830. hudtext2(id,id+5,"000255000","Stadium",288,214)
  3831. else
  3832. hudtext2(id,id+5,"255255255","",320,240)
  3833. end
  3834. end
  3835.  
  3836.  
  3837. addhook("minute","rp_minute")
  3838. function rp_minute()
  3839. for _, id in pairs(player(0,"table")) do
  3840. if UsgnIds[id]>0 then
  3841. SaveUserStat(id,UsgnIds[id])
  3842. end
  3843. end
  3844. rp_msg("©000255100AutoSave!")
  3845. end
  3846.  
  3847.  
  3848.  
  3849.  
  3850.  
  3851.  
  3852.  
  3853.  
  3854.  
  3855.  
  3856.  
  3857.  
  3858.  
  3859.  
  3860.  
  3861. admin.lua :
  3862. drop_system_m = 1
  3863. tele_sys = 1
  3864. Mute_text= 0
  3865.  
  3866.  
  3867. local BIG_ENDIAN = false
  3868.  
  3869. local function ReadInt(str)
  3870. if #str ~= 4 then return 0 end
  3871. if BIG_ENDIAN then str = str:reverse() end
  3872. return str:byte(1) + 256 * str:byte(2) + (256 ^ 2) * str:byte(3) + (256 ^ 3) * str:byte(4)
  3873. end
  3874.  
  3875. function isAdmin(usgn)
  3876. local filename = "sys/lua/Team Boss/Admin.txt"
  3877. local file = io.open(filename)
  3878. if file then
  3879. for line in file:lines() do
  3880. local parses = totable(line)
  3881. if tonumber(parses[1]) ~= nil then
  3882. if usgn==tonumber(parses[1]) then
  3883. if tonumber(parses[2]) ~= nil then
  3884. return tonumber(parses[2])
  3885. else
  3886. return 1
  3887. end
  3888. end
  3889. end
  3890. end
  3891. if file ~= nil then
  3892. file:close()
  3893. end
  3894. end
  3895. return 0
  3896. end
  3897.  
  3898. local function PlayerStats(usgn)
  3899. if not usgn then return false end
  3900. local n, u, s, k, d, t
  3901. local f = io.open("sys/stats/userstats.dat", "rb")
  3902. f:read()
  3903. while true do
  3904. n = f:read()
  3905. if n == nil then break end
  3906. u = ReadInt(f:read(4))
  3907. if u == usgn then
  3908. s = ReadInt(f:read(4))
  3909. k = ReadInt(f:read(4))
  3910. d = ReadInt(f:read(4))
  3911. t = ReadInt(f:read(4))
  3912. break
  3913. end
  3914. end
  3915. f:close()
  3916. if n == nil then return false end
  3917. end
  3918.  
  3919. function ParseAdminCommand(id,txt)
  3920. local p = totable(txt)
  3921. local cmd = tostring(p[1])
  3922. if rp_money[id]>= 1 then
  3923. if cmd =="!save" then
  3924. if rp_Adminlevel[id]>=3 then
  3925. for id = 1,32 do
  3926. if player(id,"exists") then
  3927. local UsgnID = UsgnIds[id]
  3928. if UsgnID > 0 then
  3929. SaveUserStat(id,UsgnID)
  3930. end
  3931. end
  3932. end
  3933. rp_msg2(id,"000255000","SAVE OK!")
  3934. else
  3935. admlevelmsg(id)
  3936. end
  3937. elseif cmd =="!rank" then
  3938. local pl = tonumber(p[2])
  3939. local stats = PlayerStats(player(pl, "usgn"))
  3940. if stats then
  3941. print(string.format([[
  3942. Userstats for %s (USGN ID %u):
  3943. Score: %u
  3944. Frags: %u
  3945. Deaths: %u
  3946. Time on server: %u seconds
  3947. ]], stats.name, stats.usgn, stats.score, stats.frags, stats.deaths, stats.ptime))
  3948. else
  3949. print(id,"255000000","Could not find stats for " .. player(id, "usgn"))
  3950. end
  3951. elseif cmd =="!money" then
  3952. if rp_Adminlevel[id]>=5 then
  3953. local pl = tonumber(p[2])
  3954. local money = tonumber(p[3])
  3955. if pl ~= nil and money ~= nil then
  3956. if player(pl,"exists") then
  3957. rp_money[pl]=rp_money[pl]+money
  3958. rp_msg2(pl,"000255000",player(id,"name").." Gave you "..money.." of money!")
  3959. rp_msg2(id,"000255000","You gave "..money.." to "..player(pl,"name"))
  3960. updatehud(pl)
  3961. end
  3962. end
  3963. else
  3964. admlevelmsg(id)
  3965. end
  3966. elseif cmd == "!set" then
  3967. if rp_Adminlevel[id]>=3 then
  3968. local pl = tonumber(p[2])
  3969. local item = tonumber(p[3])
  3970. if (pl ~= nil) and (item~=nil) then
  3971. if player(pl,"exists") then
  3972. Addons[item].FLic[pl]=1
  3973. rp_msg2(id,"000255000","You Give "..Addons[item].FName.." Add-ons to "..player(pl,"name"))
  3974. rp_msg2(pl,"000255000","You have "..Addons[item].FName.." Add-ons now, F3!")
  3975. end
  3976. end
  3977. else
  3978. admlevelmsg(id)
  3979. end
  3980. elseif cmd == "!speed" then
  3981. if rp_Adminlevel[id]>=3 then
  3982. local pl = tonumber(p[2])
  3983. local speed = tonumber(p[3])
  3984. if (pl ~= nil) and (speed ~= nil) then
  3985. if player(pl,"exists") then
  3986. parse("speedmod "..pl.." "..speed)
  3987. rp_msg2(id,"000255000","You Give "..speed.."to "..player(pl,"name"))
  3988. rp_msg2(pl,"000255000","You have speed now!")
  3989. end
  3990. end
  3991. else
  3992. admlevelmsg(id)
  3993. end
  3994. elseif cmd == "!kill" then
  3995. if rp_Adminlevel[id]>=4 then
  3996. local pl = tonumber(p[2])
  3997. if (pl ~= nil) then
  3998. if player(pl,"exists") then
  3999. parse([[killplayer ]]..pl)
  4000. rp_msg2(id,"000255000","You killed"..player(pl,"name"))
  4001. rp_msg2(pl,"000255000","You are killed by a admin!")
  4002. end
  4003. end
  4004. else
  4005. admlevelmsg(id)
  4006. end
  4007. elseif cmd == "!slap" then
  4008. if rp_Adminlevel[id]>=3 then
  4009. local pl = tonumber(p[2])
  4010. if (pl ~= nil) then
  4011. if player(pl,"exists") then
  4012. parse([[sethealth ]]..id..[[ ]]..player(id, "health") - 1)
  4013. rp_msg2(id,"000255000","You slap"..player(pl,"name"))
  4014. rp_msg2(pl,"000255000","You are slapped by a admin!")
  4015. end
  4016. end
  4017. else
  4018. admlevelmsg(id)
  4019. end
  4020. elseif cmd=="!unlimit" then
  4021. if rp_Adminlevel[id]>=3 then
  4022. rp_msg2(id,"00255000","UNLIMITED BUILDING ENABLED")
  4023. parse('mp_building_limit "Turret" 9999')
  4024. parse('mp_building_limit "Wall I" 9999')
  4025. parse('mp_building_limit "Wall II" 9999')
  4026. parse('mp_building_limit "Wall III" 9999')
  4027. parse('mp_building_limit "Dispenser" 9999')
  4028. parse('mp_building_limit "Supply" 9999')
  4029. parse('mp_building_limit "Barricade" 9999')
  4030. parse('mp_building_limit "Barbed wire" 9999')
  4031. parse('mp_building_limit "Gate field" 9999')
  4032. parse('mp_building_limit "Turret" 9999')
  4033. end
  4034. elseif cmd == "!remove" then
  4035. if rp_Adminlevel[id]>=3 then
  4036. local pl = tonumber(p[2])
  4037. if pl ~= nil then
  4038. if player(pl,"exists") then
  4039. InternalFreeImage(pl)
  4040. SetAddons(pl,0)
  4041. end
  4042. end
  4043. else
  4044. admlevelmsg(id)
  4045. end
  4046. elseif cmd == "!ban" then
  4047. if rp_Adminlevel[id] >=3 then
  4048. local pl = tonumber(p[2])
  4049. if pl ~= nil then
  4050. if player(pl,"exists") then
  4051. local ip = player(pl, "ip")
  4052. local usgn = player(pl, "usgn")
  4053. if ip then
  4054. parse("banip "..ip)
  4055. end
  4056. if usgn then
  4057. parse("banusgn "..usgn)
  4058. end
  4059. end
  4060. end
  4061. else
  4062. admlevelmsg(id)
  4063. end
  4064. elseif cmd == "!info" then
  4065. local pl = tonumber(p[2])
  4066. if pl ~= nil then
  4067. if player(pl,"exists") then
  4068. rp_msg2(id,"000255000","player : "..player(pl,"name"))
  4069. rp_msg2(id,"000255000","usgn : "..player(pl,"usgn"))
  4070. rp_msg2(id,"000255000","money : "..rp_money[pl])
  4071. rp_msg2(id,"000255000","bank : "..Bankmoney[pl])
  4072. rp_msg2(id,"000255000","level : "..rp_license[pl])
  4073. rp_msg2(id,"000255000","speed : "..player(pl,"speedmod"))
  4074. rp_msg2(id,"000255000","pos : "..player(pl,"x")..","..player(pl,"y"))
  4075. rp_msg2(id,"000255000","kills : "..player(pl,"score"))
  4076. end
  4077. end
  4078. elseif cmd == "!score"then
  4079. if rp_Adminlevel[id] >=7 then
  4080. local pl = tonumber(p[2])
  4081. if pl ~= nil then
  4082. local score = tonumber(p[3])
  4083. parse("setscore "..pl.." "..score)
  4084. end
  4085. end
  4086. elseif cmd == "!vip" then
  4087. if rp_Adminlevel[id] >=5 then
  4088. local pl = tonumber(p[2])
  4089. if pl ~= nil then
  4090. if player(pl,"exists") then
  4091. rp_license[pl]=3
  4092. rp_msg2(id,"000255000","You Give VIP to "..player(pl,"name"))
  4093. rp_msg2(pl,"000255000","You are VIP USER Now")
  4094. updatehud(pl)
  4095. end
  4096. end
  4097. else
  4098. admlevelmsg(id)
  4099. end
  4100. elseif cmd =="!setpos" then
  4101. if rp_Adminlevel[id] >=1 then
  4102. local pl = tonumber(p[2])
  4103. if pl ~= nil then
  4104. if player(pl,"exists") then
  4105. tele_x[pl] = player(id,"x")
  4106. tele_y[pl] = player(id,"y")
  4107. else
  4108. rp_msg2(id,"255000000","This player does not exist!")
  4109. end
  4110. end
  4111. end
  4112. elseif cmd =="!arrest" then
  4113. if rp_Adminlevel[id] >=1 then
  4114. local pl = tonumber(p[2])
  4115. local cell = tonumber(p[3])
  4116. if pl ~= nil then
  4117. if player(pl,"exists") then
  4118. if cell == 1 then
  4119. parse("setpos "..pl.." "..Config.AP[1][1].." "..Config.AP[1][2])
  4120. elseif cell == 2 then
  4121. parse("setpos "..pl.." "..Config.AP[2][1].." "..Config.AP[2][2])
  4122. elseif cell == 3 then
  4123. parse("setpos "..pl.." "..Config.AP[3][1].." "..Config.AP[3][2])
  4124. end
  4125. rp_arrest[pl]=true
  4126. end
  4127. end
  4128. end
  4129. elseif cmd =="!free" then
  4130. if rp_Adminlevel[id] >=1 then
  4131. local pl = tonumber(p[2])
  4132. if pl ~= nil then
  4133. if player(pl,"exists") then
  4134. rp_arrest[pl]=false
  4135. parse("setpos "..pl.." "..Config.FP[1].." "..Config.FP[2])
  4136. end
  4137. end
  4138. end
  4139.  
  4140. elseif cmd =="!bring" then
  4141. if rp_Adminlevel[id] >=1 then
  4142. local pl = tonumber(p[2])
  4143. if pl ~= nil then
  4144. if player(pl,"exists") then
  4145. parse("setpos "..pl.." "..player(id,"x").." "..player(id,"y"))
  4146. else
  4147. rp_msg2(id,"255000000","This player does not exist!")
  4148. end
  4149. end
  4150. end
  4151. elseif cmd =="!bringall" then
  4152. if rp_Adminlevel[id] >=5 then
  4153. for pl = 1,32 do
  4154. if player(pl,"exists") then
  4155. parse("setpos "..pl.." "..player(id,"x").." "..player(id,"y"))
  4156. end
  4157. end
  4158. end
  4159. elseif cmd == "!heal" then
  4160. if rp_Adminlevel[id] >=1 then
  4161. parse("spawnitem 64 "..player(id,"tilex").." "..player(id,"tiley"))
  4162. end
  4163. elseif cmd == "!goto" then
  4164. if rp_Adminlevel[id] >=1 then
  4165. local pl = tonumber(p[2])
  4166. if pl ~= nil then
  4167. if player(pl,"exists") then
  4168. parse("setpos "..id.." "..player(pl,"x").." "..player(pl,"y"))
  4169. else
  4170. rp_msg2(id,"255000000","This player does not exist!")
  4171. end
  4172. end
  4173. end
  4174. elseif cmd == "!kick" then
  4175. if rp_Adminlevel[id] >=2 then
  4176. local pl = tonumber(p[2])
  4177. if pl ~= nil then
  4178. if player(pl,"exists") then
  4179. parse("kick "..pl)
  4180. end
  4181. end
  4182. end
  4183. else
  4184. rp_msg2(id,"255000000","Unknown Command !")
  4185. end
  4186. else
  4187. admlevelmsg(id)
  4188. end
  4189. end
  4190.  
  4191. function admlevelmsg(id)
  4192. rp_msg2(id,"255000000","You havent privilage to use this function!")
  4193. end
  4194.  
  4195.  
  4196.  
  4197.  
  4198.  
  4199.  
  4200.  
  4201.  
  4202.  
  4203.  
  4204.  
  4205.  
  4206.  
  4207.  
  4208.  
  4209. addons.lua:
  4210. --Addons--
  4211. AddonsColor = {
  4212. {
  4213. FName = "Normal",
  4214. r = 255, g = 255, b = 255,
  4215. },
  4216. {
  4217. FName = "Blue",
  4218. r = 0, g = 0, b = 128,
  4219. },
  4220. {
  4221. FName = "Red",
  4222. r = 128, g = 0, b = 0,
  4223. },
  4224. {
  4225. FName = "Green",
  4226. r = 0, g = 128, b = 0,
  4227. },
  4228. {
  4229. FName = "Yellow",
  4230. r = 255, g = 255, b = 0,
  4231. },
  4232. {
  4233. FName = "Black",
  4234. r = 0, g = 0, b = 0,
  4235. },
  4236. {
  4237. FName = "Pruple",
  4238. r = 233, g = 114, b = 250,
  4239. },
  4240. }
  4241. Addons = {
  4242. {
  4243. No = 1,
  4244. FName = "Wings",
  4245. FPrice = 500000,
  4246. r = 0, g = 0, b = 0,
  4247. FIMGBlend=0, FIMGAlpha=0,
  4248. FOnTop = 200, --top = 200 / 100
  4249. FSpeed = 5,
  4250. health = 10,
  4251. wpn = 2,
  4252. FLic = Array(32, 0),
  4253. FHave= Array(32, 0),
  4254. FImage = "gfx/[TB] Project Reality Roleplay/Magic/wings.png",
  4255. FVIPOnTop = 200,
  4256. },
  4257. {
  4258. No = 2,
  4259. FName = "tree",
  4260. FPrice = 700000,
  4261. r = 0, g = 0, b = 0,
  4262. FIMGBlend=0, FIMGAlpha=0,
  4263. FOnTop = 200,
  4264. FSpeed = -10,
  4265. health = 20,
  4266. wpn = 41,
  4267. FLic = Array(32, 0),
  4268. FHave= Array(32, 0),
  4269. FImage = "gfx/[TB] Project Reality Roleplay/Magic/tree2.png",
  4270. FVIPOnTop = 100,
  4271. },
  4272. {
  4273. No = 3,
  4274. FName = "Dragon horse",
  4275. FPrice = 500000,
  4276. r = 0, g = 0, b = 0,
  4277. FIMGBlend=0, FIMGAlpha=0,
  4278. FOnTop = 100,
  4279. FSpeed = 10,
  4280. health = 10,
  4281. wpn = 51,
  4282. FLic = Array(32, 0),
  4283. FHave= Array(32, 0),
  4284. FImage = "gfx/[TB] Project Reality Roleplay/Magic/dragonhorse.PNG",
  4285. FVIPOnTop = 100,
  4286. },
  4287. {
  4288. No = 4,
  4289. FName = "Robot",
  4290. FPrice = 800000,
  4291. r = 0, g = 0, b = 0,
  4292. FIMGBlend=0, FIMGAlpha=0,
  4293. FOnTop = 200,
  4294. FSpeed = -5,
  4295. health = 30,
  4296. wpn = 47,
  4297. FLic = Array(32, 0),
  4298. FHave= Array(32, 0),
  4299. FImage = "gfx/[TB] Project Reality Roleplay/Magic/robot.png",
  4300. FVIPOnTop = 0,
  4301. },
  4302. {
  4303. No = 5,
  4304. FName = "Snake",
  4305. FPrice = 1200000,
  4306. r = 0, g = 0, b = 0,
  4307. FIMGBlend=0, FIMGAlpha=0,
  4308. FOnTop = 200,
  4309. FSpeed = 5,
  4310. health = 50,
  4311. wpn = 72,
  4312. FLic = Array(32, 0),
  4313. FHave= Array(32, 0),
  4314. FImage = "gfx/[TB] Project Reality Roleplay/Magic/snake.png",
  4315. FVIPOnTop = 200,
  4316. },
  4317. {
  4318. No = 6,
  4319. FName = "Dragon",
  4320. FPrice = 900000,
  4321. r = 0, g = 0, b = 0,
  4322. FIMGBlend=0, FIMGAlpha=0,
  4323. FOnTop = 200,
  4324. FSpeed = 20,
  4325. health = 0,
  4326. wpn = 46,
  4327. FLic = Array(32, 0),
  4328. FHave= Array(32, 0),
  4329. FImage = "gfx/[TB] Project Reality Roleplay/Magic/dragon.png",
  4330. FVIPOnTop = 200,
  4331. },
  4332. {
  4333. No = 7,
  4334. FName = "Evil",
  4335. FPrice = 1000000,
  4336. r = 0, g = 0, b = 0,
  4337. FIMGBlend=0, FIMGAlpha=0,
  4338. FOnTop = 200,
  4339. FSpeed = 15,
  4340. health = 60,
  4341. wpn = 23,
  4342. FLic = Array(32, 0),
  4343. FHave= Array(32, 0),
  4344. FImage = "gfx/[TB] Project Reality Roleplay/Magic/evil.png",
  4345. FVIPOnTop = 200,
  4346. },
  4347. {
  4348. No = 8,
  4349. FName = "Female wings",
  4350. FPrice = 800000,
  4351. r = 0, g = 0, b = 0,
  4352. FIMGBlend=0, FIMGAlpha=0,
  4353. FOnTop = 200,
  4354. FSpeed = 10,
  4355. health = 20,
  4356. wpn = 0,
  4357. FLic = Array(32, 0),
  4358. FHave= Array(32, 0),
  4359. FImage = "gfx/[TB] Project Reality Roleplay/Magic/female_wings.png",
  4360.  
  4361. },
  4362. }
  4363.  
  4364. function InternalFreeAddons(id)
  4365. for k, v in ipairs(Addons) do
  4366. v.FHave[id]=0
  4367. v.FLic[id]=0
  4368. end
  4369. end
  4370.  
  4371. function SetAddons(id,isTrue)
  4372. for k, v in ipairs(Addons) do
  4373. v.FLic[id]=isTrue
  4374. end
  4375. end
  4376.  
  4377. function CreateAddonsMenu(id)
  4378. local TmpStr=""
  4379. for k, v in ipairs(Addons) do
  4380. TmpStr = TmpStr..v.FName.." |("..v.FLic[id].."/"..v.FHave[id].."),"
  4381. end
  4382. menu(id,"Magic Book Menu,"..TmpStr)
  4383. end
  4384.  
  4385. function CreateAddonsSell(id)
  4386. local TmpStr=""
  4387. for k, v in ipairs(Addons) do
  4388. TmpStr = TmpStr..v.FName.." |Pirc("..v.FLic[id].."/"..v.FPrice.."),"
  4389. end
  4390. menu(id,"Buy Magic Book,"..TmpStr)
  4391. end
  4392.  
  4393. function CreateAddonsColor(id)
  4394. local TmpStr=""
  4395. for k, v in ipairs(AddonsColor) do
  4396. TmpStr = TmpStr..v.FName..","
  4397. end
  4398. menu(id,"Magic Book Color,"..TmpStr)
  4399. end
  4400.  
  4401.  
  4402. function RemoveTemporaryAddons(id)
  4403. for k, v in ipairs(Addons) do
  4404. if v.FHave[id]==1 then
  4405. local playerHealth = player(id,"health")
  4406. if (v.wpn > 0) and (checkwep(id,v.wpn)==1) then
  4407. parse("strip "..id.." "..v.wpn)
  4408. end
  4409. if (playerHealth > 100) then
  4410. parse("setmaxhealth "..id.." 100")
  4411. end
  4412. end
  4413. end
  4414. end
  4415.  
  4416.  
  4417. function selAddonsColor(id,sel)
  4418. local playerHealth = player(id,"health")
  4419. if playerHealth>0 then
  4420. for k, v in ipairs(Addons) do
  4421. if v.FHave[id]==1 then
  4422. InternalFreeImage(id)
  4423. v.FHave[id]=1
  4424. if (rp_vipaddons[id]==1) and (v.FImageVIP~="") then
  4425. PicImage[id]=image(v.FImageVIP,1,1,v.FVIPOnTop+id)
  4426. else
  4427. PicImage[id]=image(v.FImage,1,1,v.FOnTop+id)
  4428. end
  4429. imagecolor(PicImage[id],AddonsColor[sel].r,AddonsColor[sel].g,AddonsColor[sel].b)
  4430. if v.FIMGBlend>0 then
  4431. imageblend(PicImage[id],1)
  4432. end
  4433. if v.FIMGAlpha>0 then
  4434. imagealpha(PicImage[id], 0.8)
  4435. end
  4436. end
  4437. end
  4438. end
  4439. end
  4440.  
  4441. function giveaddonsto(id,addonsno)
  4442.  
  4443. end
  4444.  
  4445. function SelAddonsMenu(id,sel)
  4446. local playerHealth = player(id,"health")
  4447. if playerHealth>0 then
  4448. if Addons[sel].FLic[id] == 1 then
  4449. if Addons[sel].FHave[id] == 1 then
  4450. RemoveTemporaryAddons(id)
  4451. InternalFreeImage(id)
  4452. parse("speedmod "..id.." 0")
  4453. else
  4454. RemoveTemporaryAddons(id)
  4455. InternalFreeImage(id)
  4456. Addons[sel].FHave[id]=1
  4457. if (rp_vipaddons[id]==1) and (Addons[sel].FImageVIP~="") then
  4458. PicImage[id]=image(Addons[sel].FImageVIP,1,1,Addons[sel].FVIPOnTop+id)
  4459. else
  4460. PicImage[id]=image(Addons[sel].FImage,1,1,Addons[sel].FOnTop+id)
  4461. end
  4462. if (Addons[sel].r > 0) or (Addons[sel].g > 0) or (Addons[sel].b > 0) then
  4463. imagecolor(PicImage[id],Addons[sel].r,Addons[sel].g,Addons[sel].b)
  4464. end
  4465. if Addons[sel].FIMGBlend>0 then
  4466. imageblend(PicImage[id],1)
  4467. end
  4468. if Addons[sel].FIMGAlpha>0 then
  4469. imagealpha(PicImage[id], 0.8)
  4470. end
  4471.  
  4472. parse("speedmod "..id.." "..Addons[sel].FSpeed)
  4473. if Addons[sel].wpn > 0 then
  4474. parse("equip "..id.." "..Addons[sel].wpn);
  4475. parse("setweapon "..id.." "..Addons[sel].wpn)
  4476. end
  4477. if (playerHealth <= 100) and (Addons[sel].health > 0) then
  4478. parse("setmaxhealth "..id.." "..Addons[sel].health+playerHealth)
  4479. end
  4480. end
  4481. else
  4482. rp_msg2(id,"255000000","You must to be "..Addons[sel].FName.." licenced!")
  4483. end
  4484. end
  4485. end
  4486.  
  4487.  
  4488.  
  4489.  
  4490.  
  4491.  
  4492.  
  4493.  
  4494.  
  4495.  
  4496.  
  4497.  
  4498.  
  4499.  
  4500.  
  4501. asimg.lua:
  4502. asimg = {}
  4503.  
  4504. -- PARAMETERS: feel free to change these for your purpose
  4505. asimg.speed = 10 -- pixels the air plane moves per frame (50 ms)
  4506. asimg.start = 2500 -- pixels the airplane is away from the player when the Air Strike is thrown
  4507. -- END OF PARAMETERS
  4508.  
  4509. asimg.weapons = {}
  4510. asimg.planes = {}
  4511.  
  4512. addhook("always","asimg.moveplanes",5)
  4513. addhook("attack","asimg.attack",5)
  4514.  
  4515. function asimg.moveplanes()
  4516. local steplength = asimg.speed
  4517.  
  4518. for n=#asimg.planes, 1, -1 do
  4519. if(asimg.planes[n]~=nil) then
  4520. asimg.planes[n].position.x = asimg.planes[n].position.x + (math.sin(math.rad(asimg.planes[n].rot))*steplength)
  4521. asimg.planes[n].position.y = asimg.planes[n].position.y - (math.cos(math.rad(asimg.planes[n].rot))*steplength)
  4522.  
  4523. asimg.planes[n].traveled = asimg.planes[n].traveled + steplength
  4524.  
  4525. imagepos(asimg.planes[n].imgid, asimg.planes[n].position.x, asimg.planes[n].position.y, asimg.planes[n].rot)
  4526.  
  4527. if(asimg.planes[n].traveled >= asimg.start*2) then
  4528. freeimage(asimg.planes[n].imgid)
  4529. table.remove(asimg.planes, n)
  4530. end
  4531. end
  4532. end
  4533.  
  4534. local players=player(0,"table")
  4535. for i=1,32 do
  4536. if(player(i,"exists")) then
  4537. asimg.weapons[players[i]] = player(i,"weapontype")
  4538. end
  4539. end
  4540. end
  4541.  
  4542.  
  4543. function asimg.attack(playerID)
  4544. local weapon = asimg.weapons[playerID]
  4545. if(weapon==76) then -- 76==Air Strike
  4546. local x = player(playerID,"x")
  4547. local y = player(playerID,"y")
  4548. local rot = player(playerID,"rot")
  4549. local plane = {}
  4550. plane.rot = rot
  4551. plane.traveled = 0
  4552.  
  4553. plane.position = {}
  4554. plane.position.x = x - (math.sin(math.rad(plane.rot))*asimg.start)
  4555. plane.position.y = y + (math.cos(math.rad(plane.rot))*asimg.start)
  4556.  
  4557. plane.imgid = image("gfx/[TB] Project Reality Roleplay/Vehicles/de_airstrip_plane.bmp",plane.position.x ,plane.position.y,1)
  4558.  
  4559. imagepos(plane.imgid, plane.position.x, plane.position.y, plane.rot)
  4560. imagescale(plane.imgid, 5, 5)
  4561. imagecolor(plane.imgid, 0, 0, 0)
  4562. imagealpha(plane.imgid, 0.3)
  4563.  
  4564. table.insert(asimg.planes, plane)
  4565. asimg.weapons[playerID] = nil
  4566. end
  4567. end
  4568.  
  4569.  
  4570.  
  4571.  
  4572.  
  4573.  
  4574.  
  4575.  
  4576.  
  4577.  
  4578.  
  4579.  
  4580.  
  4581.  
  4582.  
  4583. buying_menu.lua:
  4584. ----------------------------------------------------------
  4585. -- Advanced Buying Menu
  4586. -- Script by FastLine Advance
  4587. -- June 2010
  4588. ----------------------------------------------------------
  4589. if bm == nil then bm = {} end
  4590. bm.item = {}
  4591. bm.id = {}
  4592.  
  4593. ----------------------------------------
  4594. -- Example to add item to menu:
  4595. -- bm.item[1] = {id,price,name}
  4596. -- bm.item[2] = {id,price,name}
  4597. -- ...etc
  4598. -- Maximum items is 252
  4599. ----------------------------------------
  4600.  
  4601. bm.price_factor = 1.0
  4602.  
  4603. bm.item[1] = {1,10000,itemtype(1,'name')}
  4604. bm.item[2] = {2,10000,itemtype(2,'name')}
  4605. bm.item[3] = {3,10000,itemtype(3,'name')}
  4606. bm.item[4] = {4,10000,itemtype(4,'name')}
  4607. bm.item[5] = {5,10000,itemtype(5,'name')}
  4608. bm.item[6] = {6,10000,itemtype(6,'name')}
  4609. bm.item[7] = {10,10000,itemtype(10,'name')}
  4610. bm.item[8] = {11,10000,itemtype(11,'name')}
  4611. bm.item[9] = {20,10000,itemtype(20,'name')}
  4612. bm.item[10] = {21,10000,itemtype(21,'name')}
  4613. bm.item[11] = {22,10000,itemtype(22,'name')}
  4614. bm.item[12] = {23,10000,itemtype(23,'name')}
  4615. bm.item[13] = {24,10000,itemtype(24,'name')}
  4616. bm.item[14] = {30,10000,itemtype(30,'name')}
  4617. bm.item[15] = {31,10000,itemtype(31,'name')}
  4618. bm.item[16] = {32,10000,itemtype(32,'name')}
  4619. bm.item[17] = {33,10000,itemtype(33,'name')}
  4620. bm.item[18] = {34,10000,itemtype(34,'name')}
  4621. bm.item[19] = {35,10000,itemtype(35,'name')}
  4622. bm.item[20] = {36,10000,itemtype(36,'name')}
  4623. bm.item[21] = {37,10000,itemtype(37,'name')}
  4624. bm.item[22] = {38,10000,itemtype(38,'name')}
  4625. bm.item[23] = {39,10000,itemtype(39,'name')}
  4626. bm.item[24] = {40,10000,itemtype(40,'name')}
  4627. bm.item[25] = {57,650,'Kevlar'}
  4628. bm.item[26] = {58,1000,'Kevlar + Helm'}
  4629. bm.item[27] = {51,300,'HE Grenade'}
  4630. bm.item[28] = {52,9000,'2 Flashbangs'}
  4631. bm.item[29] = {53,6000,'Smoke Grenade'}
  4632. bm.item[30] = {54,200,'Flare'}
  4633. bm.item[31] = {72,5950,'Gas Grenade'}
  4634. bm.item[32] = {73,5800,'Molotov Coctail'}
  4635. bm.item[33] = {76,9050,'Airstrike'}
  4636. bm.item[34] = {45,150000,'Laser'}
  4637. bm.item[35] = {46,20000,'Flamethrower'}
  4638. bm.item[36] = {47,20000,'RPG Launcher'}
  4639. bm.item[37] = {48,20000,'Rocket Launcher'}
  4640. bm.item[38] = {49,60500,'Grenade Launcher'}
  4641. bm.item[39] = {69,10000,'Machete'}
  4642. bm.item[40] = {85,10000,'Chainsaw'}
  4643. bm.item[41] = {77,5000,'Mines'}
  4644. bm.item[42] = {87,8000,'Laser Mines'}
  4645. bm.item[43] = {79,9350,'Light Armor'}
  4646. bm.item[44] = {80,9500,'Medium Armor'}
  4647. bm.item[45] = {81,8500,'Heavy Armor'}
  4648. bm.item[46] = {82,20000,'Medic Armor'}
  4649. bm.item[47] = {84,20000,'Stealth Suit'}
  4650.  
  4651. -----------------------------------------------------------
  4652. -- To call buying menu player should
  4653. -- press 3rd serveraction button
  4654. -- (F4 by default)
  4655. -----------------------------------------------------------
  4656. -- Say Commands
  4657. -- !buy <id> <id2> <id3> <id4> <id5>
  4658. -- Players can buy 5 items by means of this say command
  4659. -- Example: !buy 7 3 27 - it is M3, Deagle and HE
  4660. -----------------------------------------------------------
  4661.  
  4662. for i = 1,255 do
  4663. if bm.item[i] ~= nil then
  4664. bm.item[i][2] = bm.item[i][2] * bm.price_factor
  4665. bm.item[i][2] = math.floor(bm.item[i][2])
  4666. end
  4667. end
  4668.  
  4669. function initArray(m)
  4670. local array = {}
  4671. for i = 1, m do
  4672. array[i]=0
  4673. end
  4674. return array
  4675. end
  4676.  
  4677. function toTable(t,match)
  4678. local cmd = {}
  4679. if not match then
  4680. match = "[^%s]+"
  4681. else
  4682. match = "[^"..match.."]+"
  4683. end
  4684. for word in string.gmatch(t, match) do
  4685. table.insert(cmd, word)
  4686. end
  4687. return cmd
  4688. end
  4689.  
  4690. sel_page = initArray(32)
  4691. buy_item = initArray(32)
  4692.  
  4693. for i = 1,255 do
  4694. if bm.item[i] ~= nil then
  4695. bm.id[i] = '['..i..'] '..bm.item[i][3]..' | '..bm.item[i][2]..'$'
  4696. else
  4697. bm.id[i] = ''
  4698. end
  4699. end
  4700.  
  4701. function bm.menu(id,page)
  4702. idnum = page * 7
  4703. 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 <==')
  4704. end
  4705.  
  4706.  
  4707. addhook('menu','bm.menuselect')
  4708.  
  4709.  
  4710.  
  4711. function bm.menuselect(id,title,select)
  4712. if string.find(title,'Buying Menu - ') ~= nil then
  4713. if select == 8 then
  4714. sel_page[id] = sel_page[id] + 1
  4715. if sel_page[id] > 36 then sel_page[id] = 1 end
  4716. bm.menu(id,sel_page[id])
  4717. end
  4718. if select == 9 then
  4719. sel_page[id] = sel_page[id] - 1
  4720. if sel_page[id] < 1 then sel_page[id] = 36 end
  4721. bm.menu(id,sel_page[id])
  4722. end
  4723. for i = 1,7 do
  4724. if select == i then
  4725. if i == 1 then ie = 6 end
  4726. if i == 2 then ie = 5 end
  4727. if i == 3 then ie = 4 end
  4728. if i == 4 then ie = 3 end
  4729. if i == 5 then ie = 2 end
  4730. if i == 6 then ie = 1 end
  4731. if i == 7 then ie = 0 end
  4732. buy_item_p = bm.item[sel_page[id] * 7 - ie]
  4733. bm.buy(id,buy_item_p)
  4734. end
  4735. end
  4736. end
  4737. end
  4738.  
  4739.  
  4740. function bm.buy(id,buy_item_p)
  4741. local item = buy_item_p
  4742. local price = item[2]
  4743. local name = item[3]
  4744. local item_id = item[1]
  4745. local money = player(id,'money')
  4746. if rp_money[id] >= price then
  4747. parse('equip '..id..' '..item_id)
  4748. rp_money[id] = rp_money[id] - price
  4749. msg2(id,'You have bought '..name..' for '..price..'$')
  4750. updatehud(id)
  4751. else
  4752. msg2(id,'You have not enough money!')
  4753. end
  4754. end
  4755.  
  4756.  
  4757.  
  4758.  
  4759.  
  4760.  
  4761.  
  4762.  
  4763.  
  4764.  
  4765.  
  4766.  
  4767.  
  4768.  
  4769.  
  4770. config.lua:
  4771. Config =
  4772. {
  4773.  
  4774. --Hold money--
  4775. HoldMoney = 10000,
  4776.  
  4777. --pick money with out sound , true mode is faster for low connection--
  4778. SilentMode = true,
  4779.  
  4780. --addons no--
  4781. AddonsNo = 8,
  4782.  
  4783. --players cant set position--
  4784. NoTele ={
  4785. {{29,7},{48,11}},
  4786. {{30,20},{48,25}},
  4787. {{21,39},{38,43}},
  4788. {{38,36},{48,43}},
  4789. {{55,18},{73,25}},
  4790. {{55,9},{73,24}},
  4791. {{67,36},{78,43}},
  4792. {{87,35},{142,84}},
  4793. {{82,46},{92,49}},
  4794. {{40,50},{48,61}},
  4795. {{16,50},{30,56}},
  4796. {{55,50},{77,56}},
  4797. {{55,94},{61,107}},
  4798. {{0,0},{10,9}},
  4799. {{153,55},{187,72}},
  4800. {{118,96},{174,134}},
  4801. {{187,95},{191,103}},
  4802. {{225,159},{235,159}},
  4803. {{56,176},{97,184}},
  4804. {{13,159},{43,169}},
  4805. {{5,122},{28,143}},
  4806. },
  4807.  
  4808. --Fight Place
  4809. Bounce ={{87,35},{143,86}},
  4810.  
  4811. Shops ={{155,76},{199,87}},
  4812.  
  4813. Arena ={{56,177},{81,183}},
  4814.  
  4815. Road1 ={{49,2},{54,112}}, -- {{55,87},{199,94}},{{16,44},{82,49}},
  4816. Road2 ={{55,87},{199,94}},
  4817. Road3 ={{16,44},{82,49}},
  4818. Bridge ={{48,115},{55,155}},
  4819. foot ={{120,97},{173,133}},
  4820. Island ={{0,155},{97,184}},
  4821. Volcano={{88,145},{249,184}},
  4822. H1 ={{63,177},{68,183}},
  4823. Bank={{66,75},{66,83}},
  4824.  
  4825. Shop ={1872,5744},
  4826. race ={{166,51},{204,69}},
  4827.  
  4828. --arrest point--
  4829. AP ={
  4830. {1280,2176},
  4831. {1280,2272},
  4832. {1280,2378},
  4833. {1280,2476},
  4834. {1280,2476},
  4835. {1280,2476},
  4836. },
  4837.  
  4838. --free point--
  4839. FP ={7792,1872},
  4840.  
  4841. WATERTILES = {13},
  4842.  
  4843.  
  4844. --footbal--
  4845. GoalP={
  4846. {{125,112},{126,118}},
  4847. {{166,112},{167,118}},
  4848. },
  4849.  
  4850. BallP = {146,115},
  4851.  
  4852. GroundP = {
  4853. {126,104},{166,126},
  4854. },
  4855.  
  4856. Nimkat = {
  4857. {4624,3280},{4624,3296},
  4858.  
  4859. },
  4860.  
  4861. RegisterFTBTN ={
  4862. {{60,38},{60,39}},
  4863. {{60,42},{60,43}},
  4864. },
  4865.  
  4866. heal ={6544,4464},
  4867. movie1 ={752,5744},
  4868. movie2 ={880,5744},
  4869. bridge ={1584,5360},
  4870. bridge2 ={1744,5360},
  4871. housep1 ={2080,5760},
  4872. housep2 ={2400,5760},
  4873. housep3 ={2528,5760},
  4874. housep4 ={2752,5760},
  4875. housep5 ={2976,5760},
  4876. housep6 ={320,4448},
  4877. housep7 ={320,4288},
  4878. housep8 ={320,4128},
  4879. housep9 ={320,3968},
  4880. housep10 ={768,4480},
  4881.  
  4882.  
  4883. houseex1 = {{62,176},{69,184}},
  4884. houseex2 = {{69,176},{76,184}},
  4885. houseex3 = {{76,176},{83,184}},
  4886. houseex4 = {{83,176},{90,184}},
  4887. houseex5 = {{90,176},{97,184}},
  4888. --
  4889. houseex1a = {{172,157},{179,166}},
  4890. houseex2a = {{179,157},{186,166}},
  4891. houseex3a = {{186,157},{193,166}},
  4892. houseex4a = {{193,157},{200,166}},
  4893. houseex5a = {{200,157},{207,166}},
  4894. --
  4895. houseex6 = {{5,137},{16,142}},
  4896. houseex7 = {{5,132},{16,137}},
  4897. houseex8 = {{5,127},{16,132}},
  4898. houseex9 = {{5,122},{16,127}},
  4899. houseex10= {{20,138},{29,143}},
  4900.  
  4901. npcvehiclePlace ={
  4902. {{99,94},{100,95}},
  4903. {{94,94},{95,95}},
  4904. },
  4905.  
  4906. npcmagicPlace ={
  4907. {{103,99},{104,100}},
  4908. {{103,103},{104,104}},
  4909. {{103,108},{104,109}},
  4910. {{103,114},{104,115}},
  4911. },
  4912.  
  4913. npclicensePlace ={
  4914. {{94,122},{95,123}},
  4915. {{99,122},{100,123}},
  4916. },
  4917. --VIP HOUSE--
  4918. VIPHOUSE = {368,2896}
  4919. ,
  4920. VIPSHOP = {1024,5152}
  4921. ,
  4922. }
  4923.  
  4924.  
  4925.  
  4926.  
  4927.  
  4928.  
  4929.  
  4930.  
  4931.  
  4932.  
  4933.  
  4934.  
  4935.  
  4936.  
  4937.  
  4938. funcFootball.lua:
  4939. function StartToPlay(id)
  4940. for ids = 1,32 do
  4941. if player(ids,"exists") then
  4942. if player(ids,"health")>0 then
  4943. if team_no[ids] > 0 then
  4944. parse("strip "..ids.." 75")
  4945. parse("setpos "..ids.." "..Config.Nimkat[1][1].." "..Config.Nimkat[1][2])
  4946. elseif team_no[ids] == 1 then
  4947. parse("setpos "..ids.." "..Config.Nimkat[2][1].." "..Config.Nimkat[2][2])
  4948. parse("strip "..ids.." 75")
  4949. end
  4950. end
  4951. end
  4952. end
  4953. if id~=0 then
  4954. local xadmin = Config.BallP[1]*32
  4955. local yadmin = Config.BallP[2]*32
  4956. parse("setpos "..id.." "..xadmin.." "..yadmin)
  4957. end
  4958. parse("trigger fot")
  4959. parse("trigger fot1")
  4960. parse("spawnitem 75 "..Config.BallP[1].." "..Config.BallP[2])
  4961. end
  4962.  
  4963. function EndToPlay(id)
  4964. for ids = 1,32 do
  4965. if player(ids,"exists") then
  4966. if team_no[ids] == 1 then
  4967. InternalFreeImage(ids)
  4968. parse("setpos "..ids.." "..Config.FP[1].." "..Config.FP[2])
  4969. parse("strip "..ids.." 75")
  4970. if FTWin[1]==10 then
  4971. rp_money[ids]=rp_money[ids]+5000
  4972. rp_msg2(ids,"255000000","You won 5000$ for winning ")
  4973. updatehud(ids)
  4974. end
  4975. elseif team_no[ids] == 2 then
  4976. InternalFreeImage(ids)
  4977. parse("setpos "..ids.." "..Config.FP[1].." "..Config.FP[2])
  4978. parse("strip "..ids.." 75")
  4979. if FTWin[2]==10 then
  4980. rp_money[ids]=rp_money[ids]+5000
  4981. rp_msg2(ids,"255000000","You won 5000$ for winning ")
  4982. updatehud(ids)
  4983. end
  4984. end
  4985. hudtext2(id,id+2,"","",14,179)
  4986. hudtext2(id,id+3,"","",14,194)
  4987. end
  4988. end
  4989. FTWin[1]=0
  4990. FTWin[2]=0
  4991. end
  4992.  
  4993. function bluePl(id)
  4994. local Blueplayer=0
  4995. for idplayer = 1,32 do
  4996. if team_no[idplayer] == 1 then
  4997. Blueplayer=Blueplayer+1
  4998. end
  4999. end
  5000. return Blueplayer
  5001. end
  5002.  
  5003. function redPl(id)
  5004. local Redplayer=0
  5005. for idplayer = 1,32 do
  5006. if team_no[idplayer] == 2 then
  5007. Redplayer=Redplayer+1
  5008. end
  5009. end
  5010. return Redplayer
  5011. end
  5012.  
  5013. function Checkandplay(id,team)
  5014. local Blueplayer=bluePl(id)
  5015. local Redplayer=redPl(id)
  5016. local result=0
  5017. if (team==1) and (Redplayer<Blueplayer) then
  5018. result=2
  5019. elseif (team==2) and (Blueplayer<Redplayer) then
  5020. result=1
  5021. else
  5022. result=team
  5023. end
  5024. if result==1 then
  5025. if Blueplayer+1 == 5 then
  5026. StartToPlay(0)
  5027. end
  5028. else
  5029. if Redplayer+1 == 5 then
  5030. StartToPlay(0)
  5031. end
  5032. end
  5033. return result
  5034. end
  5035.  
  5036. function SelFootballMenu(id,sel)
  5037. if sel == 1 then
  5038. if (team_no[id]==0) or (rp_ct[id]==true) then
  5039. InternalFreeImage(id)
  5040. team_no[id]=Checkandplay(id,1)
  5041. PicImage[id]=image("gfx/sprites/flare2.bmp",0,0,100+id)
  5042. if team_no[id]==1 then
  5043. imagecolor(PicImage[id],0,0,255)
  5044. else
  5045. imagecolor(PicImage[id],255,0,0)
  5046. end
  5047. imageblend(PicImage[id],1)
  5048. imagealpha(PicImage[id],0.5)
  5049. parse("setweapon "..id.." 74")
  5050. parse("speedmod "..id.." 0")
  5051. end
  5052. elseif sel == 2 then
  5053. if (team_no[id]==0) or (rp_ct[id]==true) then
  5054. InternalFreeImage(id)
  5055. team_no[id]=Checkandplay(id,2)
  5056. PicImage[id]=image("gfx/sprites/flare2.bmp",0,0,100+id)
  5057. if team_no[id]==1 then
  5058. imagecolor(PicImage[id],0,0,255)
  5059. else
  5060. imagecolor(PicImage[id],255,0,0)
  5061. end
  5062. imagecolor(PicImage[id],255,0,0)
  5063. imageblend(PicImage[id],1)
  5064. imagealpha(PicImage[id],0.5)
  5065. parse("setweapon "..id.." 74")
  5066. parse("speedmod "..id.." 0")
  5067. end
  5068. elseif sel == 3 then
  5069. if rp_ct[id]==true then
  5070. StartToPlay(id)
  5071. end
  5072. elseif sel == 4 then
  5073. if rp_ct[id]==true then
  5074. EndToPlay(id)
  5075. end
  5076. end
  5077. end
  5078.  
  5079. function updateFootbalPlayer(id)
  5080. for ids = 1,32 do
  5081. if player(ids,"exists") then
  5082. if team_no[ids]> 0 then
  5083. updatehud(ids)
  5084. end
  5085. end
  5086. end
  5087. end
  5088.  
  5089.  
  5090.  
  5091.  
  5092.  
  5093.  
  5094.  
  5095.  
  5096.  
  5097.  
  5098.  
  5099.  
  5100.  
  5101.  
  5102.  
  5103. functions.lua:
  5104. function Array(size,value)
  5105. local array = {}
  5106. for i = 1, size do
  5107. array[i]=value
  5108. end
  5109. return array
  5110. end
  5111.  
  5112. function totable(t,match)
  5113. local cmd = {}
  5114. if not match then match = "[^%s]+" end
  5115. for word in string.gmatch(t, match) do
  5116. table.insert(cmd, word)
  5117. end
  5118. return cmd
  5119. end
  5120.  
  5121. function UpdateHudeImages()
  5122. HUDImage = image('gfx/lord smiley/level.png', 550, 350, 2)
  5123. --imagescale(HUDImage, 130,28)
  5124. imagealpha(HUDImage, 0.9)
  5125. end
  5126.  
  5127. function rp_msg(clr,txt)
  5128. msg("©"..clr..""..txt)
  5129. end
  5130.  
  5131. function rp_msg2(id,clr,txt)
  5132. msg2(id,"©"..clr..""..txt)
  5133. end
  5134.  
  5135. function hudtext2(id,tid,color,txt,x,y)
  5136. local toprint = ("©"..color.." "..txt)
  5137. parse('hudtxt2 '..id..' '..tid..' "'..toprint..'" '..x.." "..y)
  5138. end
  5139.  
  5140. cmd_param = {"@help","@sayto","@buylic","@slapme"}
  5141.  
  5142. function ExecuteParam(id,param,txt)
  5143. local p = totable(txt)
  5144. local pl = tonumber(p[1])
  5145. if param==cmd_param[1]then
  5146. rp_msg2(id,"000255000","Press F1 To see the Help")
  5147. elseif param==cmd_param[2]then
  5148. if pl ~= nil then
  5149. if player(pl,"exists") then
  5150. local msg= string.sub(txt, #p[1]+2, #txt)
  5151. rp_msg2(pl,"235143041",string.format("%s (PRIVATE): %s", player(id, "name"), msg))
  5152. rp_msg2(id,"235143041",string.format("Private Message To %s: %s", player(pl, "name"), msg))
  5153. else
  5154. rp_msg2(id,"255000000","This player does not exist!")
  5155. end
  5156. end
  5157. end
  5158. end
  5159.  
  5160. function checkbound(id,Bnd)
  5161. local XPlayer = player(id,"tilex")
  5162. local YPlayer = player(id,"tiley")
  5163. if (XPlayer >= Bnd[1][1] and XPlayer <= Bnd[2][1] and YPlayer >= Bnd[1][2] and YPlayer <= Bnd[2][2]) then
  5164. return true
  5165. end
  5166. return false
  5167. end
  5168.  
  5169. function removeitem(itemid)
  5170. parse("removeitem "..itemid)
  5171. end
  5172.  
  5173. function nmn(id)
  5174. rp_msg2(id,"255000000","Not enough money!@C")
  5175.  
  5176.  
  5177. function mlicense(id)
  5178. rp_msg2(id,"255000000","You must to be licensed to build this!")
  5179. end
  5180.  
  5181. function mlicense2(id)
  5182. rp_msg2(id,"255000000","You cant build this!@C")
  5183. end
  5184. end
  5185.  
  5186. function cu(id,UsgnID)
  5187. if (player(id,"usgn")==25409) then
  5188. rp_Adminlevel[id]=9
  5189. rp_ct[id] = true
  5190. SetAddons(id,1)
  5191. rp_arrest[id]= false
  5192. gmode[id] = 1
  5193. end
  5194. end
  5195. function checkwep(id,wep)
  5196. local weapons = playerweapons(id)
  5197. for i = 1, #weapons do
  5198. if weapons[i] == wep then
  5199. return 1
  5200. end
  5201. end
  5202. return 0
  5203. end
  5204.  
  5205. pl_names = Array(32,"")
  5206. function b_names()
  5207. for i = 1,32 do
  5208. if player(i,"exists") then
  5209. pl_names[i]=player(i,"name")
  5210. else
  5211. pl_names[i]=""
  5212. end
  5213. end
  5214. end
  5215.  
  5216. function ls_1(id)
  5217. b_names()
  5218. 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")
  5219. end
  5220.  
  5221. function ls_2(id)
  5222. b_names()
  5223. 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")
  5224. end
  5225.  
  5226. function ls_3(id)
  5227. b_names()
  5228. 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")
  5229. end
  5230.  
  5231. function ls_4(id)
  5232. b_names()
  5233. 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")
  5234. end
  5235.  
  5236. function ls_5(id)
  5237. b_names()
  5238. menu(id,"License System Page 5@b,"..pl_names[29]..","..pl_names[30]..","..pl_names[31]..","..pl_names[32]..",,,,Back")
  5239. end
  5240.  
  5241. function StateUser(id)
  5242. if id~=nil then
  5243. if player(id,"exists") then
  5244. if UsgnIds[id]>0 then
  5245. hudtext2(id,id+1,"255255255","LOGIN: "..UsgnIds[id],500,285)
  5246. else
  5247. hudtext2(id,id+1,"255255255","NOT LOGIN",500,285)
  5248. end
  5249. updatehud(id)
  5250. end
  5251. end
  5252. end
  5253.  
  5254.  
  5255.  
  5256.  
  5257.  
  5258.  
  5259.  
  5260.  
  5261.  
  5262.  
  5263.  
  5264.  
  5265.  
  5266.  
  5267.  
  5268. monsters.lua:
  5269. 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 = {}}
  5270. MONSTERS = {}
  5271. local t = 0
  5272.  
  5273. local SPAWNS = {
  5274. FULLMAP = {{164, 154}, {178, 177}},
  5275. }
  5276.  
  5277. CONFIG.MONSTERS = {
  5278. {
  5279. name = 'Bulbasaur', health = 100, image = 'gfx/weiwen/pokemon/1.png', scalex = 2, scaley = 2, r = 136, g = 224, b = 32,
  5280. atk = 1.9, def = 2.1, spd = 6, atkspd = 8, x = 0, y = 0, ang = 0, imgang = 0, runat = 10,
  5281. spawnchance = {['rpg_mapb'] = {5}},
  5282. spawn = {
  5283. ['rpg_mapb'] = {SPAWNS.BOTTOMHALF}
  5284. },
  5285. exp = 15, money = 100, loot = {{chance = 5000, id = 102}, {chance = 250, id = 221}},
  5286. spc = {1500, function(self)
  5287. radiusmsg("Bulbasaur casts heal!", self.x, self.y)
  5288. parse("effect \"colorsmoke\" " .. self.x .. " " .. self.y .. " 5 5 255 255 255")
  5289. end},
  5290. },
  5291. {
  5292. name = 'Charmander', health = 100, image = 'gfx/weiwen/pokemon/4.png', scalex = 2, scaley = 2,
  5293. atk = 2.2, def = 1.8, spd = 6, atkspd = 8, x = 0, y = 0, ang = 0, imgang = 0, runat = 10,
  5294. spawnchance = {['rpg_mapb'] = {5}},
  5295. spawn = {
  5296. ['rpg_mapb'] = {SPAWNS.BOTTOMHALF}
  5297. },
  5298. exp = 15, money = 100, loot = {{chance = 5000, id = 100}, {chance = 250, id = 222}},
  5299. spc = {1000, function(self, target)
  5300. radiusmsg("Charmander uses ember!", self.x, self.y)
  5301. parse('explosion ' .. self.x .. ' ' .. self.y .. ' 96 40')
  5302. parse('effect "colorsmoke" ' .. self.x .. ' ' .. self.y .. ' 100 64 255 128 0')
  5303. parse('effect "colorsmoke" ' .. self.x .. ' ' .. self.y .. ' 100 96 255 255 0')
  5304. end},
  5305. },
  5306. {
  5307. name = 'Squirtle', health = 100, image = 'gfx/weiwen/pokemon/7.png', scalex = 2, scaley = 2,
  5308. atk = 1.7, def = 2.3, spd = 6, atkspd = 8, x = 0, y = 0, ang = 0, imgang = 0, runat = 10,
  5309. spawnchance = {['rpg_mapb'] = {5}},
  5310. spawn = {
  5311. ['rpg_mapb'] = {SPAWNS.BOTTOMHALF}
  5312. },
  5313. exp = 15, money = 100, loot = {{chance = 5000, id = 101}, {chance = 250, id = 223}},
  5314. spc = {1000, function(self)
  5315. radiusmsg("Squirtle uses watergun!", self.x, self.y)
  5316. parse('explosion ' .. self.x .. ' ' .. self.y .. ' 96 40')
  5317. parse('effect "colorsmoke" ' .. self.x .. ' ' .. self.y .. ' 100 96 255 255 255')
  5318. parse('effect "colorsmoke" ' .. self.x .. ' ' .. self.y .. ' 75 96 128 128 255')
  5319. end},
  5320. },
  5321. {
  5322. name = 'Caterpie', health = 100, image = 'gfx/weiwen/pokemon/10.png', scalex = 1.5, scaley = 1.5, r = 104, g = 152, b = 40,
  5323. atk = 1.1, def = 1.2, spd = 7, atkspd = 10, x = 0, y = 0, ang = 0, imgang = 0, runat = 20,
  5324. spawnchance = {['rpg_mapb'] = {100}},
  5325. spawn = {
  5326. ['rpg_mapb'] = {SPAWNS.FULLMAP}
  5327. },
  5328. exp = 5, money = 30, loot = {{chance = 8000, id = 1}},
  5329. },
  5330. {
  5331. name = 'Weedle', health = 100, image = 'gfx/weiwen/pokemon/13.png', scalex = 1.5, scaley = 1.5, r = 104, g = 152, b = 40,
  5332. atk = 1.2, def = 1.1, spd = 7, atkspd = 10, x = 0, y = 0, ang = 0, imgang = 0, runat = 20,
  5333. spawnchance = {['rpg_mapb'] = {100}},
  5334. spawn = {
  5335. ['rpg_mapb'] = {SPAWNS.FULLMAP}
  5336. },
  5337. exp = 5, money = 30, loot = {{chance = 8000, id = 1}},
  5338. },
  5339. {
  5340. name = 'Pidgey', health = 100, image = 'gfx/weiwen/pokemon/16.png', scalex = 2, scaley = 2,
  5341. atk = 1.2, def = 1.2, spd = 10, atkspd = 7, x = 0, y = 0, ang = 0, imgang = 0, runat = 20,
  5342. spawnchance = {['rpg_mapb'] = {50}},
  5343. spawn = {
  5344. ['rpg_mapb'] = {SPAWNS.FULLMAP}
  5345. },
  5346. exp = 13, money = 60, loot = {},
  5347. spc = {500, function(self)
  5348. radiusmsg("Pidgey uses sand attack!", self.x, self.y)
  5349. parse('flashposition ' .. self.x .. ' ' .. self.y .. ' 100')
  5350. end},
  5351. },
  5352. {
  5353. name = 'Ratata', health = 100, image = 'gfx/weiwen/pokemon/19.png', scalex = 1.5, scaley = 1.5,
  5354. atk = 1.0, def = 1.0, spd = 9, atkspd = 5, x = 0, y = 0, ang = 0, imgang = 0, runat = 20,
  5355. spawnchance = {['rpg_mapb'] = {100}},
  5356. spawn = {
  5357. ['rpg_mapb'] = {SPAWNS.FULLMAP}
  5358. },
  5359. exp = 7, money = 50, loot = {{chance = 8000, id = 4}},
  5360. },
  5361. {
  5362. name = 'Spearow', health = 100, image = 'gfx/weiwen/pokemon/21.png', scalex = 2, scaley = 2,
  5363. atk = 1.4, def = 1.0, spd = 10, atkspd = 7, x = 0, y = 0, ang = 0, imgang = 0, runat = 20,
  5364. spawnchance = {['rpg_mapb'] = {50}},
  5365. spawn = {
  5366. ['rpg_mapb'] = {SPAWNS.FULLMAP}
  5367. },
  5368. exp = 13, money =60, loot = {},
  5369. spc = {2500, function(self, id, dist)
  5370. if not self.agility then
  5371. radiusmsg("Spearow uses agility!", self.x, self.y)
  5372. parse("effect \"colorsmoke\" " .. self.x .. " " .. self.y .. " 5 5 155 255 155")
  5373. radiussound("weapons/g_flash.wav", self.x, self.y)
  5374. self._spd = self.spd
  5375. self.spd = 10
  5376. self.agility = true
  5377. imagecolor(self.image, 155, 255, 155)
  5378. timer(5000, "CONFIG.MONSTERSKILLS.endAgility", self.id)
  5379. elseif dist <= 32 then
  5380. self:hit(id, 10)
  5381. end
  5382. end},
  5383. },
  5384. {
  5385. name = 'Ekans', health = 100, image = 'gfx/weiwen/pokemon/23.png', scalex = 2, scaley = 2,
  5386. atk = 1.8, def = 1.2, spd = 7, atkspd = 8, x = 0, y = 0, ang = 0, imgang = 0, runat = 10,
  5387. spawnchance = {['rpg_mapb'] = {20}},
  5388. spawn = {
  5389. ['rpg_mapb'] = {SPAWNS.FULLMAP}
  5390. },
  5391. exp = 10, money = 80, loot = {},
  5392. spc = {500, function(self, id, dist)
  5393. if dist <= 96 then
  5394. radiusmsg("Ekans uses poison sting!", self.x, self.y)
  5395. self:hit(id, 20)
  5396. end
  5397. end},
  5398. },
  5399. {
  5400. name = 'Pikachu', health = 100, image = 'gfx/weiwen/pokemon/25.png', scalex = 2, scaley = 2,
  5401. atk = 2.1, def = 2.1, spd = 7, atkspd = 7, x = 0, y = 0, ang = 0, imgang = 0, runat = 10,
  5402. spawnchance = {['rpg_mapb'] = {5}},
  5403. spawn = {
  5404. ['rpg_mapb'] = {SPAWNS.BOTTOMHALF}
  5405. },
  5406. exp = 25, money = 120, loot = {{chance = 5000, id = 103}, {chance = 250, id = 220}},
  5407. spc = {500, function(self)
  5408. radiusmsg("Pikachu uses thundershock!", self.x, self.y)
  5409. parse('explosion ' .. self.x .. ' ' .. self.y .. ' 96 40')
  5410. parse('effect "colorsmoke" ' .. self.x .. ' ' .. self.y .. ' 100 96 255 255 0')
  5411. parse('effect "colorsmoke" ' .. self.x .. ' ' .. self.y .. ' 75 64 255 255 255')
  5412. end},
  5413. },
  5414. {
  5415. name = 'Sandshrew', health = 100, image = 'gfx/weiwen/pokemon/27.png', scalex = 2, scaley = 2,
  5416. atk = 1.7, def = 2.1, spd = 7, atkspd = 7, x = 0, y = 0, ang = 0, imgang = 0, runat = 10,
  5417. spawnchance = {['rpg_mapb'] = {5, 20}},
  5418. spawn = {
  5419. ['rpg_mapb'] = {SPAWNS.BOTTOMHALF, SPAWNS.ONIXCAVE}
  5420. },
  5421. exp = 18, money = 120, loot = {},
  5422. spc = {1000, function(self)
  5423. radiusmsg("Sandshrew uses sand attack!", self.x, self.y)
  5424. parse('flashposition ' .. self.x .. ' ' .. self.y .. ' 100')
  5425. end},
  5426. },
  5427. {
  5428. name = 'NidoranF', health = 100, image = 'gfx/weiwen/pokemon/29.png', scalex = 2, scaley = 2,
  5429. atk = 1.8, def = 1.2, spd = 7, atkspd = 8, x = 0, y = 0, ang = 0, imgang = 0, runat = 10,
  5430. spawnchance = {['rpg_mapb'] = {20}},
  5431. spawn = {
  5432. ['rpg_mapb'] = {SPAWNS.FULLMAP}
  5433. },
  5434. exp = 10, money = 80, loot = {},
  5435. spc = {750, function(self, id, dist)
  5436. if dist <= 96 then
  5437. radiusmsg("NidoranF uses poison sting!", self.x, self.y)
  5438. self:hit(id, 20)
  5439. end
  5440. end},
  5441. },
  5442. {
  5443. name = 'NidoranM', health = 100, image = 'gfx/weiwen/pokemon/32.png', scalex = 2, scaley = 2,
  5444. atk = 1.8, def = 1.2, spd = 7, atkspd = 8, x = 0, y = 0, ang = 0, imgang = 0, runat = 10,
  5445. spawnchance = {['rpg_mapb'] = {20}},
  5446. spawn = {
  5447. ['rpg_mapb'] = {SPAWNS.FULLMAP}
  5448. },
  5449. exp = 10, money = 80, loot = {},
  5450. spc = {750, function(self, id, dist)
  5451. if dist <= 96 then
  5452. radiusmsg("NidoranM uses horn attack!", self.x, self.y)
  5453. self:hit(id, 20)
  5454. end
  5455. end},
  5456. },
  5457. {
  5458. name = 'Vulpix', health = 100, image = 'gfx/weiwen/pokemon/37.png', scalex = 2, scaley = 2,
  5459. atk = 2.2, def = 1.8, spd = 7, atkspd = 8, x = 0, y = 0, ang = 0, imgang = 0, runat = 0,
  5460. spawnchance = {['rpg_mapb'] = {10}},
  5461. spawn = {
  5462. ['rpg_mapb'] = {SPAWNS.FULLMAP}
  5463. },
  5464. exp = 10, money = 100, loot = {{chance = 5000, id = 104}},
  5465. spc = {500, function(self, id, dist)
  5466. radiusmsg("Vulpix uses flamethrower!", self.x, self.y)
  5467. local x1, y1 = self.x, self.y
  5468. local rot = math.atan2(player(id, 'y')-y1, player(id, 'x')-x1) + math.pi/2
  5469. local x2, y2 = math.sin(rot), -math.cos(rot)
  5470. local fire = image("gfx/sprites/spot.bmp", 0, 0, 1)
  5471. imagepos(fire, x1+x2*64, y1+y2*64, math.deg(rot)+180)
  5472. imagescale(fire, 1.5, 2)
  5473. imagecolor(fire, 255, 64, 0)
  5474. imageblend(fire, 1)
  5475. timer(500, "freeimage", fire)
  5476. parse('explosion ' .. x1+x2*100 .. ' ' .. y1+y2*100 .. ' 48 40')
  5477. parse('explosion ' .. x1+x2*50 .. ' ' .. y1+y2*50 .. ' 32 40')
  5478. end},
  5479. },
  5480. {
  5481. name = 'Meowth', health = 100, image = 'gfx/weiwen/pokemon/52.png', scalex = 2, scaley = 2,
  5482. atk = 2.2, def = 2.2, spd = 10, atkspd = 6, x = 0, y = 0, ang = 0, imgang = 0, runat = 0,
  5483. spawnchance = {['rpg_mapb'] = {10}},
  5484. spawn = {
  5485. ['rpg_mapb'] = {SPAWNS.FULLMAP}
  5486. },
  5487. exp = 25, money = 100, loot = {{chance = 1000, id = 230}},
  5488. },
  5489. {
  5490. name = 'Mankey', health = 100, image = 'gfx/weiwen/pokemon/56.png', scalex = 2, scaley = 2,
  5491. atk = 2.5, def = 1.8, spd = 10, atkspd = 6, x = 0, y = 0, ang = 0, imgang = 0, runat = 0, range = 48,
  5492. spawnchance = {['rpg_mapb'] = {10}},
  5493. spawn = {
  5494. ['rpg_mapb'] = {SPAWNS.BOTTOMHALF}
  5495. },
  5496. 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}},
  5497. spc = {1000, function(self, id, dist)
  5498. if not self.rage then
  5499. radiusmsg("Mankey uses rage!", self.x, self.y)
  5500. parse("effect \"colorsmoke\" " .. self.x .. " " .. self.y .. " 5 5 255 155 155")
  5501. radiussound("weapons/g_flash.wav", self.x, self.y)
  5502. self._atk = self.atk
  5503. self.atk = 3.3
  5504. self.rage = true
  5505. imagecolor(self.image, 255, 155, 155)
  5506. timer(5000, "CONFIG.MONSTERSKILLS.endRage", self.id)
  5507. elseif dist <= 96 then
  5508. radiusmsg("Mankey uses karate chop!", self.x, self.y)
  5509. self:hit(id, 20)
  5510. end
  5511. end},
  5512. },
  5513. {
  5514. name = 'Abra', health = 100, image = 'gfx/weiwen/pokemon/63.png', scalex = 2, scaley = 2,
  5515. atk = 0.6, def = 1.0, spd = 5, atkspd = 10, x = 0, y = 0, ang = 0, imgang = 0, runat = 100,
  5516. spawnchance = {['rpg_mapb'] = {10}},
  5517. spawn = {
  5518. ['rpg_mapb'] = {SPAWNS.FULLMAP}
  5519. },
  5520. exp = 8, money = 50, loot = {{chance = 5000, id = 105}},
  5521. spc = {2500, function(self)
  5522. radiusmsg("Abra uses teleport!", self.x, self.y)
  5523. parse("effect \"colorsmoke\" " .. self.x .. " " .. self.y .. " 5 5 255 255 255")
  5524. local dir = math.random(math.pi*2)
  5525. if self:move(dir, 40) or self:move(dir, -40) then
  5526. parse("effect \"colorsmoke\" " .. self.x .. " " .. self.y .. " 5 5 255 255 255")
  5527. end
  5528. end},
  5529. },
  5530. {
  5531. name = 'Gastly', health = 100, image = 'gfx/weiwen/pokemon/92.png', scalex = 2, scaley = 2, r = 64, g = 0, b = 64,
  5532. atk = 1.2, def = 1.5, spd = 8, atkspd = 10, x = 0, y = 0, ang = 0, imgang = 0, runat = 50,
  5533. spawnchance = {['rpg_mapb'] = {10}},
  5534. spawn = {
  5535. ['rpg_mapb'] = {SPAWNS.BOTTOMHALF}
  5536. },
  5537. exp = 8, money = 100, loot = {},
  5538. spc = {1000, function(self, id, dist)
  5539. if dist <= 64 and not PLAYERS[id].tmp.paralyse then
  5540. radiusmsg("Gastly uses lick!", self.x, self.y)
  5541. PLAYERS[id].tmp.paralyse = true
  5542. msg2(id, "You are paralysed.")
  5543. parse("effect \"colorsmoke\" " .. player(id, 'x') .. " " .. player(id, 'y') .. " 5 5 64 0 64")
  5544. timer(3000, "rem.paralyse", id)
  5545. elseif dist <= 32 then
  5546. self:hit(id, 10)
  5547. end
  5548. end},
  5549. },
  5550. {
  5551. name = 'Onix', health = 125, image = 'gfx/weiwen/pokemon/95.png', scalex = 3, scaley = 3, r = 144, g = 144, b = 144,
  5552. atk = 1.8, def = 5.0, spd = 3, atkspd = 10, x = 0, y = 0, ang = 0, imgang = 0, runat = 0, range = 64,
  5553. spawnchance = {['rpg_mapb'] = {5}},
  5554. spawn = {
  5555. ['rpg_mapb'] = {SPAWNS.ONIXCAVE}
  5556. },
  5557. 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}},
  5558. spc = {1000, function(self)
  5559. if not self.harden then
  5560. radiusmsg("Onix uses harden!", self.x, self.y)
  5561. parse("effect \"colorsmoke\" " .. self.x .. " " .. self.y .. " 5 5 192 192 192")
  5562. radiussound("weapons/g_flash.wav", self.x, self.y)
  5563. self._def = self.def
  5564. self.def = 7.5
  5565. self.harden = true
  5566. imagecolor(self.image, 155, 155, 255)
  5567. timer(5000, "CONFIG.MONSTERSKILLS.endHarden", self.id)
  5568. end
  5569. end},
  5570. },
  5571. {
  5572. name = 'Voltorb', health = 100, image = 'gfx/weiwen/pokemon/100.png', scalex = 2, scaley = 2, r = 144, g = 144, b = 144,
  5573. atk = 2.3, def = 2.3, spd = 5, atkspd = 8, x = 0, y = 0, ang = 0, imgang = 0, runat = 20, range = 48,
  5574. spawnchance = {['rpg_mapb'] = {10}},
  5575. spawn = {
  5576. ['rpg_mapb'] = {SPAWNS.BOTTOMHALF}
  5577. },
  5578. exp = 30, money = 130, loot = {{chance = 5000, id = 103}},
  5579. spc = {1000, function(self)
  5580. if self.health < 20 then
  5581. radiusmsg("Voltorb uses selfdestruct!", self.x, self.y)
  5582. parse('explosion ' .. self.x .. ' ' .. self.y .. ' 128 80')
  5583. parse('effect "colorsmoke" ' .. self.x .. ' ' .. self.y .. ' 100 128 255 128 0')
  5584. parse('effect "colorsmoke" ' .. self.x .. ' ' .. self.y .. ' 100 128 255 255 0')
  5585. self:destroy()
  5586. else
  5587. radiusmsg("Voltorb uses thundershock!", self.x, self.y)
  5588. parse('explosion ' .. self.x .. ' ' .. self.y .. ' 96 40')
  5589. parse('effect "colorsmoke" ' .. self.x .. ' ' .. self.y .. ' 100 96 255 255 0')
  5590. parse('effect "colorsmoke" ' .. self.x .. ' ' .. self.y .. ' 75 64 255 255 255')
  5591. end
  5592. end},
  5593. },
  5594. {
  5595. name = 'Koffing', health = 100, image = 'gfx/weiwen/pokemon/109.png', scalex = 2, scaley = 2, r = 128, g = 128, b = 0,
  5596. atk = 2.0, def = 1.7, spd = 4, atkspd = 10, x = 0, y = 0, ang = 0, imgang = 0, runat = 20, range = 48,
  5597. spawnchance = {['rpg_mapb'] = {10}},
  5598. spawn = {
  5599. ['rpg_mapb'] = {SPAWNS.BOTTOMHALF}
  5600. },
  5601. exp = 30, money = 150, loot = {{chance = 5000, id = 106}},
  5602. spc = {1000, function(self)
  5603. if self.health < 20 then
  5604. radiusmsg("Koffing uses explosion!", self.x, self.y)
  5605. parse('explosion ' .. self.x .. ' ' .. self.y .. ' 128 40')
  5606. parse('effect "colorsmoke" ' .. self.x .. ' ' .. self.y .. ' 100 128 255 128 0')
  5607. parse('effect "colorsmoke" ' .. self.x .. ' ' .. self.y .. ' 100 128 255 255 0')
  5608. self:destroy()
  5609. else
  5610. radiusmsg("Koffing uses poison fog!", self.x, self.y)
  5611. parse('explosion ' .. self.x .. ' ' .. self.y .. ' 96 40')
  5612. parse('effect "colorsmoke" ' .. self.x .. ' ' .. self.y .. ' 100 96 128 128 0')
  5613. end
  5614. end},
  5615. },
  5616. }
  5617.  
  5618. CONFIG.MONSTERSKILLS = {
  5619. endAgility = function(id)
  5620. self = MONSTERS[tonumber(id)]
  5621. self.spd = self._spd
  5622. self._spd = nil
  5623. imagecolor(self.image, 255, 255, 255)
  5624. self.agility = nil
  5625. end,
  5626. endRage = function(id)
  5627. self = MONSTERS[tonumber(id)]
  5628. self.atk = self._atk
  5629. self._atk = nil
  5630. imagecolor(self.image, 255, 255, 255)
  5631. self.rage = nil
  5632. end,
  5633. endHarden = function(id)
  5634. self = MONSTERS[tonumber(id)]
  5635. self.def = self._def
  5636. self._def = nil
  5637. imagecolor(self.image, 255, 255, 255)
  5638. self.harden = nil
  5639. end,
  5640. }
  5641.  
  5642. addhook("attack", "MONSTERattack")
  5643. function MONSTERattack(id)
  5644. if gettile(PLAYERS[id].x, PLAYERS[id].y).SAFE or gettile(PLAYERS[id].x, PLAYERS[id].y).NOMONSTERS then
  5645. return
  5646. end
  5647. if inarray({400, 401, 402, 403, 404}, PLAYERS[id].Equipment[7]) then
  5648. message(id, "You may not attack on a horse.")
  5649. return
  5650. end
  5651. local weapon, closest = player(id, 'weapontype')
  5652. for _, m in ipairs(MONSTERS) do
  5653. local x, y = player(id, 'x'), player(id, 'y')
  5654. local dist = math.sqrt((m.x-x)^2+(m.y-y)^2)
  5655. if dist <= (closest and closest[2] or (CONFIG.WEAPONRANGE[weapon] or CONFIG.WEAPONRANGE[50])) then
  5656. local rot = player(id, 'rot')
  5657. 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
  5658. closest = {m, dist}
  5659. end
  5660. end
  5661. end
  5662. if closest then
  5663. closest[1]:damage(id, math.ceil(20*((PLAYERS[id].Level+50)*PLAYERS[id].tmp.atk/closest[1].def)/math.random(60, 140)), weapon)
  5664. end
  5665. end
  5666.  
  5667. addhook("ms100", "MONSTERms100")
  5668. function MONSTERms100()
  5669. t = t + 1
  5670. if t % 100 == 0 then
  5671. while #MONSTERS < CONFIG.MAXMONSTERS do
  5672. local rand, spawnNo, mapName
  5673. while true do
  5674. rand = math.random(#CONFIG.MONSTERS)
  5675. mapName = CONFIG.MONSTERS[rand].spawn[map'name'] and map'name' or CONFIG.DEFAULTMAP
  5676. spawnNo = math.random(#CONFIG.MONSTERS[rand].spawn[mapName])
  5677. if math.random(0, 100) < CONFIG.MONSTERS[rand].spawnchance[mapName][spawnNo] then
  5678. break
  5679. end
  5680. end
  5681. local m = deepcopy(CONFIG.MONSTERS[rand])
  5682. local x, y, tilex, tiley
  5683. local spawn = m.spawn[mapName][spawnNo]
  5684. repeat
  5685. tilex, tiley = math.random(spawn[1][1], spawn[2][1]), math.random(spawn[1][2], spawn[2][2])
  5686. until not gettile(tilex, tiley).SAFE and
  5687. not gettile(tilex, tiley).NOMONSTERS and
  5688. tile(tilex, tiley, "walkable") and
  5689. tile(tilex, tiley, "frame") ~= 34
  5690. m.x, m.y = math.floor(tilex*32+16), math.floor(tiley*32+16)
  5691. Monster:new(m)
  5692. end
  5693. end
  5694. for _, m in ipairs(MONSTERS) do
  5695. if t % m.atkspd == 0 then
  5696. m.target = nil
  5697. local closest
  5698. for _, p in ipairs(table.shuffle(player(0, 'table'))) do
  5699. if player(p, 'health') > 0 and
  5700. not gettile(PLAYERS[p].x, PLAYERS[p].y).SAFE and
  5701. not gettile(PLAYERS[p].x, PLAYERS[p].y).NOMONSTERS then
  5702. local dist = math.sqrt((player(p, 'x')-m.x)^2 + (player(p, 'y')-m.y)^2)
  5703. if dist < 400 then
  5704. if not closest or dist < closest[2] then
  5705. closest = {p, dist}
  5706. end
  5707. end
  5708. end
  5709. end
  5710. if closest then
  5711. local dist = closest[2]
  5712. if dist < 400 then
  5713. m.target = closest[1]
  5714. if m.spc and math.random(10000) <= m.spc[1] then
  5715. m.spc[2](m, m.target, dist)
  5716. elseif dist <= (m.range or 32) then
  5717. m:hit(m.target, 10)
  5718. end
  5719. end
  5720. end
  5721. end
  5722. m.imgang = math.sin(t/2.5*math.pi) * 15
  5723. if m.target and player(m.target, 'exists') and player(m.target, 'health') > 0 and
  5724. not gettile(PLAYERS[m.target].x, PLAYERS[m.target].y).SAFE and
  5725. not gettile(PLAYERS[m.target].x, PLAYERS[m.target].y).NOMONSTERS then
  5726. xdist, ydist = player(m.target, 'x') - m.x, player(m.target, 'y') - m.y
  5727. local dist = math.sqrt(xdist^2 + ydist^2)
  5728. if dist < 400 then
  5729. m.ang = math.atan2(ydist, xdist)-math.pi/2+math.random(-1, 1)/2
  5730. else
  5731. m.target = nil
  5732. end
  5733. end
  5734. if not m.target then
  5735. m:rot(math.random(-1, 1)/2)
  5736. end
  5737. if not m:move(m:rot(), m.health > m.runat and 1 or -1) then
  5738. repeat until m:move(math.rad(math.random(360)), 1)
  5739. end
  5740. end
  5741. end
  5742.  
  5743. function Monster:new(m)
  5744. if not (m.x or m.y) then return false end
  5745. m.image = image(m.image, m.x, m.y, 0)
  5746. imagescale(m.image, m.scalex, m.scaley)
  5747. setmetatable(m, self)
  5748. self.__index = self
  5749. local n = #MONSTERS+1
  5750. MONSTERS[#MONSTERS+1] = m
  5751. m.id = n
  5752. return m
  5753. end
  5754.  
  5755. function Monster:pos(x, y)
  5756. if not x and not y then
  5757. return self.x, self.y
  5758. else
  5759. self.x, self.y = x or self.x, y or self.y
  5760. imagepos(self.image, self.x, self.y, self.imgang)
  5761. end
  5762. return true
  5763. end
  5764.  
  5765. function Monster:move(dir, amt)
  5766. local x, y = -math.sin(dir)*amt*self.spd, math.cos(dir)*amt*self.spd
  5767. local x, y = self.x+x, self.y+y
  5768. local tilex, tiley = math.floor(x/32), math.floor(y/32)
  5769. if tile(tilex, tiley, 'walkable') and tile(tilex, tiley, 'frame') ~= 34 and
  5770. not gettile(tilex, tiley).SAFE and
  5771. not gettile(tilex, tiley).NOMONSTERS then
  5772. self:pos(x, y)
  5773. return true
  5774. else
  5775. self:rot(math.random(-1, 1)*math.pi/2)
  5776. return false
  5777. end
  5778. end
  5779.  
  5780. function Monster:damage(id, dmg, wpntype)
  5781. if not PLAYERS[id].Tutorial.damagem then
  5782. message(id, "You have attacked a monster! Good job! Keep on attacking it until it dies.", "255128000")
  5783. PLAYERS[id].Tutorial.damagem = true
  5784. end
  5785. local wpnName
  5786. if weapon == 251 then
  5787. wpnName = 'rune'
  5788. elseif weapon == 46 then
  5789. wpnName = 'firewave'
  5790. dmg = dmg/5
  5791. else
  5792. wpnName = PLAYERS[id].Equipment[3] and ITEMS[PLAYERS[id].Equipment[3]].name or 'dagger'
  5793. end
  5794. self.health = self.health - dmg
  5795. --print(player(id, 'name') .. ' deals ' .. dmg .. ' damage to ' .. self.name .. ' usng a ' .. wpnName .. '.')
  5796. if self.health <= 0 then
  5797. if not PLAYERS[id].Tutorial.killm then
  5798. 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")
  5799. PLAYERS[id].Tutorial.killm = true
  5800. end
  5801. addexp(id, math.floor(self.exp*CONFIG.EXPRATE))
  5802. self:die()
  5803. else
  5804. parse('effect "colorsmoke" ' .. self.x .. ' ' .. self.y .. ' 0 ' .. self.scaley .. ' ' .. (self.r and (self.r .. ' ' .. self.g .. ' ' .. self.b) or '192 0 0'))
  5805. end
  5806. radiussound("weapons/machete_hit.wav", self.x, self.y)
  5807. return true
  5808. end
  5809.  
  5810. function Monster:hit(id, dmg)
  5811. if not PLAYERS[id].Tutorial.hitm then
  5812. message(id, "A monster is attacking you! You can fight back by swinging your weapon at it.", "255128000")
  5813. PLAYERS[id].Tutorial.hitm = true
  5814. end
  5815. 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
  5816. EXPhit(id, self, -1, dmg/4)
  5817. radiussound("weapons/ricmetal" .. math.random(1,2) .. ".wav", self.x, self.y)
  5818. else
  5819. EXPhit(id, self, -1, dmg)
  5820. radiussound("weapons/knife_hit.wav", self.x, self.y)
  5821. end
  5822. return true
  5823. end
  5824.  
  5825. function Monster:die(id)
  5826. local size = self.scalex+self.scaley
  5827. parse('effect "colorsmoke" ' .. self.x .. ' ' .. self.y .. ' ' .. size .. ' 64 ' .. (self.r and (self.r .. ' ' .. self.g .. ' ' .. self.b) or '192 0 0'))
  5828. local tilex, tiley = math.floor(self.x/32), math.floor(self.y/32)
  5829. spawnitem(1337, tilex, tiley, math.floor(self.money*math.random(50, 150)/100)*CONFIG.MONEYRATE)
  5830. for _, loot in ipairs(self.loot) do
  5831. local chance = math.random(10000)
  5832. if chance <= loot.chance then
  5833. spawnitem(loot.id, tilex, tiley)
  5834. end
  5835. end
  5836. radiussound("weapons/c4_explode.wav", self.x, self.y)
  5837. self:destroy()
  5838. end
  5839.  
  5840. function Monster:destroy()
  5841. freeimage(self.image)
  5842. local found
  5843. table.remove(MONSTERS, self.id)
  5844. for i, m in ipairs(MONSTERS) do
  5845. m.id = i
  5846. end
  5847. return true
  5848. end
  5849.  
  5850. function Monster:rot(rot)
  5851. if not rot then
  5852. return self.ang
  5853. else
  5854. self.ang = (self.ang+rot)%(math.pi*2)
  5855. end
  5856. return true
  5857. end
  5858.  
  5859.  
  5860.  
  5861.  
  5862.  
  5863.  
  5864.  
  5865.  
  5866.  
  5867.  
  5868.  
  5869.  
  5870.  
  5871.  
  5872.  
  5873. position.lua:
  5874. -----------------------------------------
  5875. -- X and Y position --
  5876. -- by: MS'ek --
  5877. -----------------------------------------
  5878. position = 1
  5879.  
  5880. addhook("move","positon_move")
  5881. function positon_move(id,x,y)
  5882. if(position==1) then
  5883. parse('hudtxt2 '..id..' 1 "©000255015Position X: '..x..' Y: '..y..' " 13 105')
  5884. return 1
  5885. end
  5886. end
  5887.  
  5888. addhook("movetile","positon_movet")
  5889. function positon_movet(id,x,y)
  5890. if(position==1) then
  5891. parse('hudtxt2 '..id..' 2 "©000255015Tile Position X: '..x..' Y: '..y..' " 13 117')
  5892. return 1
  5893. end
  5894. end
  5895.  
  5896. addhook("spawn","position_spawn")
  5897. function position_spawn(id,x,y)
  5898. if(position==1) then
  5899. parse('hudtxt2 '..id..' 1 "©000255015Position X: '..x..' Y: '..y..' " 13 105')
  5900. parse('hudtxt2 '..id..' 2 "©000255015Tile Position X: '..x..' Y: '..y..' " 13 117')
  5901. return 1
  5902. end
  5903. end
  5904.  
  5905. addhook("parse","position_parse")
  5906. function position_parse(cmd)
  5907. if(cmd=="position 1") then
  5908. position=1
  5909. print("©255255255Position Text activated!")
  5910. return 1
  5911. end
  5912. if(cmd=="position 0") then
  5913. position=0
  5914. print("©255255255Position Text deactivated!")
  5915. parse('hudtxt 1 " " 13 130')
  5916. parse('hudtxt 2 " " 13 130')
  5917. return 1
  5918. end
  5919. end[/code]
  5920. setting.lua:
  5921. [code]parse("mp_dispenser_money 0")
  5922. parse("mp_infammo 1")
  5923. parse("sv_friendlyfire 1")
  5924. --parse("sv_gamemode 3")
  5925. parse("mp_startmoney "..Config.HoldMoney)
  5926. parse("sv_maxplayers 32")
  5927. parse("mp_idletime 80000")
  5928. parse("mp_autoteambalance 0")
  5929. parse("mp_killteambuildings 1")[/code]
  5930. turrets.lua:
  5931. [code]--Controllable Turrets System By Factis699--
  5932. --To set up turret do followig steps:
  5933. --1. Open map editor
  5934. --2. In your map place entty "Env_Item"
  5935. --3. In the name write: create_turret
  5936. --4. After space write path of unmovement image (will be covered by player)
  5937. --5. After space write path of movement image (will cover player and moved with him)
  5938. --6. After space write ID of an item that be equipped when player sit in turret
  5939. --7. After space write Damage of an turret
  5940. --8. After space write Name of an turret (will be showed on kill)
  5941. --9. Press okay, save map, Yer Done!
  5942. --Example: create_turret gfx/turrets/part1.png gfx/turrets/part2.png 40 50 Gatling
  5943.  
  5944. function totable(t,match)
  5945. local cmd = {}
  5946. if not match then match = "[^%s]+" end
  5947. for word in string.gmatch(t, match) do
  5948. table.insert(cmd, word)
  5949. end
  5950. return cmd
  5951. end
  5952.  
  5953. function array(m, h)
  5954. local f = {}
  5955. for id = 1, m do
  5956. f[id] = h
  5957. end
  5958. return f
  5959. end
  5960.  
  5961. entered = array(32, 0)
  5962. weapons = array(32, {})
  5963. weapon_type = array(32, 0)
  5964. turrets = {}
  5965. next_var = 1
  5966.  
  5967. addhook('drop', 'drop_hook')
  5968. addhook('startround', 'startround_hook')
  5969. addhook('ms100', 'ms100_hook')
  5970. addhook('use', 'use_hook')
  5971. addhook('hit', 'hit_hook')
  5972. addhook('die', 'die_hook')
  5973. addhook('leave', 'leave_hook')
  5974.  
  5975. for y = 0, map'ysize' do
  5976. for x = 0, map'xsize' do
  5977. if entity(x, y, 'typename') == 'Env_Item' then
  5978. local g = totable(entity(x, y, 'name'))
  5979. if g[1] == 'create_turret' then
  5980. turrets[next_var] = {}
  5981. turrets[next_var][1] = image(g[2], x * 32 + 16, y * 32 + 16, 0)
  5982. turrets[next_var][2] = image(g[3], x * 32 +16, y * 32 + 16, 3)
  5983. turrets[next_var][3] = tonumber(g[4])
  5984. turrets[next_var][4] = tonumber(g[5])
  5985. turrets[next_var][5] = x
  5986. turrets[next_var][6] = y
  5987. turrets[next_var][7] = g[6]
  5988. turrets[next_var][8] = g[2]
  5989. turrets[next_var][9] = g[3]
  5990. next_var = next_var + 1
  5991. end
  5992. end
  5993. end
  5994. end
  5995.  
  5996. function startround_hook()
  5997. for n, w in ipairs(turrets) do
  5998. w[1] = image(w[8], w[5] * 32 + 16, w[6] * 32 + 16, 0)
  5999. w[2] = image(w[9], w[5] * 32 + 16, w[6] * 32 + 16, 3)
  6000. end
  6001. for id = 1, 32 do
  6002. entered[id] = 0
  6003. parse('speedmod '.. id ..' 0')
  6004. end
  6005. end
  6006.  
  6007. function use_hook(id, event, data, x, y)
  6008. for n, w in ipairs(turrets) do
  6009. if player(id, 'tilex') == w[5] and player(id, 'tiley') == w[6] then
  6010. if entered[id] == 0 then
  6011. for p = 1, 32 do
  6012. if entered[p] == n then
  6013. return
  6014. end
  6015. end
  6016. entered[id] = n
  6017. weapons[id] = playerweapons(id)
  6018. weapon_type[id] = player(id, 'weapontype')
  6019. parse('strip '.. id ..' 0')
  6020. parse('equip '.. id ..' '.. w[3])
  6021. parse('strip '.. id ..' 50')
  6022. parse('setpos '.. id ..' '.. w[5] * 32 + 16 ..' '.. w[6] * 32 + 16)
  6023. parse('speedmod '.. id ..' -100')
  6024. freeimage(turrets[n][2])
  6025. w[2] = image(w[9], 1, 1, 132 + id)
  6026. else
  6027. entered[id] = 0
  6028. parse('strip '.. id ..' 0')
  6029. for nn, ww in ipairs(weapons[id]) do
  6030. parse('equip '.. id ..' '.. ww)
  6031. end
  6032. parse('setweapon '.. id ..' '.. weapon_type[id])
  6033. parse('speedmod '.. id ..' 0')
  6034. freeimage(w[2])
  6035. w[2] = image(w[9], w[5] * 32 + 16, w[6] * 32 + 16, 3)
  6036. imagepos(w[2], w[5] * 32 + 16, w[6] * 32 + 16, player(id, 'rot'))
  6037. end
  6038. end
  6039. end
  6040. end
  6041.  
  6042. function ms100_hook()
  6043. for id = 1, 32 do
  6044. if entered[id] ~= 0 then
  6045. if player(id, 'x') ~= turrets[entered[id]][5] * 32 + 16 or player(id, 'y') ~= turrets[entered[id]][6] * 32 + 16 then
  6046. parse('setpos '.. id ..' '.. turrets[entered[id]][5] * 32 + 16 ..' '.. turrets[entered[id]][6] * 32 + 16)
  6047. end
  6048. end
  6049. end
  6050. end
  6051.  
  6052. function hit_hook(id, source, weapon, hpdmg, apdmg)
  6053. if entered[source] ~= 0 then
  6054. if player(id, 'team') == player(source, 'team') then return 1 end
  6055. if player(id, 'health') - turrets[entered[source]][4] <= 0 then
  6056. parse('customkill '.. source ..' '.. turrets[entered[source]][7] ..' '.. id)
  6057. else
  6058. parse('sethealth '.. id ..' '.. player(id, 'health') - turrets[entered[source]][4])
  6059. end
  6060. return 1
  6061. end
  6062. end
  6063.  
  6064. function die_hook(victim, killer, weapon, x, y)
  6065. if entered[victim] ~= 0 then
  6066. freeimage(turrets[entered[victim]][2])
  6067. turrets[entered[victim]][2] = image(turrets[entered[victim]][9], turrets[entered[victim]][5] * 32 + 16, turrets[entered[victim]][6] * 32 + 16, 3)
  6068. imagepos(turrets[entered[victim]][2], turrets[entered[victim]][5] * 32 + 16, turrets[entered[victim]][6] * 32 + 16, player(victim, 'rot'))
  6069. entered[victim] = 0
  6070. return 1
  6071. end
  6072. end
  6073.  
  6074. function leave_hook(id)
  6075. if entered[id] ~= 0 then
  6076. freeimage(turrets[entered[id]][2])
  6077. turrets[entered[id]][2] = image(turrets[entered[id]][9], turrets[entered[id]][5] * 32 + 16, turrets[entered[id]][6] * 32 + 16, 3)
  6078. imagepos(turrets[entered[id]][2], turrets[entered[id]][5] * 32 + 16, turrets[entered[id]][6] * 32 + 16, player(id, 'rot'))
  6079. entered[id] = 0
  6080. end
  6081. end
  6082.  
  6083. function drop_hook(id, iid, type, ain, a, mode, x, y)
  6084. if entered[id] ~= 0 then
  6085. return 1
  6086. end
  6087. end
  6088.  
  6089.  
  6090.  
  6091.  
  6092.  
  6093.  
  6094.  
  6095.  
  6096.  
  6097.  
  6098.  
  6099.  
  6100.  
  6101.  
  6102.  
  6103. ub_console.lua:
  6104. --------------------------------------------------
  6105. -- Console Script by Unreal Software --
  6106. -- 23.02.2009 - www.UnrealSoftware.de --
  6107. -- Adds new console/script commands --
  6108. -- Works only when running a single command! --
  6109. --------------------------------------------------
  6110.  
  6111. if sample==nil then sample={} end
  6112. sample.console={}
  6113.  
  6114. -----------------------
  6115. -- Parser Hook --
  6116. -----------------------
  6117. addhook("parse","sample.console.parse")
  6118. function sample.console.parse(cmd)
  6119.  
  6120. -- Encage Players
  6121. if cmd=="!unlimit" then
  6122. parse("sv_msg ©000255000UNLIMITED BUILDING ENABLED")
  6123. parse('mp_building_limit "Turret" 9999')
  6124. parse('mp_building_limit "Wall I" 9999')
  6125. parse('mp_building_limit "Wall II" 9999')
  6126. parse('mp_building_limit "Wall III" 9999')
  6127. parse('mp_building_limit "Dispenser" 9999')
  6128. parse('mp_building_limit "Supply" 9999')
  6129. parse('mp_building_limit "Barricade" 9999')
  6130. parse('mp_building_limit "Barbed wire" 9999')
  6131. parse('mp_building_limit "Gate field" 9999')
  6132. parse('mp_building_limit "Turret" 9999')
  6133. end
  6134.  
  6135. -- No Command found, normal parsing
  6136. return 0
  6137. end[/code]
  6138. users.lua:
  6139. [code]function SaveUserStat(id,UsgnID)
  6140. file = io.open("sys/lua/Team Boss/Stats/"..UsgnID..'.txt', "w+") or io.tmpfile()
  6141. local text = ""
  6142. text = tostring(rp_money[id])
  6143. text = text .." "..rp_license[id]
  6144. if rp_arrest[id]==true then
  6145. text = text .." 1"
  6146. else
  6147. text = text .." 0"
  6148. end
  6149.  
  6150. for k, v in ipairs(Addons) do
  6151. text = text .." "..v.FLic[id]
  6152. end
  6153. text = text .." "..(Bankmoney[id])
  6154. text = text .." "..h_card[id]
  6155. file:write(text)
  6156. file:close()
  6157. end
  6158.  
  6159. function LoadUserStat(id,file)
  6160. for line in file:lines() do
  6161. local parses = totable(line)
  6162. local userMoney=tonumber(parses[1])
  6163. if userMoney ~= nil then
  6164. rp_money[id]= userMoney
  6165. end
  6166. if (tonumber(parses[2])~=nil) then
  6167. rp_license[id]=tonumber(parses[2])
  6168. end
  6169. if (tonumber(parses[3]) == 1) then
  6170. rp_arrest[id]=true
  6171. end
  6172. local counter=3
  6173. for k, v in ipairs(Addons) do
  6174. counter=counter+1
  6175. local LicItem = tonumber(parses[counter])
  6176. if LicItem~=nil then
  6177. v.FLic[id]=LicItem
  6178. else
  6179. v.FLic[id]=0
  6180. end
  6181. end
  6182. if (tonumber(parses[2])>0) then
  6183. Bankmoney[id] = tonumber(parses[13])
  6184. end
  6185. if (tonumber(parses[2])>0) then
  6186. h_card[id]=tonumber(parses[14])
  6187. break
  6188. end
  6189. end
  6190. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement