Advertisement
Guest User

L_Menu

a guest
Nov 6th, 2017
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 16.99 KB | None | 0 0
  1. //Made by Lokii.
  2.  
  3. #include <YSI\y_hooks> //credits to y_less
  4.  
  5. /*
  6. native HidePlayerMenu(playerid);
  7. native ShowPlayerMenu(playerid, header[], item1[], item2[], item3[], item4[], item5[], item6[], item7[], item8[], item9[],item10[], item11[], item12[], item13[], item14[], item15[], info[], main_box_color, header_box_color, info_box_color);
  8. native IsPlayerMenuActive(playerid);
  9. */
  10. new PlayerText:E_P_MENU[MAX_PLAYERS][20];
  11.  
  12. hook OnPlayerDisconnect(playerid, reason)
  13. {
  14. if(IsPlayerNPC(playerid)) return 1;
  15. HidePlayerMenu(playerid);
  16. return 1;
  17. }
  18.  
  19. stock HidePlayerMenu(playerid)
  20. {
  21. if(IsPlayerNPC(playerid)) return 0;
  22. if(GetPVarInt(playerid, "L_MENU_ON") == 1)
  23. {
  24. for(new i = 0; i < 20; i++)
  25. {
  26. PlayerTextDrawHide(playerid, E_P_MENU[playerid][i]);
  27. PlayerTextDrawDestroy(playerid, E_P_MENU[playerid][i]);
  28. }
  29. SetPVarInt(playerid, "L_MENU_ON", 0);
  30. }
  31. return 1;
  32. }
  33.  
  34. stock IsPlayerMenuActive(playerid)
  35. {
  36. if(GetPVarInt(playerid, "L_MENU_ON") == 0) return 0;
  37. return 1;
  38. }
  39.  
  40. stock ShowPlayerMenu(playerid, header[], item1[], item2[], item3[], item4[], item5[], item6[], item7[], item8[], item9[],
  41. item10[], item11[], item12[], item13[], item14[], item15[], info[], main_box_color, header_box_color, info_box_color)
  42. {
  43. if(IsPlayerNPC(playerid)) return 0;
  44. if(GetPVarInt(playerid, "L_MENU_ON") == 0)
  45. {
  46. for(new i = 0; i < 20; i++)
  47. {
  48. E_P_MENU[playerid][i] = PlayerText:INVALID_TEXT_DRAW;
  49. }
  50. E_P_MENU[playerid][0] = CreatePlayerTextDraw(playerid, 9.666687, 113.674041, "box");
  51. PlayerTextDrawLetterSize(playerid, E_P_MENU[playerid][0], 0.000000, 25.233335);
  52. PlayerTextDrawTextSize(playerid, E_P_MENU[playerid][0], 263.000000, 0.000000);
  53. PlayerTextDrawAlignment(playerid, E_P_MENU[playerid][0], 1);
  54. PlayerTextDrawColor(playerid, E_P_MENU[playerid][0], -1);
  55. PlayerTextDrawUseBox(playerid, E_P_MENU[playerid][0], 1);
  56. PlayerTextDrawBoxColor(playerid, E_P_MENU[playerid][0], main_box_color);
  57. PlayerTextDrawSetShadow(playerid, E_P_MENU[playerid][0], 0);
  58. PlayerTextDrawSetOutline(playerid, E_P_MENU[playerid][0], 0);
  59. PlayerTextDrawBackgroundColor(playerid, E_P_MENU[playerid][0], 255);
  60. PlayerTextDrawFont(playerid, E_P_MENU[playerid][0], 1);
  61. PlayerTextDrawSetProportional(playerid, E_P_MENU[playerid][0], 1);
  62. PlayerTextDrawSetShadow(playerid, E_P_MENU[playerid][0], 0);
  63. E_P_MENU[playerid][1] = CreatePlayerTextDraw(playerid, 10.000020, 138.118667, "box");
  64. PlayerTextDrawLetterSize(playerid, E_P_MENU[playerid][1], 0.000000, 0.366666);
  65. PlayerTextDrawTextSize(playerid, E_P_MENU[playerid][1], 262.880706, 0.000000);
  66. PlayerTextDrawAlignment(playerid, E_P_MENU[playerid][1], 1);
  67. PlayerTextDrawColor(playerid, E_P_MENU[playerid][1], -1);
  68. PlayerTextDrawUseBox(playerid, E_P_MENU[playerid][1], 1);
  69. PlayerTextDrawBoxColor(playerid, E_P_MENU[playerid][1], header_box_color);
  70. PlayerTextDrawSetShadow(playerid, E_P_MENU[playerid][1], 0);
  71. PlayerTextDrawSetOutline(playerid, E_P_MENU[playerid][1], 0);
  72. PlayerTextDrawBackgroundColor(playerid, E_P_MENU[playerid][1], 255);
  73. PlayerTextDrawFont(playerid, E_P_MENU[playerid][1], 1);
  74. PlayerTextDrawSetProportional(playerid, E_P_MENU[playerid][1], 1);
  75. PlayerTextDrawSetShadow(playerid, E_P_MENU[playerid][1], 0);
  76. E_P_MENU[playerid][2] = CreatePlayerTextDraw(playerid, 9.666693, 112.014816, header);
  77. PlayerTextDrawLetterSize(playerid, E_P_MENU[playerid][2], 0.444666, 2.570666);
  78. PlayerTextDrawAlignment(playerid, E_P_MENU[playerid][2], 1);
  79. PlayerTextDrawColor(playerid, E_P_MENU[playerid][2], -1);
  80. PlayerTextDrawSetShadow(playerid, E_P_MENU[playerid][2], 0);
  81. PlayerTextDrawSetOutline(playerid, E_P_MENU[playerid][2], 0);
  82. PlayerTextDrawBackgroundColor(playerid, E_P_MENU[playerid][2], 255);
  83. PlayerTextDrawFont(playerid, E_P_MENU[playerid][2], 1);
  84. PlayerTextDrawSetProportional(playerid, E_P_MENU[playerid][2], 1);
  85. PlayerTextDrawSetShadow(playerid, E_P_MENU[playerid][2], 0);
  86. E_P_MENU[playerid][3] = CreatePlayerTextDraw(playerid, 10.000020, 326.520568, "box");
  87. PlayerTextDrawLetterSize(playerid, E_P_MENU[playerid][3], 0.000000, 0.366666);
  88. PlayerTextDrawTextSize(playerid, E_P_MENU[playerid][3], 262.880706, 0.000000);
  89. PlayerTextDrawAlignment(playerid, E_P_MENU[playerid][3], 1);
  90. PlayerTextDrawColor(playerid, E_P_MENU[playerid][3], -1);
  91. PlayerTextDrawUseBox(playerid, E_P_MENU[playerid][3], 1);
  92. PlayerTextDrawBoxColor(playerid, E_P_MENU[playerid][3], info_box_color);
  93. PlayerTextDrawSetShadow(playerid, E_P_MENU[playerid][3], 0);
  94. PlayerTextDrawSetOutline(playerid, E_P_MENU[playerid][3], 0);
  95. PlayerTextDrawBackgroundColor(playerid, E_P_MENU[playerid][3], 255);
  96. PlayerTextDrawFont(playerid, E_P_MENU[playerid][3], 1);
  97. PlayerTextDrawSetProportional(playerid, E_P_MENU[playerid][3], 1);
  98. PlayerTextDrawSetShadow(playerid, E_P_MENU[playerid][3], 0);
  99. E_P_MENU[playerid][4] = CreatePlayerTextDraw(playerid, 9.666692, 331.866821, info);
  100. PlayerTextDrawLetterSize(playerid, E_P_MENU[playerid][4], 0.293666, 0.915554);
  101. PlayerTextDrawAlignment(playerid, E_P_MENU[playerid][4], 1);
  102. PlayerTextDrawColor(playerid, E_P_MENU[playerid][4], -1);
  103. PlayerTextDrawSetShadow(playerid, E_P_MENU[playerid][4], 0);
  104. PlayerTextDrawSetOutline(playerid, E_P_MENU[playerid][4], 0);
  105. PlayerTextDrawBackgroundColor(playerid, E_P_MENU[playerid][4], 255);
  106. PlayerTextDrawFont(playerid, E_P_MENU[playerid][4], 1);
  107. PlayerTextDrawSetProportional(playerid, E_P_MENU[playerid][4], 1);
  108. PlayerTextDrawSetShadow(playerid, E_P_MENU[playerid][4], 0);
  109. E_P_MENU[playerid][5] = CreatePlayerTextDraw(playerid, 9.000021, 145.200088, item1);
  110. PlayerTextDrawLetterSize(playerid, E_P_MENU[playerid][5], 0.274333, 1.039998);
  111. PlayerTextDrawAlignment(playerid, E_P_MENU[playerid][5], 1);
  112. PlayerTextDrawColor(playerid, E_P_MENU[playerid][5], -1);
  113. PlayerTextDrawSetShadow(playerid, E_P_MENU[playerid][5], 0);
  114. PlayerTextDrawSetOutline(playerid, E_P_MENU[playerid][5], 0);
  115. PlayerTextDrawBackgroundColor(playerid, E_P_MENU[playerid][5], 255);
  116. PlayerTextDrawFont(playerid, E_P_MENU[playerid][5], 1);
  117. PlayerTextDrawSetProportional(playerid, E_P_MENU[playerid][5], 1);
  118. PlayerTextDrawSetShadow(playerid, E_P_MENU[playerid][5], 0);
  119. E_P_MENU[playerid][6] = CreatePlayerTextDraw(playerid, 9.000021, 155.400192, item2);
  120. PlayerTextDrawLetterSize(playerid, E_P_MENU[playerid][6], 0.274333, 1.039998);
  121. PlayerTextDrawAlignment(playerid, E_P_MENU[playerid][6], 1);
  122. PlayerTextDrawColor(playerid, E_P_MENU[playerid][6], -1);
  123. PlayerTextDrawSetShadow(playerid, E_P_MENU[playerid][6], 0);
  124. PlayerTextDrawSetOutline(playerid, E_P_MENU[playerid][6], 0);
  125. PlayerTextDrawBackgroundColor(playerid, E_P_MENU[playerid][6], 255);
  126. PlayerTextDrawFont(playerid, E_P_MENU[playerid][6], 1);
  127. PlayerTextDrawSetProportional(playerid, E_P_MENU[playerid][6], 1);
  128. PlayerTextDrawSetShadow(playerid, E_P_MENU[playerid][6], 0);
  129. E_P_MENU[playerid][7] = CreatePlayerTextDraw(playerid, 9.000021, 165.600296, item3);
  130. PlayerTextDrawLetterSize(playerid, E_P_MENU[playerid][7], 0.274333, 1.039998);
  131. PlayerTextDrawAlignment(playerid, E_P_MENU[playerid][7], 1);
  132. PlayerTextDrawColor(playerid, E_P_MENU[playerid][7], -1);
  133. PlayerTextDrawSetShadow(playerid, E_P_MENU[playerid][7], 0);
  134. PlayerTextDrawSetOutline(playerid, E_P_MENU[playerid][7], 0);
  135. PlayerTextDrawBackgroundColor(playerid, E_P_MENU[playerid][7], 255);
  136. PlayerTextDrawFont(playerid, E_P_MENU[playerid][7], 1);
  137. PlayerTextDrawSetProportional(playerid, E_P_MENU[playerid][7], 1);
  138. PlayerTextDrawSetShadow(playerid, E_P_MENU[playerid][7], 0);
  139. E_P_MENU[playerid][8] = CreatePlayerTextDraw(playerid, 9.000021, 175.800399, item4);
  140. PlayerTextDrawLetterSize(playerid, E_P_MENU[playerid][8], 0.274333, 1.039998);
  141. PlayerTextDrawAlignment(playerid, E_P_MENU[playerid][8], 1);
  142. PlayerTextDrawColor(playerid, E_P_MENU[playerid][8], -1);
  143. PlayerTextDrawSetShadow(playerid, E_P_MENU[playerid][8], 0);
  144. PlayerTextDrawSetOutline(playerid, E_P_MENU[playerid][8], 0);
  145. PlayerTextDrawBackgroundColor(playerid, E_P_MENU[playerid][8], 255);
  146. PlayerTextDrawFont(playerid, E_P_MENU[playerid][8], 1);
  147. PlayerTextDrawSetProportional(playerid, E_P_MENU[playerid][8], 1);
  148. PlayerTextDrawSetShadow(playerid, E_P_MENU[playerid][8], 0);
  149. E_P_MENU[playerid][9] = CreatePlayerTextDraw(playerid, 9.000021, 186.600509, item5);
  150. PlayerTextDrawLetterSize(playerid, E_P_MENU[playerid][9], 0.274333, 1.039998);
  151. PlayerTextDrawAlignment(playerid, E_P_MENU[playerid][9], 1);
  152. PlayerTextDrawColor(playerid, E_P_MENU[playerid][9], -1);
  153. PlayerTextDrawSetShadow(playerid, E_P_MENU[playerid][9], 0);
  154. PlayerTextDrawSetOutline(playerid, E_P_MENU[playerid][9], 0);
  155. PlayerTextDrawBackgroundColor(playerid, E_P_MENU[playerid][9], 255);
  156. PlayerTextDrawFont(playerid, E_P_MENU[playerid][9], 1);
  157. PlayerTextDrawSetProportional(playerid, E_P_MENU[playerid][9], 1);
  158. PlayerTextDrawSetShadow(playerid, E_P_MENU[playerid][9], 0);
  159. E_P_MENU[playerid][10] = CreatePlayerTextDraw(playerid, 9.000021, 198.600631, item6);
  160. PlayerTextDrawLetterSize(playerid, E_P_MENU[playerid][10], 0.274333, 1.039998);
  161. PlayerTextDrawAlignment(playerid, E_P_MENU[playerid][10], 1);
  162. PlayerTextDrawColor(playerid, E_P_MENU[playerid][10], -1);
  163. PlayerTextDrawSetShadow(playerid, E_P_MENU[playerid][10], 0);
  164. PlayerTextDrawSetOutline(playerid, E_P_MENU[playerid][10], 0);
  165. PlayerTextDrawBackgroundColor(playerid, E_P_MENU[playerid][10], 255);
  166. PlayerTextDrawFont(playerid, E_P_MENU[playerid][10], 1);
  167. PlayerTextDrawSetProportional(playerid, E_P_MENU[playerid][10], 1);
  168. PlayerTextDrawSetShadow(playerid, E_P_MENU[playerid][10], 0);
  169. E_P_MENU[playerid][11] = CreatePlayerTextDraw(playerid, 9.000021, 211.200759, item7);
  170. PlayerTextDrawLetterSize(playerid, E_P_MENU[playerid][11], 0.274333, 1.039998);
  171. PlayerTextDrawAlignment(playerid, E_P_MENU[playerid][11], 1);
  172. PlayerTextDrawColor(playerid, E_P_MENU[playerid][11], -1);
  173. PlayerTextDrawSetShadow(playerid, E_P_MENU[playerid][11], 0);
  174. PlayerTextDrawSetOutline(playerid, E_P_MENU[playerid][11], 0);
  175. PlayerTextDrawBackgroundColor(playerid, E_P_MENU[playerid][11], 255);
  176. PlayerTextDrawFont(playerid, E_P_MENU[playerid][11], 1);
  177. PlayerTextDrawSetProportional(playerid, E_P_MENU[playerid][11], 1);
  178. PlayerTextDrawSetShadow(playerid, E_P_MENU[playerid][11], 0);
  179. E_P_MENU[playerid][12] = CreatePlayerTextDraw(playerid, 9.000021, 224.400894, item8);
  180. PlayerTextDrawLetterSize(playerid, E_P_MENU[playerid][12], 0.274333, 1.039998);
  181. PlayerTextDrawAlignment(playerid, E_P_MENU[playerid][12], 1);
  182. PlayerTextDrawColor(playerid, E_P_MENU[playerid][12], -1);
  183. PlayerTextDrawSetShadow(playerid, E_P_MENU[playerid][12], 0);
  184. PlayerTextDrawSetOutline(playerid, E_P_MENU[playerid][12], 0);
  185. PlayerTextDrawBackgroundColor(playerid, E_P_MENU[playerid][12], 255);
  186. PlayerTextDrawFont(playerid, E_P_MENU[playerid][12], 1);
  187. PlayerTextDrawSetProportional(playerid, E_P_MENU[playerid][12], 1);
  188. PlayerTextDrawSetShadow(playerid, E_P_MENU[playerid][12], 0);
  189. E_P_MENU[playerid][13] = CreatePlayerTextDraw(playerid, 9.000021, 236.401016, item9);
  190. PlayerTextDrawLetterSize(playerid, E_P_MENU[playerid][13], 0.274333, 1.039998);
  191. PlayerTextDrawAlignment(playerid, E_P_MENU[playerid][13], 1);
  192. PlayerTextDrawColor(playerid, E_P_MENU[playerid][13], -1);
  193. PlayerTextDrawSetShadow(playerid, E_P_MENU[playerid][13], 0);
  194. PlayerTextDrawSetOutline(playerid, E_P_MENU[playerid][13], 0);
  195. PlayerTextDrawBackgroundColor(playerid, E_P_MENU[playerid][13], 255);
  196. PlayerTextDrawFont(playerid, E_P_MENU[playerid][13], 1);
  197. PlayerTextDrawSetProportional(playerid, E_P_MENU[playerid][13], 1);
  198. PlayerTextDrawSetShadow(playerid, E_P_MENU[playerid][13], 0);
  199. E_P_MENU[playerid][14] = CreatePlayerTextDraw(playerid, 9.000021, 248.401138, item10);
  200. PlayerTextDrawLetterSize(playerid, E_P_MENU[playerid][14], 0.274333, 1.039998);
  201. PlayerTextDrawAlignment(playerid, E_P_MENU[playerid][14], 1);
  202. PlayerTextDrawColor(playerid, E_P_MENU[playerid][14], -1);
  203. PlayerTextDrawSetShadow(playerid, E_P_MENU[playerid][14], 0);
  204. PlayerTextDrawSetOutline(playerid, E_P_MENU[playerid][14], 0);
  205. PlayerTextDrawBackgroundColor(playerid, E_P_MENU[playerid][14], 255);
  206. PlayerTextDrawFont(playerid, E_P_MENU[playerid][14], 1);
  207. PlayerTextDrawSetProportional(playerid, E_P_MENU[playerid][14], 1);
  208. PlayerTextDrawSetShadow(playerid, E_P_MENU[playerid][14], 0);
  209. E_P_MENU[playerid][15] = CreatePlayerTextDraw(playerid, 9.000021, 261.001251, item11);
  210. PlayerTextDrawLetterSize(playerid, E_P_MENU[playerid][15], 0.274333, 1.039998);
  211. PlayerTextDrawAlignment(playerid, E_P_MENU[playerid][15], 1);
  212. PlayerTextDrawColor(playerid, E_P_MENU[playerid][15], -1);
  213. PlayerTextDrawSetShadow(playerid, E_P_MENU[playerid][15], 0);
  214. PlayerTextDrawSetOutline(playerid, E_P_MENU[playerid][15], 0);
  215. PlayerTextDrawBackgroundColor(playerid, E_P_MENU[playerid][15], 255);
  216. PlayerTextDrawFont(playerid, E_P_MENU[playerid][15], 1);
  217. PlayerTextDrawSetProportional(playerid, E_P_MENU[playerid][15], 1);
  218. PlayerTextDrawSetShadow(playerid, E_P_MENU[playerid][15], 0);
  219. E_P_MENU[playerid][16] = CreatePlayerTextDraw(playerid, 9.000021, 274.201385, item12);
  220. PlayerTextDrawLetterSize(playerid, E_P_MENU[playerid][16], 0.274333, 1.039998);
  221. PlayerTextDrawAlignment(playerid, E_P_MENU[playerid][16], 1);
  222. PlayerTextDrawColor(playerid, E_P_MENU[playerid][16], -1);
  223. PlayerTextDrawSetShadow(playerid, E_P_MENU[playerid][16], 0);
  224. PlayerTextDrawSetOutline(playerid, E_P_MENU[playerid][16], 0);
  225. PlayerTextDrawBackgroundColor(playerid, E_P_MENU[playerid][16], 255);
  226. PlayerTextDrawFont(playerid, E_P_MENU[playerid][16], 1);
  227. PlayerTextDrawSetProportional(playerid, E_P_MENU[playerid][16], 1);
  228. PlayerTextDrawSetShadow(playerid, E_P_MENU[playerid][16], 0);
  229. E_P_MENU[playerid][17] = CreatePlayerTextDraw(playerid, 9.000021, 287.401519, item13);
  230. PlayerTextDrawLetterSize(playerid, E_P_MENU[playerid][17], 0.274333, 1.039998);
  231. PlayerTextDrawAlignment(playerid, E_P_MENU[playerid][17], 1);
  232. PlayerTextDrawColor(playerid, E_P_MENU[playerid][17], -1);
  233. PlayerTextDrawSetShadow(playerid, E_P_MENU[playerid][17], 0);
  234. PlayerTextDrawSetOutline(playerid, E_P_MENU[playerid][17], 0);
  235. PlayerTextDrawBackgroundColor(playerid, E_P_MENU[playerid][17], 255);
  236. PlayerTextDrawFont(playerid, E_P_MENU[playerid][17], 1);
  237. PlayerTextDrawSetProportional(playerid, E_P_MENU[playerid][17], 1);
  238. PlayerTextDrawSetShadow(playerid, E_P_MENU[playerid][17], 0);
  239. E_P_MENU[playerid][18] = CreatePlayerTextDraw(playerid, 9.000021, 300.601654, item14);
  240. PlayerTextDrawLetterSize(playerid, E_P_MENU[playerid][18], 0.274333, 1.039998);
  241. PlayerTextDrawAlignment(playerid, E_P_MENU[playerid][18], 1);
  242. PlayerTextDrawColor(playerid, E_P_MENU[playerid][18], -1);
  243. PlayerTextDrawSetShadow(playerid, E_P_MENU[playerid][18], 0);
  244. PlayerTextDrawSetOutline(playerid, E_P_MENU[playerid][18], 0);
  245. PlayerTextDrawBackgroundColor(playerid, E_P_MENU[playerid][18], 255);
  246. PlayerTextDrawFont(playerid, E_P_MENU[playerid][18], 1);
  247. PlayerTextDrawSetProportional(playerid, E_P_MENU[playerid][18], 1);
  248. PlayerTextDrawSetShadow(playerid, E_P_MENU[playerid][18], 0);
  249. E_P_MENU[playerid][19] = CreatePlayerTextDraw(playerid, 9.000021, 313.801788, item15);
  250. PlayerTextDrawLetterSize(playerid, E_P_MENU[playerid][19], 0.274333, 1.039998);
  251. PlayerTextDrawAlignment(playerid, E_P_MENU[playerid][19], 1);
  252. PlayerTextDrawColor(playerid, E_P_MENU[playerid][19], -1);
  253. PlayerTextDrawSetShadow(playerid, E_P_MENU[playerid][19], 0);
  254. PlayerTextDrawSetOutline(playerid, E_P_MENU[playerid][19], 0);
  255. PlayerTextDrawBackgroundColor(playerid, E_P_MENU[playerid][19], 255);
  256. PlayerTextDrawFont(playerid, E_P_MENU[playerid][19], 1);
  257. PlayerTextDrawSetProportional(playerid, E_P_MENU[playerid][19], 1);
  258. PlayerTextDrawSetShadow(playerid, E_P_MENU[playerid][19], 0);
  259. for(new i = 0; i < 20; i++)
  260. {
  261. PlayerTextDrawShow(playerid, E_P_MENU[playerid][i]);
  262. }
  263. SetPVarInt(playerid, "L_MENU_ON", 1);
  264. }
  265. return 1;
  266. }
  267.  
  268. forward OnPlayerMenuResponse(playerid, choice);
  269. forward OnPlayerMenuClose(playerid);
  270.  
  271. hook OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  272. {
  273. if(newkeys & KEY_FIRE)
  274. {
  275. if(GetPVarInt(playerid, "L_MENU_ON") == 1)
  276. {
  277. HidePlayerMenu(playerid);
  278. CallLocalFunction("OnPlayerMenuClose", "i", playerid);
  279. }
  280. }
  281. return 1;
  282. }
  283.  
  284. IsNum(const string[])
  285. {
  286. for(new b = 0; b < strlen(string); b++)
  287. {
  288. if(string[b] < '0' || string[b] > '9') return 0;
  289. }
  290. return 1;
  291. }
  292.  
  293. hook OnPlayerText(playerid, text[])
  294. {
  295. if(GetPVarInt(playerid, "L_MENU_ON") == 1)
  296. {
  297. if(IsNum(text))
  298. {
  299. CallLocalFunction("OnPlayerMenuResponse", "ii", playerid, strval(text));
  300. }
  301. return 0;
  302. }
  303. return 1;
  304. }
  305.  
  306. #if defined FILTERSCRIPT
  307.  
  308. hook OnFilterScriptInit()
  309. {
  310. for(new i = 0, j = GetPlayerPoolSize(); i <= j; i++)
  311. {
  312. if(!IsPlayerConnected(i) || IsPlayerNPC(i)) continue;
  313. HidePlayerMenu(i);
  314. }
  315. return 1;
  316. }
  317.  
  318. #else
  319.  
  320. hook OnGameModeInit()
  321. {
  322. for(new i = 0, j = GetPlayerPoolSize(); i <= j; i++)
  323. {
  324. if(!IsPlayerConnected(i) || IsPlayerNPC(i)) continue;
  325. HidePlayerMenu(i);
  326. }
  327. return 1;
  328. }
  329.  
  330. #endif
  331.  
  332. //EOF.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement