HLMOD.HU Forrás Megtekintés - www.hlmod.hu
  1. #include <amxmodx>
  2. #include <amxmisc>
  3. #include <fakemeta>
  4. #include <fakemeta_util>
  5.  
  6. // #define ZP_SUPPORT
  7.  
  8. #define PREFIX "CSO COSTUMES"
  9. #define DICTIONARY "cso_like_costumes.txt"
  10.  
  11. #define MAX_MODELS 4
  12.  
  13. #if defined ZP_SUPPORT
  14. #include <hamsandwich>
  15. #include <zombieplague>
  16. #endif
  17.  
  18. new menu[33]
  19. new g_CostumeModelBack[33]
  20. new g_CostumeModelBack2[33]
  21. new g_CostumeModelHead[33]
  22. new g_CostumeModelPelvis[33]
  23. new costume_back[33]
  24. new costume_head[33]
  25. new costume_pelvis[33]
  26. new save_costume_back[33]
  27. new save_costume_head[33]
  28. new save_costume_pelvis[33]
  29.  
  30. new bool:g_HadCostumeModel[33]
  31.  
  32. new const CostumeNamesBack[][] =
  33. {
  34. "Acorn (Back)",
  35. "Angel Wings",
  36. "Cat Tuna",
  37. "Christmas Socks",
  38. "Clock",
  39. "Devil Wings",
  40. "Golden Shield",
  41. "Kid Ghost",
  42. "Panda Doll",
  43. "Pig Fork",
  44. "Penguin Doll"
  45. }
  46.  
  47. new const CostumeNamesHead[][] =
  48. {
  49. "Angel Halo",
  50. "Bazzi Head",
  51. "Cat Ears",
  52. "Dao Head",
  53. "Devil Horns",
  54. "Golden Mask",
  55. "Panda Ear",
  56. "Pig Ears",
  57. "Polar Bear Head",
  58. "Pumpkin Head",
  59. "Snowman Head",
  60. "Squirrel Ears"
  61. }
  62.  
  63. new const CostumeNamesPelvis[][] =
  64. {
  65. "Cat Tail",
  66. "Devil Tail",
  67. "Panda Tail",
  68. "Pig Tail",
  69. "Squirrel Tail"
  70. }
  71.  
  72. new const CostumeModels[MAX_MODELS][] =
  73. {
  74. "models/cso_like_costumes/cso_like_costumes_back.mdl",
  75. "models/cso_like_costumes/cso_like_costumes_face.mdl",
  76. "models/cso_like_costumes/cso_like_costumes_head.mdl",
  77. "models/cso_like_costumes/cso_like_costumes_pelvis.mdl"
  78. }
  79.  
  80. public plugin_init()
  81. {
  82. register_plugin("[CSO LIKE] Costumes", "1.0", "RaZzoR")
  83. register_clcmd("say /costumes", "costumes")
  84.  
  85. #if defined ZP_SUPPORT
  86. RegisterHam(Ham_Spawn, "player", "Spawn", 1)
  87. #endif
  88.  
  89. register_dictionary(DICTIONARY)
  90. }
  91.  
  92. public client_putinserver(id)
  93. {
  94. g_CostumeModelBack[id] = 0
  95. g_CostumeModelBack2[id] = 0
  96. g_CostumeModelHead[id] = 0
  97. g_CostumeModelPelvis[id] = 0
  98.  
  99. costume_back[id] = 0
  100. costume_head[id] = 0
  101. costume_pelvis[id] = 0
  102. save_costume_back[id] = 0
  103. save_costume_head[id] = 0
  104. save_costume_pelvis[id] = 0
  105. }
  106.  
  107. public client_disconnect(id)
  108. {
  109. g_CostumeModelBack[id] = 0
  110. g_CostumeModelBack2[id] = 0
  111. g_CostumeModelHead[id] = 0
  112. g_CostumeModelPelvis[id] = 0
  113.  
  114. costume_back[id] = 0
  115. costume_head[id] = 0
  116. costume_pelvis[id] = 0
  117. save_costume_back[id] = 0
  118. save_costume_head[id] = 0
  119. save_costume_pelvis[id] = 0
  120. }
  121.  
  122. public plugin_precache()
  123. {
  124. for(new i = 0; i < MAX_MODELS; i++)
  125. {
  126. precache_model(CostumeModels[i])
  127. }
  128. }
  129.  
  130. #if defined ZP_SUPPORT
  131. public zp_user_infected_post(id)
  132. {
  133. reset_costume(id, 1)
  134. reset_costume(id, 2)
  135. reset_costume(id, 3)
  136. reset_costume(id, 4)
  137.  
  138. g_HadCostumeModel[id] = false
  139. }
  140.  
  141. public Spawn(id)
  142. {
  143. set_task(2.0, "load", id)
  144. }
  145.  
  146. public load(id)
  147. {
  148. if(g_HadCostumeModel[id] || zp_get_user_zombie(id))
  149. return
  150.  
  151. if(save_costume_back[id] == 1)
  152. {
  153. if(costume_back[id] == 1)
  154. {
  155. reset_costume(id, 1)
  156. reset_costume(id, 4)
  157.  
  158. make_costume(id, CostumeModels[0], 1, 10)
  159.  
  160. print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_LOADED", CostumeNamesBack[0])
  161.  
  162. if(costume_back[id] == 1 && costume_head[id] == 12 && costume_pelvis[id] == 5)
  163. {
  164. reset_costume(id, 4)
  165.  
  166. make_costume(id, CostumeModels[1], 4, 3)
  167. }
  168. }
  169.  
  170. else if(costume_back[id] == 2)
  171. {
  172. reset_costume(id, 1)
  173. reset_costume(id, 4)
  174.  
  175. make_costume(id, CostumeModels[0], 1, 0)
  176.  
  177. print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_LOADED", CostumeNamesBack[1])
  178. }
  179.  
  180. else if(costume_back[id] == 3)
  181. {
  182. reset_costume(id, 1)
  183. reset_costume(id, 4)
  184.  
  185. make_costume(id, CostumeModels[0], 1, 1)
  186.  
  187. print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_LOADED", CostumeNamesBack[2])
  188.  
  189. if(costume_back[id] == 3 && costume_head[id] == 3 && costume_pelvis[id] == 1)
  190. {
  191. reset_costume(id, 4)
  192.  
  193. make_costume(id, CostumeModels[1], 4, 0)
  194. }
  195. }
  196.  
  197. else if(costume_back[id] == 4)
  198. {
  199. reset_costume(id, 1)
  200. reset_costume(id, 4)
  201.  
  202. make_costume(id, CostumeModels[0], 1, 9)
  203.  
  204. print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_LOADED", CostumeNamesBack[3])
  205. }
  206.  
  207. else if(costume_back[id] == 5)
  208. {
  209. reset_costume(id, 1)
  210. reset_costume(id, 4)
  211.  
  212. make_costume(id, CostumeModels[0], 1, 2)
  213.  
  214. print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_LOADED", CostumeNamesBack[4])
  215. }
  216.  
  217. else if(costume_back[id] == 6)
  218. {
  219. reset_costume(id, 1)
  220. reset_costume(id, 4)
  221.  
  222. make_costume(id, CostumeModels[0], 1, 3)
  223.  
  224. print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_LOADED", CostumeNamesBack[5])
  225. }
  226.  
  227. else if(costume_back[id] == 7)
  228. {
  229. reset_costume(id, 1)
  230. reset_costume(id, 4)
  231.  
  232. make_costume(id, CostumeModels[0], 1, 4)
  233.  
  234. print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_LOADED", CostumeNamesBack[6])
  235. }
  236.  
  237. else if(costume_back[id] == 8)
  238. {
  239. reset_costume(id, 1)
  240. reset_costume(id, 4)
  241.  
  242. make_costume(id, CostumeModels[0], 1, 8)
  243.  
  244. print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_LOADED", CostumeNamesBack[7])
  245. }
  246.  
  247. else if(costume_back[id] == 9)
  248. {
  249. reset_costume(id, 1)
  250. reset_costume(id, 4)
  251.  
  252. make_costume(id, CostumeModels[0], 1, 5)
  253.  
  254. print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_LOADED", CostumeNamesBack[8])
  255.  
  256. if(costume_back[id] == 9 && costume_head[id] == 7 && costume_pelvis[id] == 3)
  257. {
  258. reset_costume(id, 4)
  259.  
  260. make_costume(id, CostumeModels[1], 4, 1)
  261. }
  262. }
  263.  
  264. else if(costume_back[id] == 10)
  265. {
  266. reset_costume(id, 1)
  267. reset_costume(id, 4)
  268.  
  269. make_costume(id, CostumeModels[0], 1, 6)
  270.  
  271. print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_LOADED", CostumeNamesBack[9])
  272.  
  273. if(costume_back[id] == 10 && costume_head[id] == 8 && costume_pelvis[id] == 4)
  274. {
  275. reset_costume(id, 4)
  276.  
  277. make_costume(id, CostumeModels[1], 4, 2)
  278. }
  279. }
  280.  
  281. else if(costume_back[id] == 11)
  282. {
  283. reset_costume(id, 1)
  284. reset_costume(id, 4)
  285.  
  286. make_costume(id, CostumeModels[0], 1, 7)
  287.  
  288. print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_LOADED", CostumeNamesBack[10])
  289. }
  290. }
  291.  
  292. if(save_costume_head[id] == 1)
  293. {
  294. if(costume_head[id] == 1)
  295. {
  296. reset_costume(id, 2)
  297. reset_costume(id, 4)
  298.  
  299. make_costume(id, CostumeModels[2], 2, 0)
  300.  
  301. print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_LOADED", CostumeNamesHead[0])
  302. }
  303.  
  304. else if(costume_head[id] == 2)
  305. {
  306. reset_costume(id, 2)
  307. reset_costume(id, 4)
  308.  
  309. make_costume(id, CostumeModels[2], 2, 1)
  310.  
  311. print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_LOADED", CostumeNamesHead[1])
  312. }
  313.  
  314. else if(costume_head[id] == 3)
  315. {
  316. reset_costume(id, 2)
  317. reset_costume(id, 4)
  318.  
  319. make_costume(id, CostumeModels[2], 2, 2)
  320.  
  321. print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_LOADED", CostumeNamesHead[2])
  322.  
  323. if(costume_back[id] == 3 && costume_head[id] == 3 && costume_pelvis[id] == 1)
  324. {
  325. reset_costume(id, 4)
  326.  
  327. make_costume(id, CostumeModels[1], 4, 0)
  328. }
  329. }
  330.  
  331. else if(costume_head[id] == 4)
  332. {
  333. reset_costume(id, 2)
  334. reset_costume(id, 4)
  335.  
  336. make_costume(id, CostumeModels[2], 2, 3)
  337.  
  338. print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_LOADED", CostumeNamesHead[3])
  339. }
  340.  
  341. else if(costume_head[id] == 5)
  342. {
  343. reset_costume(id, 2)
  344. reset_costume(id, 4)
  345.  
  346. make_costume(id, CostumeModels[2], 2, 4)
  347.  
  348. print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_LOADED", CostumeNamesHead[4])
  349. }
  350.  
  351. else if(costume_head[id] == 6)
  352. {
  353. reset_costume(id, 2)
  354. reset_costume(id, 4)
  355.  
  356. make_costume(id, CostumeModels[2], 2, 5)
  357.  
  358. print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_LOADED", CostumeNamesHead[5])
  359. }
  360.  
  361. else if(costume_head[id] == 7)
  362. {
  363. reset_costume(id, 2)
  364. reset_costume(id, 4)
  365.  
  366. make_costume(id, CostumeModels[2], 2, 6)
  367.  
  368. print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_LOADED", CostumeNamesHead[6])
  369.  
  370. if(costume_back[id] == 9 && costume_head[id] == 7 && costume_pelvis[id] == 3)
  371. {
  372. reset_costume(id, 4)
  373.  
  374. make_costume(id, CostumeModels[1], 4, 1)
  375. }
  376. }
  377.  
  378. else if(costume_head[id] == 8)
  379. {
  380. reset_costume(id, 2)
  381. reset_costume(id, 4)
  382.  
  383. make_costume(id, CostumeModels[2], 2, 7)
  384.  
  385. print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_LOADED", CostumeNamesHead[7])
  386.  
  387. if(costume_back[id] == 10 && costume_head[id] == 8 && costume_pelvis[id] == 4)
  388. {
  389. reset_costume(id, 4)
  390.  
  391. make_costume(id, CostumeModels[1], 4, 2)
  392. }
  393. }
  394.  
  395. else if(costume_head[id] == 9)
  396. {
  397. reset_costume(id, 2)
  398. reset_costume(id, 4)
  399.  
  400. make_costume(id, CostumeModels[2], 2, 8)
  401.  
  402. print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_LOADED", CostumeNamesHead[8])
  403. }
  404.  
  405. else if(costume_head[id] == 10)
  406. {
  407. reset_costume(id, 2)
  408. reset_costume(id, 4)
  409.  
  410. make_costume(id, CostumeModels[2], 2, 9)
  411.  
  412. print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_LOADED", CostumeNamesHead[9])
  413. }
  414.  
  415. else if(costume_head[id] == 11)
  416. {
  417. reset_costume(id, 2)
  418. reset_costume(id, 4)
  419.  
  420. make_costume(id, CostumeModels[2], 2, 10)
  421.  
  422. print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_LOADED", CostumeNamesHead[10])
  423. }
  424.  
  425. else if(costume_head[id] == 12)
  426. {
  427. reset_costume(id, 2)
  428. reset_costume(id, 4)
  429.  
  430. make_costume(id, CostumeModels[2], 2, 11)
  431.  
  432. print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_LOADED", CostumeNamesHead[11])
  433.  
  434. if(costume_back[id] == 1 && costume_head[id] == 12 && costume_pelvis[id] == 5)
  435. {
  436. reset_costume(id, 4)
  437.  
  438. make_costume(id, CostumeModels[1], 4, 3)
  439. }
  440. }
  441. }
  442.  
  443. if(save_costume_pelvis[id] == 1)
  444. {
  445. if(costume_pelvis[id] == 1)
  446. {
  447. reset_costume(id, 3)
  448. reset_costume(id, 4)
  449.  
  450. make_costume(id, CostumeModels[3], 3, 0)
  451.  
  452. print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_LOADED", CostumeNamesPelvis[0])
  453.  
  454. if(costume_back[id] == 3 && costume_head[id] == 3 && costume_pelvis[id] == 1)
  455. {
  456. reset_costume(id, 4)
  457.  
  458. make_costume(id, CostumeModels[1], 4, 0)
  459. }
  460. }
  461.  
  462. else if(costume_pelvis[id] == 2)
  463. {
  464. reset_costume(id, 3)
  465. reset_costume(id, 4)
  466.  
  467. make_costume(id, CostumeModels[3], 3, 1)
  468.  
  469. print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_LOADED", CostumeNamesPelvis[1])
  470. }
  471.  
  472. else if(costume_pelvis[id] == 3)
  473. {
  474. reset_costume(id, 3)
  475. reset_costume(id, 4)
  476.  
  477. make_costume(id, CostumeModels[3], 3, 2)
  478.  
  479. print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_LOADED", CostumeNamesPelvis[2])
  480.  
  481. if(costume_back[id] == 9 && costume_head[id] == 7 && costume_pelvis[id] == 3)
  482. {
  483. reset_costume(id, 4)
  484.  
  485. make_costume(id, CostumeModels[1], 4, 1)
  486. }
  487. }
  488.  
  489. else if(costume_pelvis[id] == 4)
  490. {
  491. reset_costume(id, 3)
  492. reset_costume(id, 4)
  493.  
  494. make_costume(id, CostumeModels[3], 3, 3)
  495.  
  496. print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_LOADED", CostumeNamesPelvis[3])
  497.  
  498. if(costume_back[id] == 10 && costume_head[id] == 8 && costume_pelvis[id] == 4)
  499. {
  500. reset_costume(id, 4)
  501.  
  502. make_costume(id, CostumeModels[1], 4, 2)
  503. }
  504. }
  505.  
  506. else if(costume_pelvis[id] == 5)
  507. {
  508. reset_costume(id, 3)
  509. reset_costume(id, 4)
  510.  
  511. make_costume(id, CostumeModels[3], 3, 4)
  512.  
  513. print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_LOADED", CostumeNamesPelvis[4])
  514.  
  515. if(costume_back[id] == 1 && costume_head[id] == 12 && costume_pelvis[id] == 5)
  516. {
  517. reset_costume(id, 4)
  518.  
  519. make_costume(id, CostumeModels[1], 4, 3)
  520. }
  521. }
  522. }
  523.  
  524. g_HadCostumeModel[id] = true
  525. }
  526. #endif
  527.  
  528.  
  529. public costumes(id)
  530. {
  531. static Letterhead[64]
  532. static MenuName[64]
  533.  
  534. #if defined ZP_SUPPORT
  535. if(zp_get_user_zombie(id))
  536. {
  537. print_colorchat(id, "!g[%s] !n%L", PREFIX, LANG_PLAYER, "CSO_NO_ZOMBIE")
  538. return
  539. }
  540. #endif
  541.  
  542. format(Letterhead, 63, "\w%L\r", LANG_PLAYER, "CSO_CHOOSE_CATEGORY")
  543. menu[id] = menu_create(Letterhead, "costumes_handler")
  544.  
  545. format(MenuName, 63, "\w%L", LANG_PLAYER, "CSO_BACK")
  546. menu_additem(menu[id], MenuName, "1", 0)
  547.  
  548. format(MenuName, 63, "\w%L", LANG_PLAYER, "CSO_HEAD")
  549. menu_additem(menu[id], MenuName, "2", 0)
  550.  
  551. format(MenuName, 63, "\w%L^n", LANG_PLAYER, "CSO_PELVIS")
  552. menu_additem(menu[id], MenuName, "3", 0)
  553.  
  554. format(MenuName, 63, "\w%L", LANG_PLAYER, "CSO_NO_COSTUME")
  555. menu_additem(menu[id], MenuName, "4", 0)
  556.  
  557. menu_setprop(menu[id], MPROP_EXIT, MEXIT_ALL)
  558. menu_display(id, menu[id], 0)
  559. }
  560.  
  561. public back_menu(id)
  562. {
  563. static Letterhead[64]
  564. static MenuName[64]
  565.  
  566. format(Letterhead, 63, "\w%L\r", LANG_PLAYER, "CSO_CHOOSE_COSTUME")
  567. menu[id] = menu_create(Letterhead, "back_handler")
  568.  
  569. format(MenuName, 63, "\w%s", CostumeNamesBack[0])
  570. menu_additem(menu[id], MenuName, "1", 0)
  571.  
  572. format(MenuName, 63, "\w%s", CostumeNamesBack[1])
  573. menu_additem(menu[id], MenuName, "2", 0)
  574.  
  575. format(MenuName, 63, "\w%s", CostumeNamesBack[2])
  576. menu_additem(menu[id], MenuName, "3", 0)
  577.  
  578. format(MenuName, 63, "\w%s", CostumeNamesBack[3])
  579. menu_additem(menu[id], MenuName, "4", 0)
  580.  
  581. format(MenuName, 63, "\w%s", CostumeNamesBack[4])
  582. menu_additem(menu[id], MenuName, "5", 0)
  583.  
  584. format(MenuName, 63, "\w%s", CostumeNamesBack[5])
  585. menu_additem(menu[id], MenuName, "6", 0)
  586.  
  587. format(MenuName, 63, "\w%s", CostumeNamesBack[6])
  588. menu_additem(menu[id], MenuName, "7", 0)
  589.  
  590. format(MenuName, 63, "\w%s", CostumeNamesBack[7])
  591. menu_additem(menu[id], MenuName, "8", 0)
  592.  
  593. format(MenuName, 63, "\w%s", CostumeNamesBack[8])
  594. menu_additem(menu[id], MenuName, "9", 0)
  595.  
  596. format(MenuName, 63, "\w%s", CostumeNamesBack[9])
  597. menu_additem(menu[id], MenuName, "10", 0)
  598.  
  599. format(MenuName, 63, "\w%s", CostumeNamesBack[10])
  600. menu_additem(menu[id], MenuName, "11", 0)
  601.  
  602. menu_setprop(menu[id], MPROP_EXIT, MEXIT_ALL)
  603. menu_display(id, menu[id], 0)
  604. }
  605.  
  606. public head_menu(id)
  607. {
  608. static Letterhead[64]
  609. static MenuName[64]
  610.  
  611. format(Letterhead, 63, "\w%L\r", LANG_PLAYER, "CSO_CHOOSE_COSTUME")
  612. menu[id] = menu_create(Letterhead, "head_handler")
  613.  
  614. format(MenuName, 63, "\w%s", CostumeNamesHead[0])
  615. menu_additem(menu[id], MenuName, "1", 0)
  616.  
  617. format(MenuName, 63, "\w%s", CostumeNamesHead[1])
  618. menu_additem(menu[id], MenuName, "2", 0)
  619.  
  620. format(MenuName, 63, "\w%s", CostumeNamesHead[2])
  621. menu_additem(menu[id], MenuName, "3", 0)
  622.  
  623. format(MenuName, 63, "\w%s", CostumeNamesHead[3])
  624. menu_additem(menu[id], MenuName, "4", 0)
  625.  
  626. format(MenuName, 63, "\w%s", CostumeNamesHead[4])
  627. menu_additem(menu[id], MenuName, "5", 0)
  628.  
  629. format(MenuName, 63, "\w%s", CostumeNamesHead[5])
  630. menu_additem(menu[id], MenuName, "6", 0)
  631.  
  632. format(MenuName, 63, "\w%s", CostumeNamesHead[6])
  633. menu_additem(menu[id], MenuName, "7", 0)
  634.  
  635. format(MenuName, 63, "\w%s", CostumeNamesHead[7])
  636. menu_additem(menu[id], MenuName, "8", 0)
  637.  
  638. format(MenuName, 63, "\w%s", CostumeNamesHead[8])
  639. menu_additem(menu[id], MenuName, "9", 0)
  640.  
  641. format(MenuName, 63, "\w%s", CostumeNamesHead[9])
  642. menu_additem(menu[id], MenuName, "10", 0)
  643.  
  644. format(MenuName, 63, "\w%s", CostumeNamesHead[10])
  645. menu_additem(menu[id], MenuName, "11", 0)
  646.  
  647. format(MenuName, 63, "\w%s", CostumeNamesHead[11])
  648. menu_additem(menu[id], MenuName, "12", 0)
  649.  
  650. menu_setprop(menu[id], MPROP_EXIT, MEXIT_ALL)
  651. menu_display(id, menu[id], 0)
  652. }
  653.  
  654. public pelvis_menu(id)
  655. {
  656. static Letterhead[64]
  657. static MenuName[64]
  658.  
  659. format(Letterhead, 63, "\w%L\r", LANG_PLAYER, "CSO_CHOOSE_COSTUME")
  660. menu[id] = menu_create(Letterhead, "pelvis_handler")
  661.  
  662. format(MenuName, 63, "\w%s", CostumeNamesPelvis[0])
  663. menu_additem(menu[id], MenuName, "1", 0)
  664.  
  665. format(MenuName, 63, "\w%s", CostumeNamesPelvis[1])
  666. menu_additem(menu[id], MenuName, "2", 0)
  667.  
  668. format(MenuName, 63, "\w%s", CostumeNamesPelvis[2])
  669. menu_additem(menu[id], MenuName, "3", 0)
  670.  
  671. format(MenuName, 63, "\w%s", CostumeNamesPelvis[3])
  672. menu_additem(menu[id], MenuName, "4", 0)
  673.  
  674. format(MenuName, 63, "\w%s", CostumeNamesPelvis[4])
  675. menu_additem(menu[id], MenuName, "5", 0)
  676.  
  677. menu_setprop(menu[id], MPROP_EXIT, MEXIT_ALL)
  678. menu_display(id, menu[id], 0)
  679. }
  680.  
  681. public costumes_handler(id, menu, item)
  682. {
  683. if(item == MENU_EXIT)
  684. {
  685. menu_destroy(menu)
  686. return PLUGIN_HANDLED
  687. }
  688.  
  689. new data[6], iName[64]
  690. new access, callback
  691.  
  692. menu_item_getinfo(menu, item, access, data, 6, iName, 63, callback)
  693.  
  694. new key = str_to_num(data)
  695.  
  696. if(key == 1)
  697. {
  698. back_menu(id)
  699. }
  700.  
  701. if(key == 2)
  702. {
  703. head_menu(id)
  704. }
  705.  
  706. if(key == 3)
  707. {
  708. pelvis_menu(id)
  709. }
  710.  
  711. if(key == 4)
  712. {
  713. if(!g_HadCostumeModel[id])
  714. {
  715. print_colorchat(id, "!g[%s] !n%L", PREFIX, LANG_PLAYER, "CSO_NF_COSTUME")
  716. }
  717.  
  718. else
  719. {
  720. reset_costume(id, 1)
  721. reset_costume(id, 2)
  722. reset_costume(id, 3)
  723. reset_costume(id, 4)
  724.  
  725. print_colorchat(id, "!g[%s] !n%L", PREFIX, LANG_PLAYER, "CSO_REMOVED")
  726.  
  727. g_HadCostumeModel[id] = false
  728.  
  729. costume_back[id] = 0
  730. costume_head[id] = 0
  731. costume_pelvis[id] = 0
  732. save_costume_back[id] = 0
  733. save_costume_head[id] = 0
  734. save_costume_pelvis[id] = 0
  735. }
  736. }
  737.  
  738. menu_destroy(menu)
  739. return PLUGIN_HANDLED
  740. }
  741.  
  742. public back_handler(id, menu, item)
  743. {
  744. if(item == MENU_EXIT)
  745. {
  746. menu_destroy(menu)
  747. return PLUGIN_HANDLED
  748. }
  749.  
  750. new data[6], iName[64]
  751. new access, callback
  752. menu_item_getinfo(menu, item, access, data, 6, iName, 63, callback)
  753.  
  754. new key = str_to_num(data)
  755.  
  756. if(key == 1)
  757. {
  758. reset_costume(id, 1)
  759. reset_costume(id, 4)
  760.  
  761. make_costume(id, CostumeModels[0], 1, 10)
  762.  
  763. print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_CHOOSED", CostumeNamesBack[0])
  764.  
  765. g_HadCostumeModel[id] = true
  766.  
  767. costume_back[id] = 1
  768.  
  769. if(costume_back[id] == 1 && costume_head[id] == 12 && costume_pelvis[id] == 5)
  770. {
  771. reset_costume(id, 4)
  772.  
  773. make_costume(id, CostumeModels[1], 4, 3)
  774. }
  775.  
  776. save_costume_back[id] = 1
  777. }
  778.  
  779. if(key == 2)
  780. {
  781. reset_costume(id, 1)
  782. reset_costume(id, 4)
  783.  
  784. make_costume(id, CostumeModels[0], 1, 0)
  785.  
  786. print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_CHOOSED", CostumeNamesBack[1])
  787.  
  788. g_HadCostumeModel[id] = true
  789.  
  790. costume_back[id] = 2
  791.  
  792. save_costume_back[id] = 1
  793. }
  794.  
  795. if(key == 3)
  796. {
  797. reset_costume(id, 1)
  798. reset_costume(id, 4)
  799.  
  800. make_costume(id, CostumeModels[0], 1, 1)
  801.  
  802. print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_CHOOSED", CostumeNamesBack[2])
  803.  
  804. g_HadCostumeModel[id] = true
  805.  
  806. costume_back[id] = 3
  807.  
  808. if(costume_back[id] == 3 && costume_head[id] == 3 && costume_pelvis[id] == 1)
  809. {
  810. reset_costume(id, 4)
  811.  
  812. make_costume(id, CostumeModels[1], 4, 0)
  813. }
  814.  
  815. save_costume_back[id] = 1
  816. }
  817.  
  818. if(key == 4)
  819. {
  820. reset_costume(id, 1)
  821. reset_costume(id, 4)
  822.  
  823. make_costume(id, CostumeModels[0], 1, 9)
  824.  
  825. print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_CHOOSED", CostumeNamesBack[3])
  826.  
  827. g_HadCostumeModel[id] = true
  828.  
  829. costume_back[id] = 4
  830.  
  831. save_costume_back[id] = 1
  832. }
  833.  
  834. if(key == 5)
  835. {
  836. reset_costume(id, 1)
  837. reset_costume(id, 4)
  838.  
  839. make_costume(id, CostumeModels[0], 1, 2)
  840.  
  841. print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_CHOOSED", CostumeNamesBack[4])
  842.  
  843. g_HadCostumeModel[id] = true
  844.  
  845. costume_back[id] = 5
  846.  
  847. save_costume_back[id] = 1
  848. }
  849.  
  850. if(key == 6)
  851. {
  852. reset_costume(id, 1)
  853. reset_costume(id, 4)
  854.  
  855. make_costume(id, CostumeModels[0], 1, 3)
  856.  
  857. print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_CHOOSED", CostumeNamesBack[5])
  858.  
  859. costume_back[id] = 6
  860.  
  861. save_costume_back[id] = 1
  862. }
  863.  
  864. if(key == 7)
  865. {
  866. reset_costume(id, 1)
  867. reset_costume(id, 4)
  868.  
  869. make_costume(id, CostumeModels[0], 1, 4)
  870.  
  871. print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_CHOOSED", CostumeNamesBack[6])
  872.  
  873. g_HadCostumeModel[id] = true
  874.  
  875. costume_back[id] = 7
  876.  
  877. save_costume_back[id] = 1
  878. }
  879.  
  880. if(key == 8)
  881. {
  882. reset_costume(id, 1)
  883. reset_costume(id, 4)
  884.  
  885. make_costume(id, CostumeModels[0], 1, 8)
  886.  
  887. print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_CHOOSED", CostumeNamesBack[7])
  888.  
  889. g_HadCostumeModel[id] = true
  890.  
  891. costume_back[id] = 8
  892.  
  893. save_costume_back[id] = 1
  894. }
  895.  
  896. if(key == 9)
  897. {
  898. reset_costume(id, 1)
  899. reset_costume(id, 4)
  900.  
  901. make_costume(id, CostumeModels[0], 1, 5)
  902.  
  903. print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_CHOOSED", CostumeNamesBack[8])
  904.  
  905. g_HadCostumeModel[id] = true
  906.  
  907. costume_back[id] = 9
  908.  
  909. if(costume_back[id] == 9 && costume_head[id] == 7 && costume_pelvis[id] == 3)
  910. {
  911. reset_costume(id, 4)
  912.  
  913. make_costume(id, CostumeModels[1], 4, 1)
  914. }
  915.  
  916. save_costume_back[id] = 1
  917. }
  918.  
  919. if(key == 10)
  920. {
  921. reset_costume(id, 1)
  922. reset_costume(id, 4)
  923.  
  924. make_costume(id, CostumeModels[0], 1, 6)
  925.  
  926. print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_CHOOSED", CostumeNamesBack[9])
  927.  
  928. g_HadCostumeModel[id] = true
  929.  
  930. costume_back[id] = 10
  931.  
  932. if(costume_back[id] == 10 && costume_head[id] == 8 && costume_pelvis[id] == 4)
  933. {
  934. reset_costume(id, 4)
  935.  
  936. make_costume(id, CostumeModels[1], 4, 2)
  937. }
  938.  
  939. save_costume_back[id] = 1
  940. }
  941.  
  942. if(key == 11)
  943. {
  944. reset_costume(id, 1)
  945. reset_costume(id, 4)
  946.  
  947. make_costume(id, CostumeModels[0], 1, 7)
  948.  
  949. print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_CHOOSED", CostumeNamesBack[10])
  950.  
  951. g_HadCostumeModel[id] = true
  952.  
  953. costume_back[id] = 11
  954.  
  955. save_costume_back[id] = 1
  956. }
  957.  
  958. menu_destroy(menu)
  959. return PLUGIN_HANDLED
  960. }
  961.  
  962. public head_handler(id, menu, item)
  963. {
  964. if(item == MENU_EXIT)
  965. {
  966. menu_destroy(menu)
  967. return PLUGIN_HANDLED
  968. }
  969.  
  970. new data[6], iName[64]
  971. new access, callback
  972. menu_item_getinfo(menu, item, access, data, 6, iName, 63, callback)
  973.  
  974. new key = str_to_num(data)
  975.  
  976. if(key == 1)
  977. {
  978. reset_costume(id, 2)
  979. reset_costume(id, 4)
  980.  
  981. make_costume(id, CostumeModels[2], 2, 0)
  982.  
  983. print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_CHOOSED", CostumeNamesHead[0])
  984.  
  985. g_HadCostumeModel[id] = true
  986.  
  987. costume_head[id] = 1
  988.  
  989. save_costume_head[id] = 1
  990. }
  991.  
  992. if(key == 2)
  993. {
  994. reset_costume(id, 2)
  995. reset_costume(id, 4)
  996.  
  997. make_costume(id, CostumeModels[2], 2, 1)
  998.  
  999. print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_CHOOSED", CostumeNamesHead[1])
  1000.  
  1001. g_HadCostumeModel[id] = true
  1002.  
  1003. costume_head[id] = 2
  1004.  
  1005. save_costume_head[id] = 1
  1006. }
  1007.  
  1008. if(key == 3)
  1009. {
  1010. reset_costume(id, 2)
  1011. reset_costume(id, 4)
  1012.  
  1013. make_costume(id, CostumeModels[2], 2, 2)
  1014.  
  1015. print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_CHOOSED", CostumeNamesHead[2])
  1016.  
  1017. g_HadCostumeModel[id] = true
  1018.  
  1019. costume_head[id] = 3
  1020.  
  1021. if(costume_back[id] == 3 && costume_head[id] == 3 && costume_pelvis[id] == 1)
  1022. {
  1023. reset_costume(id, 4)
  1024.  
  1025. make_costume(id, CostumeModels[1], 4, 0)
  1026. }
  1027.  
  1028. save_costume_head[id] = 1
  1029. }
  1030.  
  1031. if(key == 4)
  1032. {
  1033. reset_costume(id, 2)
  1034. reset_costume(id, 4)
  1035.  
  1036. make_costume(id, CostumeModels[2], 2, 3)
  1037.  
  1038. print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_CHOOSED", CostumeNamesHead[3])
  1039.  
  1040. g_HadCostumeModel[id] = true
  1041.  
  1042. costume_head[id] = 4
  1043.  
  1044. save_costume_head[id] = 1
  1045. }
  1046.  
  1047. if(key == 5)
  1048. {
  1049. reset_costume(id, 2)
  1050. reset_costume(id, 4)
  1051.  
  1052. make_costume(id, CostumeModels[2], 2, 4)
  1053.  
  1054. print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_CHOOSED", CostumeNamesHead[4])
  1055.  
  1056. g_HadCostumeModel[id] = true
  1057.  
  1058. costume_head[id] = 5
  1059.  
  1060. save_costume_head[id] = 1
  1061. }
  1062.  
  1063. if(key == 6)
  1064. {
  1065. reset_costume(id, 2)
  1066. reset_costume(id, 4)
  1067.  
  1068. make_costume(id, CostumeModels[2], 2, 5)
  1069.  
  1070. print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_CHOOSED", CostumeNamesHead[5])
  1071.  
  1072. g_HadCostumeModel[id] = true
  1073.  
  1074. costume_head[id] = 6
  1075.  
  1076. save_costume_head[id] = 1
  1077. }
  1078.  
  1079. if(key == 7)
  1080. {
  1081. reset_costume(id, 2)
  1082. reset_costume(id, 4)
  1083.  
  1084. make_costume(id, CostumeModels[2], 2, 6)
  1085.  
  1086. print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_CHOOSED", CostumeNamesHead[6])
  1087.  
  1088. g_HadCostumeModel[id] = true
  1089.  
  1090. costume_head[id] = 7
  1091.  
  1092. if(costume_back[id] == 9 && costume_head[id] == 7 && costume_pelvis[id] == 3)
  1093. {
  1094. reset_costume(id, 4)
  1095.  
  1096. make_costume(id, CostumeModels[1], 4, 1)
  1097. }
  1098.  
  1099. save_costume_head[id] = 1
  1100. }
  1101.  
  1102. if(key == 8)
  1103. {
  1104. reset_costume(id, 2)
  1105. reset_costume(id, 4)
  1106.  
  1107. make_costume(id, CostumeModels[2], 2, 7)
  1108.  
  1109. print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_CHOOSED", CostumeNamesHead[7])
  1110.  
  1111. g_HadCostumeModel[id] = true
  1112.  
  1113. costume_head[id] = 8
  1114.  
  1115. if(costume_back[id] == 10 && costume_head[id] == 8 && costume_pelvis[id] == 4)
  1116. {
  1117. reset_costume(id, 4)
  1118.  
  1119. make_costume(id, CostumeModels[1], 4, 2)
  1120. }
  1121.  
  1122. save_costume_head[id] = 1
  1123. }
  1124.  
  1125. if(key == 9)
  1126. {
  1127. reset_costume(id, 2)
  1128. reset_costume(id, 4)
  1129.  
  1130. make_costume(id, CostumeModels[2], 2, 8)
  1131.  
  1132. print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_CHOOSED", CostumeNamesHead[8])
  1133.  
  1134. g_HadCostumeModel[id] = true
  1135.  
  1136. costume_head[id] = 9
  1137.  
  1138. save_costume_head[id] = 1
  1139. }
  1140.  
  1141. if(key == 10)
  1142. {
  1143. reset_costume(id, 2)
  1144. reset_costume(id, 4)
  1145.  
  1146. make_costume(id, CostumeModels[2], 2, 9)
  1147.  
  1148. print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_CHOOSED", CostumeNamesHead[9])
  1149.  
  1150. g_HadCostumeModel[id] = true
  1151.  
  1152. costume_head[id] = 10
  1153.  
  1154. save_costume_head[id] = 1
  1155. }
  1156.  
  1157. if(key == 11)
  1158. {
  1159. reset_costume(id, 2)
  1160. reset_costume(id, 4)
  1161.  
  1162. make_costume(id, CostumeModels[2], 2, 10)
  1163.  
  1164. print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_CHOOSED", CostumeNamesHead[10])
  1165.  
  1166. g_HadCostumeModel[id] = true
  1167.  
  1168. costume_head[id] = 11
  1169.  
  1170. save_costume_head[id] = 1
  1171. }
  1172.  
  1173. if(key == 12)
  1174. {
  1175. reset_costume(id, 2)
  1176. reset_costume(id, 4)
  1177.  
  1178. make_costume(id, CostumeModels[2], 2, 11)
  1179.  
  1180. print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_CHOOSED", CostumeNamesHead[11])
  1181.  
  1182. g_HadCostumeModel[id] = true
  1183.  
  1184. costume_head[id] = 12
  1185.  
  1186. if(costume_back[id] == 1 && costume_head[id] == 12 && costume_pelvis[id] == 5)
  1187. {
  1188. reset_costume(id, 4)
  1189.  
  1190. make_costume(id, CostumeModels[1], 4, 3)
  1191. }
  1192.  
  1193. save_costume_head[id] = 1
  1194. }
  1195.  
  1196. menu_destroy(menu)
  1197. return PLUGIN_HANDLED
  1198. }
  1199.  
  1200. public pelvis_handler(id, menu, item)
  1201. {
  1202. if(item == MENU_EXIT)
  1203. {
  1204. menu_destroy(menu)
  1205. return PLUGIN_HANDLED
  1206. }
  1207.  
  1208. new data[6], iName[64]
  1209. new access, callback
  1210. menu_item_getinfo(menu, item, access, data, 6, iName, 63, callback)
  1211.  
  1212. new key = str_to_num(data)
  1213.  
  1214. if(key == 1)
  1215. {
  1216. reset_costume(id, 3)
  1217. reset_costume(id, 4)
  1218.  
  1219. make_costume(id, CostumeModels[3], 3, 0)
  1220.  
  1221. print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_CHOOSED", CostumeNamesPelvis[0])
  1222.  
  1223. g_HadCostumeModel[id] = true
  1224.  
  1225. costume_pelvis[id] = 1
  1226.  
  1227. if(costume_back[id] == 3 && costume_head[id] == 3 && costume_pelvis[id] == 1)
  1228. {
  1229. reset_costume(id, 4)
  1230.  
  1231. make_costume(id, CostumeModels[1], 4, 0)
  1232. }
  1233.  
  1234. save_costume_pelvis[id] = 1
  1235. }
  1236.  
  1237. if(key == 2)
  1238. {
  1239. reset_costume(id, 3)
  1240. reset_costume(id, 4)
  1241.  
  1242. make_costume(id, CostumeModels[3], 3, 1)
  1243.  
  1244. print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_CHOOSED", CostumeNamesPelvis[1])
  1245.  
  1246. g_HadCostumeModel[id] = true
  1247.  
  1248. costume_pelvis[id] = 2
  1249.  
  1250. save_costume_pelvis[id] = 1
  1251. }
  1252.  
  1253. if(key == 3)
  1254. {
  1255. reset_costume(id, 3)
  1256. reset_costume(id, 4)
  1257.  
  1258. make_costume(id, CostumeModels[3], 3, 2)
  1259.  
  1260. print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_CHOOSED", CostumeNamesPelvis[2])
  1261.  
  1262. g_HadCostumeModel[id] = true
  1263.  
  1264. costume_pelvis[id] = 3
  1265.  
  1266. if(costume_back[id] == 9 && costume_head[id] == 7 && costume_pelvis[id] == 3)
  1267. {
  1268. reset_costume(id, 4)
  1269.  
  1270. make_costume(id, CostumeModels[1], 4, 1)
  1271. }
  1272.  
  1273. save_costume_pelvis[id] = 1
  1274. }
  1275.  
  1276. if(key == 4)
  1277. {
  1278. reset_costume(id, 3)
  1279. reset_costume(id, 4)
  1280.  
  1281. make_costume(id, CostumeModels[3], 3, 3)
  1282.  
  1283. print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_CHOOSED", CostumeNamesPelvis[3])
  1284.  
  1285. g_HadCostumeModel[id] = true
  1286.  
  1287. costume_pelvis[id] = 4
  1288.  
  1289. if(costume_back[id] == 10 && costume_head[id] == 8 && costume_pelvis[id] == 4)
  1290. {
  1291. reset_costume(id, 4)
  1292.  
  1293. make_costume(id, CostumeModels[1], 4, 2)
  1294. }
  1295.  
  1296. save_costume_pelvis[id] = 1
  1297. }
  1298.  
  1299. if(key == 5)
  1300. {
  1301. reset_costume(id, 3)
  1302. reset_costume(id, 4)
  1303.  
  1304. make_costume(id, CostumeModels[3], 3, 4)
  1305.  
  1306. print_colorchat(id, "!g[%s] !n%L: !g%s", PREFIX, LANG_PLAYER, "CSO_CHOOSED", CostumeNamesPelvis[4])
  1307.  
  1308. g_HadCostumeModel[id] = true
  1309.  
  1310. costume_pelvis[id] = 5
  1311.  
  1312. if(costume_back[id] == 1 && costume_head[id] == 12 && costume_pelvis[id] == 5)
  1313. {
  1314. reset_costume(id, 4)
  1315.  
  1316. make_costume(id, CostumeModels[1], 4, 3)
  1317. }
  1318.  
  1319. save_costume_pelvis[id] = 1
  1320. }
  1321.  
  1322. menu_destroy(menu)
  1323. return PLUGIN_HANDLED
  1324. }
  1325.  
  1326. public make_costume(id, model[], part, anim)
  1327. {
  1328. switch(part)
  1329. {
  1330. case 1:
  1331. {
  1332. g_CostumeModelBack[id] = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "info_target"))
  1333.  
  1334. set_pev(g_CostumeModelBack[id], pev_movetype, MOVETYPE_FOLLOW)
  1335. set_pev(g_CostumeModelBack[id], pev_aiment, id)
  1336. set_pev(g_CostumeModelBack[id], pev_rendermode, kRenderNormal)
  1337. engfunc(EngFunc_SetModel, g_CostumeModelBack[id], model)
  1338. set_pev(g_CostumeModelBack[id], pev_body, anim)
  1339. set_pev(g_CostumeModelBack[id], pev_sequence, anim)
  1340. set_pev(g_CostumeModelBack[id], pev_animtime, get_gametime())
  1341. set_pev(g_CostumeModelBack[id], pev_framerate, 1.0)
  1342. }
  1343.  
  1344. case 2:
  1345. {
  1346. g_CostumeModelHead[id] = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "info_target"))
  1347.  
  1348. set_pev(g_CostumeModelHead[id], pev_movetype, MOVETYPE_FOLLOW)
  1349. set_pev(g_CostumeModelHead[id], pev_aiment, id)
  1350. set_pev(g_CostumeModelHead[id], pev_rendermode, kRenderNormal)
  1351. engfunc(EngFunc_SetModel, g_CostumeModelHead[id], model)
  1352. set_pev(g_CostumeModelHead[id], pev_body, anim)
  1353. set_pev(g_CostumeModelHead[id], pev_sequence, anim)
  1354. set_pev(g_CostumeModelHead[id], pev_animtime, get_gametime())
  1355. set_pev(g_CostumeModelHead[id], pev_framerate, 1.0)
  1356. }
  1357.  
  1358. case 3:
  1359. {
  1360. g_CostumeModelPelvis[id] = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "info_target"))
  1361.  
  1362. set_pev(g_CostumeModelPelvis[id], pev_movetype, MOVETYPE_FOLLOW)
  1363. set_pev(g_CostumeModelPelvis[id], pev_aiment, id)
  1364. set_pev(g_CostumeModelPelvis[id], pev_rendermode, kRenderNormal)
  1365. engfunc(EngFunc_SetModel, g_CostumeModelPelvis[id], model)
  1366. set_pev(g_CostumeModelPelvis[id], pev_body, anim)
  1367. set_pev(g_CostumeModelPelvis[id], pev_sequence, anim)
  1368. set_pev(g_CostumeModelPelvis[id], pev_animtime, get_gametime())
  1369. set_pev(g_CostumeModelPelvis[id], pev_framerate, 1.0)
  1370. }
  1371.  
  1372. case 4:
  1373. {
  1374. g_CostumeModelBack2[id] = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "info_target"))
  1375.  
  1376. set_pev(g_CostumeModelBack2[id], pev_movetype, MOVETYPE_FOLLOW)
  1377. set_pev(g_CostumeModelBack2[id], pev_aiment, id)
  1378. set_pev(g_CostumeModelBack2[id], pev_rendermode, kRenderNormal)
  1379. engfunc(EngFunc_SetModel, g_CostumeModelBack2[id], model)
  1380. set_pev(g_CostumeModelBack2[id], pev_body, anim)
  1381. set_pev(g_CostumeModelBack2[id], pev_sequence, anim)
  1382. set_pev(g_CostumeModelBack2[id], pev_animtime, get_gametime())
  1383. set_pev(g_CostumeModelBack2[id], pev_framerate, 1.0)
  1384. }
  1385. }
  1386. }
  1387.  
  1388. public reset_costume(id, number)
  1389. {
  1390. switch(number)
  1391. {
  1392. case 1:
  1393. {
  1394. fm_set_entity_visibility(g_CostumeModelBack[id], 0)
  1395. g_CostumeModelBack[id] = 0
  1396. }
  1397.  
  1398. case 2:
  1399. {
  1400. fm_set_entity_visibility(g_CostumeModelHead[id], 0)
  1401. g_CostumeModelHead[id] = 0
  1402. }
  1403.  
  1404. case 3:
  1405. {
  1406. fm_set_entity_visibility(g_CostumeModelPelvis[id], 0)
  1407. g_CostumeModelPelvis[id] = 0
  1408. }
  1409.  
  1410. case 4:
  1411. {
  1412. fm_set_entity_visibility(g_CostumeModelBack2[id], 0)
  1413. g_CostumeModelBack2[id] = 0
  1414. }
  1415. }
  1416. }
  1417.  
  1418. //Stock
  1419. stock print_colorchat(id, String[], any:...)
  1420. {
  1421. new SzMsg[192]
  1422. vformat(SzMsg, charsmax(SzMsg), String, 3)
  1423.  
  1424. replace_all(SzMsg, charsmax(SzMsg), "!n", "^1")
  1425. replace_all(SzMsg, charsmax(SzMsg), "!t", "^3")
  1426. replace_all(SzMsg, charsmax(SzMsg), "!g", "^4")
  1427.  
  1428. static msgSayText = 0
  1429. static fake_user
  1430.  
  1431. if(!msgSayText)
  1432. {
  1433. msgSayText = get_user_msgid("SayText")
  1434. fake_user = get_maxplayers() + 1
  1435. }
  1436.  
  1437. message_begin(id ? MSG_ONE_UNRELIABLE : MSG_BROADCAST, msgSayText, _, id)
  1438. write_byte(id ? id : fake_user)
  1439. write_string(SzMsg)
  1440. message_end()
  1441. }