Advertisement
Guest User

dBox [0.3x]

a guest
Feb 22nd, 2013
314
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 103.48 KB | None | 0 0
  1. /*
  2.  
  3. The Dynamic Box Package.SetPlayerPosEx
  4.  
  5. All Previous Script now with editable settings!
  6.  
  7. All scripts in the package:
  8.  
  9. We got A-Spam/Forbid Word v1.1
  10. Typing-Question Test v1.1
  11. Help System (Additional features in VIP System)
  12. VIP System
  13.  
  14. All credits goes to
  15.  
  16. Zher0 (Idea of Reaction-Question Test)
  17. Y_Less (YSI Library, sscanf, whirlpool)
  18. Romel (Previous Scripts, And scripting)
  19. Zher0 (The Dick System)
  20. XTremer (Vip Script Insparation and some commands (idea not copy))
  21. Edvin (some commands (idea not copy))
  22. Incognito (Streamer)
  23. Valve (Inspration from their "The Orange Box Package")
  24.  
  25. */
  26.  
  27. #include <a_samp>
  28. #include <sscanf2>
  29. #include <dbox>
  30. #include <YSI\y_scripting>
  31. #include <streamer>
  32. #include <YSI\y_ini>
  33. #include <YSI\y_commands>
  34.  
  35. native WP_Hash(buffer[],len, const str[]);
  36.  
  37. #define COLOR_ORANGE 0xFF8000FF
  38. #define COLOR_YELLOW 0xFFFF00FF
  39. #define COLOR_LIGHTBLUE 0x33CCFFAA
  40. #define COLOR_GREY 0xAFAFAFAA
  41. #define COLOR_WHITE 0xFFFFFFFF
  42. #define COLOR_BLUE 0x0080FFC8
  43. #define COLOR_RED 0xFF0000FF
  44. #define COLOR_LIME 0x00FF00FF
  45.  
  46. #define white "{FFFFFF}"
  47. #define red "{FF002B}"
  48. #define yellow "{FAF623}"
  49. #define orange "{F2C80C}"
  50.  
  51. #define Error_Vip "Invalid: This command is authorized, Only V.I.P. can use this!"
  52. #define Error_Connected "Error: Player not connnected!"
  53. #define Error_Self "Error: You cannot use this command in yourself!"
  54. #define Error_Higher "Error: You cannot use this command in Higher VIPs!"
  55. #define Error_Helper "Invalid: This command is authorized, Only Helpers can use this!"
  56.  
  57. #define MAX_VIP_LVL 3
  58.  
  59. enum PlayerInfo
  60. {
  61. Vip,
  62. FavSkin,
  63. UseSkin,
  64. Helper,
  65. Float:vX,
  66. Float:vY,
  67. Float:vZ,
  68. Float:vA,
  69. vI,
  70. vW
  71. };
  72. new pInfo[MAX_PLAYERS][PlayerInfo];
  73.  
  74. new god[MAX_PLAYERS] = 0;
  75. new VipVeh[MAX_PLAYERS];
  76. new Text3D:VipV[MAX_PLAYERS];
  77. new Help = 0;
  78. new Player = -1;
  79. new bool:Starts = false,
  80. TypeGame = -1,
  81. targetanswer[128],
  82. targetword[128],
  83. Timer,
  84. question[128],
  85. word = 0,
  86. ForbiddenWords[100][100],
  87. rank[100],
  88. playerwarn[MAX_PLAYERS] = 0;
  89. new Float:SpecX[MAX_PLAYERS], Float:SpecY[MAX_PLAYERS], Float:SpecZ[MAX_PLAYERS], vWorld[MAX_PLAYERS], Inter[MAX_PLAYERS];
  90. new IsSpecing[MAX_PLAYERS], IsBeingSpeced[MAX_PLAYERS], spectatorid[MAX_PLAYERS];
  91.  
  92. enum settings
  93. {
  94. spam,
  95. swarn,
  96. sms,
  97. questiontime,
  98. typetime,
  99. prize,
  100. prizescore,
  101. typeq,
  102. wgasfw,
  103. forbidword,
  104. rank1[100],
  105. rank2[100],
  106. rank3[100],
  107. readcmd,
  108. symbolchat[5]
  109. };
  110. new set2[settings];
  111.  
  112. #define ConfigPath "dynamicbox/"
  113. #define SettingsSpam "dsettings.ini"
  114. #define SettingsWords "forbwords.ini"
  115. #define cset 550
  116. #define cwarn 551
  117. #define cword 552
  118. #define csms 553
  119. #define cfw 554
  120. #define dbox 555
  121. #define typeques 556
  122. #define questiontimer 557
  123. #define typingtimer 558
  124. #define Prizes 559
  125. #define PrizesScore 560
  126. #define ListWords 561
  127. #define Register 562
  128. #define Login 563
  129. #define HelpList 564
  130. #define VipList 565
  131. #define VipCmd 567
  132. #define Features 568
  133. #define PlayerCmd 569
  134. #define HelperCmd 570
  135. #define PlayerStats 571
  136. #define VipSet 572
  137. #define SymbolSet 573
  138. #define RankSet 574
  139. #define Rank2Set 575
  140. #define Rank3Set 576
  141.  
  142. #define INFINITE (Float:0x7F800000)
  143.  
  144. forward KillTest();
  145. forward loadfiles(name[], value[]);
  146. forward loadaccount_user(playerid, name[], value[]);
  147.  
  148. #if defined FILTERSCRIPT
  149. #else
  150.  
  151. public OnFilterScriptInit()
  152. {
  153. print("\n");
  154. print("The Dynamic Box Package");
  155. print("Distributed by Romel");
  156. print("Big thanks to Zher0, Y_Less, Romel, (Insparation: Valve)");
  157. print("(c), 2013");
  158. print("Loaded!");
  159. print("\n");
  160. printf("Total Commmands of dBox: %i commands", cmd());
  161. Starts = false;
  162. TypeGame = -1;
  163. LoadSettings();
  164. KillTimer(Timer);
  165. Help = 0;
  166. Player = -1;
  167.  
  168. //Vip Island
  169.  
  170. CreateDynamicObject(4847,-3933.5000000,471.8999939,9.3000002,0.0000000,0.0000000,0.0000000); //object(beach1_las0gj) (1)
  171. CreateDynamicObject(4847,-3933.1999512,571.0999756,9.3000002,0.0000000,0.0000000,180.0000000); //object(beach1_las0gj) (2)
  172. CreateDynamicObject(8263,-3818.1000977,621.0000000,3.2000000,0.0000000,0.0000000,0.0000000); //object(vgsselecfence14) (1)
  173. CreateDynamicObject(8263,-3938.0000000,621.0000000,3.2000000,0.0000000,0.0000000,0.0000000); //object(vgsselecfence14) (2)
  174. CreateDynamicObject(8263,-4050.1000977,620.5000000,3.4000001,0.0000000,0.0000000,0.0000000); //object(vgsselecfence14) (3)
  175. CreateDynamicObject(972,-4111.6000977,604.7999878,4.3000002,348.0073853,357.9553833,355.5749512); //object(tunnelentrance) (1)
  176. CreateDynamicObject(972,-4113.0000000,580.5999756,9.3999996,348.0029297,357.9510498,357.5725098); //object(tunnelentrance) (2)
  177. CreateDynamicObject(972,-4113.5000000,556.4000244,14.5000000,348.0029297,357.9510498,359.5725098); //object(tunnelentrance) (3)
  178. CreateDynamicObject(972,-4113.5000000,533.0999756,16.8999996,357.9912109,357.9892578,1.9284668); //object(tunnelentrance) (4)
  179. CreateDynamicObject(972,-4113.0000000,508.2999878,17.7000008,357.9895020,357.9840088,1.9231262); //object(tunnelentrance) (5)
  180. CreateDynamicObject(972,-4112.6000977,485.8999939,14.5000000,13.9794312,357.9237061,0.4956360); //object(tunnelentrance) (6)
  181. CreateDynamicObject(972,-4112.3999023,461.7999878,8.6000004,13.9746094,357.9235840,0.4943848); //object(tunnelentrance) (7)
  182. CreateDynamicObject(972,-4111.8999023,437.7999878,2.7000000,13.9746094,357.9235840,0.4943848); //object(tunnelentrance) (8)
  183. CreateDynamicObject(972,-4111.8999023,431.5000000,1.3000000,13.9746094,357.9235840,2.4943848); //object(tunnelentrance) (9)
  184. CreateDynamicObject(8263,-4048.1000977,421.8999939,3.0000000,0.0000000,0.0000000,0.0000000); //object(vgsselecfence14) (5)
  185. CreateDynamicObject(8263,-3928.1999512,421.7000122,3.0000000,0.0000000,0.0000000,0.0000000); //object(vgsselecfence14) (6)
  186. CreateDynamicObject(8263,-3816.5000000,421.8999939,3.0000000,0.0000000,0.0000000,0.0000000); //object(vgsselecfence14) (7)
  187. CreateDynamicObject(972,-3762.0000000,432.7999878,3.0999999,13.9746094,357.9235840,0.4943848); //object(tunnelentrance) (10)
  188. CreateDynamicObject(972,-3761.3999023,456.6000061,8.5000000,11.7261047,357.9421387,358.4111328); //object(tunnelentrance) (11)
  189. CreateDynamicObject(972,-3761.1999512,480.7000122,13.6000004,11.9750977,357.9400635,0.4174805); //object(tunnelentrance) (12)
  190. CreateDynamicObject(972,-3761.3000488,503.7999878,16.3999996,359.9826660,357.9848633,359.9892578); //object(tunnelentrance) (13)
  191. CreateDynamicObject(972,-3761.3999023,528.7000122,16.3999996,359.9780273,357.9840088,359.9890137); //object(tunnelentrance) (14)
  192. CreateDynamicObject(972,-3761.0000000,551.5999756,14.8999996,345.9985657,2.0514832,0.4960022); //object(tunnelentrance) (15)
  193. CreateDynamicObject(972,-3761.1000977,575.5000000,9.1000004,347.9965820,357.9402466,1.5692139); //object(tunnelentrance) (16)
  194. CreateDynamicObject(972,-3762.3000488,599.7000122,4.0000000,347.9919434,357.9400635,3.5660400); //object(tunnelentrance) (17)
  195. CreateDynamicObject(972,-3762.8000488,606.2000122,2.7000000,347.9864502,357.9400635,3.5650635); //object(tunnelentrance) (18)
  196. CreateDynamicObject(11490,-3945.0000000,525.0999756,18.6000004,0.0000000,0.0000000,0.0000000); //object(des_ranch) (1)
  197. CreateDynamicObject(11491,-3945.0000000,514.0000000,20.0000000,0.0000000,0.0000000,0.0000000); //object(des_ranchbits1) (1)
  198. CreateDynamicObject(12909,-3946.8000488,526.7999878,20.1000004,0.0000000,0.0000000,0.0000000); //object(sw_bridge03) (1)
  199. CreateDynamicObject(12909,-3946.8000488,522.7999878,20.1000004,0.0000000,0.0000000,0.0000000); //object(sw_bridge03) (2)
  200. CreateDynamicObject(12909,-3942.8000488,522.7999878,20.1000004,0.0000000,0.0000000,0.0000000); //object(sw_bridge03) (3)
  201. CreateDynamicObject(12909,-3942.8000488,526.7999878,20.1000004,0.0000000,0.0000000,0.0000000); //object(sw_bridge03) (4)
  202. CreateDynamicObject(1724,-3945.5000000,520.2999878,20.1000004,0.0000000,0.0000000,0.0000000); //object(mrk_seating1b) (1)
  203. CreateDynamicObject(1724,-3946.8000488,519.4000244,20.1000004,0.0000000,0.0000000,42.0000000); //object(mrk_seating1b) (2)
  204. CreateDynamicObject(1724,-3943.8999023,520.2000122,20.1000004,0.0000000,0.0000000,319.9952393); //object(mrk_seating1b) (3)
  205. CreateDynamicObject(3472,-3932.8000488,512.0000000,18.6000004,0.0000000,0.0000000,0.0000000); //object(circuslampost03) (1)
  206. CreateDynamicObject(3472,-3922.1000977,511.3999939,18.6000004,0.0000000,0.0000000,0.0000000); //object(circuslampost03) (2)
  207. CreateDynamicObject(3472,-3957.3999023,511.0000000,18.6000004,0.0000000,0.0000000,0.0000000); //object(circuslampost03) (3)
  208. CreateDynamicObject(3472,-3967.1000977,510.5000000,18.6000004,0.0000000,0.0000000,0.0000000); //object(circuslampost03) (4)
  209. CreateDynamicObject(3472,-3965.8999023,539.7999878,18.6000004,0.0000000,0.0000000,0.0000000); //object(circuslampost03) (5)
  210. CreateDynamicObject(3472,-3953.0000000,540.2999878,18.6000004,0.0000000,0.0000000,0.0000000); //object(circuslampost03) (6)
  211. CreateDynamicObject(3472,-3936.0000000,539.2000122,18.6000004,0.0000000,0.0000000,0.0000000); //object(circuslampost03) (7)
  212. CreateDynamicObject(3472,-3926.3999023,538.2999878,18.6000004,0.0000000,0.0000000,0.0000000); //object(circuslampost03) (8)
  213. CreateDynamicObject(3524,-3939.6000977,512.0000000,21.5000000,0.0000000,0.0000000,0.0000000); //object(skullpillar01_lvs) (1)
  214. CreateDynamicObject(3524,-3951.8000488,512.4000244,21.5000000,0.0000000,0.0000000,0.0000000); //object(skullpillar01_lvs) (2)
  215. CreateDynamicObject(3524,-3947.3000488,533.7999878,21.5000000,0.0000000,0.0000000,178.0000000); //object(skullpillar01_lvs) (3)
  216. CreateDynamicObject(3524,-3942.6999512,533.7999878,21.5000000,0.0000000,0.0000000,177.9949951); //object(skullpillar01_lvs) (4)
  217. CreateDynamicObject(6965,-3998.6000977,519.7999878,21.8999996,0.0000000,0.0000000,0.0000000); //object(venefountain02) (1)
  218. CreateDynamicObject(7073,-3904.6000977,518.5000000,32.7999992,38.0000000,0.0000000,0.0000000); //object(vegascowboy1) (1)
  219. CreateDynamicObject(7073,-3978.6000977,526.5000000,32.7999992,37.9962158,0.0000000,188.0000000); //object(vegascowboy1) (2)
  220. CreateDynamicObject(13562,-3945.1000977,525.7000122,30.1000004,0.0000000,0.0000000,0.0000000); //object(bigsprunkpole) (1)
  221. CreateDynamicObject(16151,-3947.6000977,511.2000122,18.6000004,0.0000000,0.0000000,90.0000000); //object(ufo_bar) (1)
  222. CreateDynamicObject(1541,-3946.3000488,512.2000122,19.7999992,0.0000000,0.0000000,0.0000000); //object(cj_beer_taps_1) (1)
  223. CreateDynamicObject(1542,-3945.3999023,512.2000122,19.7999992,0.0000000,0.0000000,0.0000000); //object(cj_beer_taps_2) (1)
  224. CreateDynamicObject(1487,-3948.6000977,510.0000000,19.3999996,0.0000000,0.0000000,0.0000000); //object(dyn_wine_1) (1)
  225. CreateDynamicObject(1337,-3947.7333984,523.0996094,27.7165451,0.0000000,0.0000000,0.0000000); //object(binnt07_la) (2)
  226. CreateDynamicObject(3483,-4091.1999512,517.7000122,25.6000004,0.0000000,0.0000000,92.0000000); //object(vegasxrexhse09) (1)
  227. CreateDynamicObject(3484,-4092.3000488,483.7000122,21.7000008,0.2412109,344.7498779,92.0657349); //object(vegasxrexhse03) (1)
  228. CreateDynamicObject(3486,-4089.6000977,560.2000122,22.0000000,0.0000000,14.5000000,88.0000000); //object(vegasxrexhse05) (1)
  229. CreateDynamicObject(3487,-4087.5000000,594.0999756,13.8000002,359.7566528,13.2501221,84.3073120); //object(vegasxrexhse06) (1)
  230. CreateDynamicObject(3488,-4088.6999512,453.2999878,14.3999996,358.5384521,346.9956970,95.6625366); //object(vegasxrexhse07) (1)
  231. CreateDynamicObject(3501,-4036.1999512,525.5999756,21.7999992,0.0000000,0.0000000,270.0000000); //object(vgsxrefpartm1) (1)
  232. CreateDynamicObject(6295,-3830.6000977,513.2999878,42.5000000,0.0000000,0.0000000,0.0000000); //object(sanpedlithus_law2) (1)
  233. CreateDynamicObject(9241,-3868.1000977,515.7000122,20.2999992,0.0000000,0.0000000,0.0000000); //object(copbits_sfn) (1)
  234. CreateDynamicObject(712,-3926.1000977,476.5000000,22.2999992,0.0000000,0.0000000,0.0000000); //object(vgs_palm03) (1)
  235. CreateDynamicObject(712,-3911.3999023,476.1000061,22.2000008,0.0000000,0.0000000,0.0000000); //object(vgs_palm03) (2)
  236. CreateDynamicObject(712,-3894.5000000,477.0000000,22.3999996,0.0000000,0.0000000,0.0000000); //object(vgs_palm03) (3)
  237. CreateDynamicObject(712,-3876.3000488,477.0000000,22.3999996,0.0000000,0.0000000,0.0000000); //object(vgs_palm03) (4)
  238. CreateDynamicObject(712,-3854.8999023,476.3999939,22.6000004,0.0000000,0.0000000,0.0000000); //object(vgs_palm03) (5)
  239. CreateDynamicObject(712,-3822.8999023,475.7999878,21.8999996,0.0000000,0.0000000,0.0000000); //object(vgs_palm03) (6)
  240. CreateDynamicObject(712,-3837.6000977,475.2000122,21.7999992,0.0000000,0.0000000,0.0000000); //object(vgs_palm03) (7)
  241. CreateDynamicObject(710,-3924.5000000,525.5000000,27.0000000,0.0000000,316.0000000,0.0000000); //object(vgs_palm01) (1)
  242. CreateDynamicObject(2627,-3912.0000000,499.7000122,18.6000004,0.0000000,0.0000000,0.0000000); //object(gym_treadmill) (1)
  243. CreateDynamicObject(2629,-3909.0000000,499.2999878,18.6000004,0.0000000,0.0000000,0.0000000); //object(gym_bench1) (1)
  244. CreateDynamicObject(2630,-3906.3000488,499.5000000,18.6000004,0.0000000,0.0000000,0.0000000); //object(gym_bike) (1)
  245. CreateDynamicObject(14791,-3906.3999023,504.7999878,20.6000004,0.0000000,0.0000000,0.0000000); //object(a_vgsgymboxa) (1)
  246. CreateDynamicObject(14791,-3906.3000488,513.2999878,20.6000004,0.0000000,0.0000000,0.0000000); //object(a_vgsgymboxa) (2)
  247. CreateDynamicObject(16006,-3791.8000488,528.0999756,18.2000008,0.0000000,0.0000000,0.0000000); //object(ros_townhall) (1)
  248. CreateDynamicObject(3615,-3903.1999512,484.6000061,16.6000004,14.0000000,0.0000000,4.0000000); //object(sanmonbhut1_law2) (1)
  249. CreateDynamicObject(3615,-3885.1999512,484.2000122,16.3999996,12.0000000,0.0000000,0.0000000); //object(sanmonbhut1_law2) (2)
  250. CreateDynamicObject(3615,-3866.3000488,483.2000122,16.1000004,12.0000000,0.0000000,0.0000000); //object(sanmonbhut1_law2) (3)
  251. CreateDynamicObject(3615,-3919.6000977,485.5000000,16.8999996,15.0000000,0.0000000,0.0000000); //object(sanmonbhut1_law2) (4)
  252. CreateDynamicObject(712,-3945.6000977,474.7000122,21.8999996,0.0000000,0.0000000,0.0000000); //object(vgs_palm03) (8)
  253. CreateDynamicObject(3615,-3938.1000977,483.8999939,16.2999992,12.0000000,0.0000000,0.0000000); //object(sanmonbhut1_law2) (5)
  254. CreateDynamicObject(3615,-3846.8999023,482.8999939,15.8999996,10.0000000,0.0000000,0.0000000); //object(sanmonbhut1_law2) (6)
  255. CreateDynamicObject(3615,-3830.1999512,484.2000122,16.3999996,12.0000000,0.0000000,0.0000000); //object(sanmonbhut1_law2) (7)
  256. CreateDynamicObject(8493,-4007.0000000,409.7999878,15.8000002,0.0000000,0.0000000,92.0000000); //object(pirtshp01_lvs) (1)
  257. CreateDynamicObject(8832,-3998.8999023,399.8999939,-6.5000000,0.0000000,30.0000000,272.0000000); //object(pirtebrdg01_lvs) (2)
  258. CreateDynamicObject(8832,-4001.3000488,476.8999939,11.8999996,0.0000000,355.9981689,271.9995117); //object(pirtebrdg01_lvs) (3)
  259. CreateDynamicObject(9159,-4006.8999023,409.7000122,15.6999998,0.0000000,0.0000000,91.5000000); //object(pirtshp02_lvs) (1)
  260. CreateDynamicObject(712,-3989.1999512,476.5000000,22.2999992,0.0000000,0.0000000,0.0000000); //object(vgs_palm03) (9)
  261. CreateDynamicObject(712,-4008.3999023,476.8999939,21.7999992,0.0000000,0.0000000,0.0000000); //object(vgs_palm03) (10)
  262. CreateDynamicObject(3501,-3838.0000000,448.7000122,9.8999996,0.0000000,14.0000000,270.0000000); //object(vgsxrefpartm1) (3)
  263. CreateDynamicObject(4564,-3805.8000488,601.2000122,117.9000015,0.0000000,11.5000000,96.0000000); //object(laskyscrap2_lan) (2)
  264. CreateDynamicObject(2780,-3945.0000000,517.2000122,29.3999996,0.0000000,0.0000000,0.0000000); //object(cj_smoke_mach) (1)
  265. CreateDynamicObject(3437,-3926.1000977,522.5000000,24.3999996,0.0000000,0.0000000,0.0000000); //object(ballypllr01_lvs) (1)
  266. CreateDynamicObject(3437,-3930.5000000,522.7000122,24.3999996,0.0000000,0.0000000,0.0000000); //object(ballypllr01_lvs) (2)
  267. CreateDynamicObject(3437,-3958.0000000,522.2999878,24.3999996,0.0000000,0.0000000,0.0000000); //object(ballypllr01_lvs) (3)
  268. CreateDynamicObject(3437,-3961.8000488,522.2000122,24.3999996,0.0000000,0.0000000,0.0000000); //object(ballypllr01_lvs) (4)
  269. CreateDynamicObject(7419,-3970.1999512,590.4000244,1.0000000,347.5000000,0.0000000,0.0000000); //object(mallcarpark_vgn01) (1)
  270. CreateDynamicObject(1383,-4043.1999512,565.7000122,43.9000015,358.0000000,0.0000000,0.0000000); //object(twrcrane_m_04) (1)
  271. CreateDynamicObject(1384,-4043.6000977,566.7999878,76.4000015,0.0000000,0.0000000,358.0000000); //object(twrcrane_m_01) (1)
  272. CreateDynamicObject(1390,-4043.1000977,613.7000122,81.0000000,0.0000000,0.0000000,0.0000000); //object(twrcrane_s_02) (1)
  273. return 1;
  274. }
  275.  
  276. public OnFilterScriptExit()
  277. {
  278. print("\n");
  279. print("The Dynamic Box Package");
  280. print("Distributed by Romel");
  281. print("Big thanks to Zher0, Y_Less, DracoBlue, Romel, (Insparation: Valve)");
  282. print("(c), 2013");
  283. print("Unoaded!");
  284. print("\n");
  285. Starts = false;
  286. TypeGame = -1;
  287. SaveSettings();
  288. set2[spam] = 0;
  289. set2[forbidword] = 0;
  290. set2[swarn] = 3;
  291. set2[sms] = 4000;
  292. Help = 0;
  293. Player = -1;
  294. KillTimer(Timer);
  295. return 1;
  296. }
  297.  
  298. #endif
  299.  
  300. public loadaccount_user(playerid, name[], value[])
  301. {
  302. INI_Int("VIPLevel", pInfo[playerid][Vip]);
  303. INI_Int("FavSkin", pInfo[playerid][FavSkin]);
  304. INI_Int("UseSkin",pInfo[playerid][UseSkin]);
  305. INI_Int("Helper", pInfo[playerid][Helper]);
  306. INI_Float("X", pInfo[playerid][vX]);
  307. INI_Float("Y", pInfo[playerid][vY]);
  308. INI_Float("Z", pInfo[playerid][vZ]);
  309. INI_Float("Angle", pInfo[playerid][vA]);
  310. INI_Int("World", pInfo[playerid][vW]);
  311. INI_Int("Interior", pInfo[playerid][vI]);
  312. return 1;
  313. }
  314.  
  315. public OnPlayerConnect(playerid)
  316. {
  317. new str[128];
  318. god[playerid] = 0;
  319. if(!fexist(Path(playerid)))
  320. {
  321. pInfo[playerid][Vip] = 0;
  322. pInfo[playerid][FavSkin] = -1;
  323. pInfo[playerid][UseSkin] = 0;
  324. pInfo[playerid][Helper] = 0;
  325. pInfo[playerid][vX] = 0.0;
  326. pInfo[playerid][vY] = 0.0;
  327. pInfo[playerid][vZ] = 0.0;
  328. pInfo[playerid][vA] = 0.0;
  329. pInfo[playerid][vW] = 0;
  330. pInfo[playerid][vI] = 0;
  331. new INI:file = INI_Open(Path(playerid));
  332. INI_SetTag(file, "Account");
  333. INI_WriteInt(file, "VIPLevel", pInfo[playerid][Vip]);
  334. INI_WriteInt(file, "FavSkin", pInfo[playerid][FavSkin]);
  335. INI_WriteInt(file, "UseSkin",pInfo[playerid][UseSkin]);
  336. INI_WriteInt(file, "Helper", pInfo[playerid][Helper]);
  337. INI_WriteFloat(file, "X", pInfo[playerid][vX]);
  338. INI_WriteFloat(file, "Y", pInfo[playerid][vY]);
  339. INI_WriteFloat(file, "Z", pInfo[playerid][vZ]);
  340. INI_WriteFloat(file, "Angle", pInfo[playerid][vA]);
  341. INI_WriteInt(file, "World", pInfo[playerid][vW]);
  342. INI_WriteInt(file, "Interior", pInfo[playerid][vI]);
  343. INI_Close(file);
  344. }
  345. else if(fexist(Path(playerid)))
  346. {
  347. INI_ParseFile(Path(playerid),"loadaccount_user", .bExtra = true, .extra = playerid);
  348. if(pInfo[playerid][Vip] >= 1)
  349. {
  350. format(str, sizeof(str), ""white"VipMsg: "red"Very Important Player "yellow"%s "white"has been connected!", pName(playerid));
  351. SendClientMessageToAll(-1, str);
  352. if(pInfo[playerid][Helper] == 0)
  353. {
  354. format(str, sizeof(str), "Welcome back V.I.P. %s, Your current V.I.P. rank is %s - Level %d", pName(playerid), rank, pInfo[playerid][Vip]);
  355. SendClientMessage(playerid, COLOR_YELLOW, str);
  356. }
  357. else if(pInfo[playerid][Helper] == 1)
  358. {
  359. if(pInfo[playerid][Vip] == 1)
  360. {
  361. format(str, sizeof(str), "Welcome back V.I.P./Helper %s, Your current rank is %s [Lvl: %d]", pName(playerid), set2[rank1], pInfo[playerid][Vip]);
  362. SendClientMessage(playerid, COLOR_YELLOW, str);
  363. }
  364. else if(pInfo[playerid][Vip] == 2)
  365. {
  366. format(str, sizeof(str), "Welcome back V.I.P./Helper %s, Your current rank is %s [Lvl: %d]", pName(playerid), set2[rank2], pInfo[playerid][Vip]);
  367. SendClientMessage(playerid, COLOR_YELLOW, str);
  368. }
  369. else if(pInfo[playerid][Vip] == 3)
  370. {
  371. format(str, sizeof(str), "Welcome back V.I.P./Helper %s, Your current rank is %s [Lvl: %d]", pName(playerid), set2[rank3], pInfo[playerid][Vip]);
  372. SendClientMessage(playerid, COLOR_YELLOW, str);
  373. }
  374. }
  375. }
  376. if(pInfo[playerid][Helper] == 1)
  377. {
  378. format(str, sizeof(str), ""white"HelperMsg: "red"Helper "yellow"%s "white"has been connected!", pName(playerid));
  379. SendClientMessageToAll(-1, str);
  380. if(pInfo[playerid][Vip] == 0)
  381. {
  382. format(str, sizeof(str), "Welcome back Helper %s", pName(playerid));
  383. SendClientMessage(playerid, COLOR_YELLOW, str);
  384. }
  385. else if(pInfo[playerid][Vip] >= 1)
  386. {
  387. if(pInfo[playerid][Vip] == 1)
  388. {
  389. format(str, sizeof(str), "Welcome back V.I.P./Helper %s, Your current rank is %s [Lvl: %d]", pName(playerid), set2[rank1], pInfo[playerid][Vip]);
  390. SendClientMessage(playerid, COLOR_YELLOW, str);
  391. }
  392. else if(pInfo[playerid][Vip] == 2)
  393. {
  394. format(str, sizeof(str), "Welcome back V.I.P./Helper %s, Your current rank is %s [Lvl: %d]", pName(playerid), set2[rank2], pInfo[playerid][Vip]);
  395. SendClientMessage(playerid, COLOR_YELLOW, str);
  396. }
  397. else if(pInfo[playerid][Vip] == 3)
  398. {
  399. format(str, sizeof(str), "Welcome back V.I.P./Helper %s, Your current rank is %s [Lvl: %d]", pName(playerid), set2[rank3], pInfo[playerid][Vip]);
  400. SendClientMessage(playerid, COLOR_YELLOW, str);
  401. }
  402. }
  403. }
  404. }
  405. playerwarn[playerid] = 0;
  406. return 1;
  407. }
  408.  
  409. public OnPlayerDisconnect(playerid, reason)
  410. {
  411. new INI:file = INI_Open(Path(playerid));
  412. INI_SetTag(file, "Account");
  413. INI_WriteInt(file, "VIPLevel", pInfo[playerid][Vip]);
  414. INI_WriteInt(file, "FavSkin", pInfo[playerid][FavSkin]);
  415. INI_WriteInt(file, "UseSkin",pInfo[playerid][UseSkin]);
  416. INI_WriteInt(file, "Helper", pInfo[playerid][Helper]);
  417. INI_WriteFloat(file, "X", pInfo[playerid][vX]);
  418. INI_WriteFloat(file, "Y", pInfo[playerid][vY]);
  419. INI_WriteFloat(file, "Z", pInfo[playerid][vZ]);
  420. INI_WriteFloat(file, "Angle", pInfo[playerid][vA]);
  421. INI_WriteInt(file, "World", pInfo[playerid][vW]);
  422. INI_WriteInt(file, "Interior", pInfo[playerid][vI]);
  423. INI_Close(file);
  424. if(IsBeingSpeced[playerid] == 1)
  425. {
  426. for(new i = 0; i < MAX_PLAYERS; i++)
  427. {
  428. if(spectatorid[i] == playerid)
  429. {
  430. StopSpectate(i);
  431. }
  432. }
  433. }
  434. god[playerid] = 0;
  435. DestroyVehicle(VipVeh[playerid]);
  436. playerwarn[playerid] = 0;
  437. return 1;
  438. }
  439.  
  440. public OnVehicleDeath(vehicleid, killerid)
  441. {
  442. for(new i = 0; i < MAX_PLAYERS; i++)
  443. {
  444. if(vehicleid == VipVeh[i])
  445. {
  446. Delete3DTextLabel(VipV[i]);
  447. }
  448. }
  449. return 1;
  450. }
  451.  
  452. public OnPlayerSpawn(playerid)
  453. {
  454. if(pInfo[playerid][Vip] >= 1)
  455. {
  456. if(pInfo[playerid][FavSkin] > 0 && pInfo[playerid][UseSkin] == 1)
  457. {
  458. SetPlayerSkin(playerid, pInfo[playerid][FavSkin]);
  459. }
  460. SetPlayerArmour(playerid, 100.0);
  461. }
  462. if(IsSpecing[playerid] == 1)
  463. {
  464. SetPlayerPos(playerid, SpecX[playerid], SpecY[playerid], SpecZ[playerid]);
  465. SetPlayerInterior(playerid, Inter[playerid]);
  466. SetPlayerVirtualWorld(playerid, vWorld[playerid]);
  467. IsSpecing[playerid] = 0;
  468. IsBeingSpeced[spectatorid[playerid]] = 0;
  469. }
  470. return 1;
  471. }
  472.  
  473. public OnPlayerText(playerid, text[])
  474. {
  475. new str[128];
  476. if(set2[typeq] == 1)
  477. {
  478. if(Starts == true)
  479. {
  480. if(TypeGame == 0) //Question
  481. {
  482. if(strcmp(text, targetanswer, true) == 0)
  483. {
  484. format(str, sizeof(str), "ANSWER: Player %s[%d] answer the question '%s' the answer is '%s'", pName(playerid), playerid, question, targetanswer);
  485. SendClientMessageToAll(COLOR_ORANGE, str);
  486. format(str, sizeof(str), "REACTIONTEST: Player %s[%d] wins '$%d + %d score'", pName(playerid), playerid, set2[prize], set2[prizescore]);
  487. SendClientMessageToAll(COLOR_YELLOW, str);
  488. GivePlayerMoney(playerid, set2[prize]);
  489. SetPlayerScore(playerid, GetPlayerScore(playerid) + set2[prizescore]);
  490. Starts = false;
  491. TypeGame = -1;
  492. KillTimer(Timer);
  493. return 0;
  494. }
  495. }
  496. if(TypeGame == 1) //Typing
  497. {
  498. if(strcmp(text, targetword, true) == 0)
  499. {
  500. format(str, sizeof(str), "REACTIONTEST: Player %s[%d] wins '$%d + %d score' for typing '%s' as first", pName(playerid), playerid, set2[prize], set2[prizescore], targetword);
  501. SendClientMessageToAll(COLOR_YELLOW, str);
  502. GivePlayerMoney(playerid, set2[prize]);
  503. SetPlayerScore(playerid, GetPlayerScore(playerid) + set2[prizescore]);
  504. Starts = false;
  505. TypeGame = -1;
  506. KillTimer(Timer);
  507. return 0;
  508. }
  509. }
  510. }
  511. }
  512. if(set2[wgasfw] == 1)
  513. {
  514. if(set2[spam] == 1)
  515. {
  516. if((GetTickCount() - GetPVarInt(playerid, "spwait")) < set2[sms])
  517. {
  518. playerwarn[playerid] += 1;
  519. format(str, sizeof(str), "ANTI-SPAM: %s(%d) has been warned by Anti-Spam - Warns: %d/%d", pName(playerid), playerid, playerwarn[playerid], set2[swarn]);
  520. SendClientMessageToAll(0xFFFF00FF, str);
  521. format(str, sizeof(str), "ANTI-SPAM: You should wait till the Spam Wait Time is finished, Warnings: %d/%d", playerwarn[playerid], set2[swarn]);
  522. SendClientMessage(playerid, 0xFF0000FF, str);
  523. if(playerwarn[playerid] == set2[swarn])
  524. {
  525. format(str, sizeof(str), "ANTI-SPAM: %s(%d) has been kicked by Anti-Spam for Spamming", pName(playerid), playerid);
  526. SendClientMessageToAll(0xFF0000FF, str);
  527. SendClientMessage(playerid, -1, "You've been kicked for Spamming!");
  528. Kick(playerid);
  529. return 0;
  530. }
  531. return 0;
  532. }
  533. SetPVarInt(playerid, "spwait", GetTickCount());
  534. }
  535. if(set2[forbidword] == 1)
  536. {
  537. for(new s = 0; s < word; s++)
  538. {
  539. new pos;
  540. while((pos = strfind(text, ForbiddenWords[s], true)) != -1) for(new i = pos, j = pos + strlen(ForbiddenWords[s]); i < j; i++) text[i] = '*';
  541. }
  542. }
  543. }
  544. if(text[0] == set2[symbolchat] && pInfo[playerid][Vip] >= 1)
  545. {
  546. format(str, sizeof(str), ""red"Vip Chat: "yellow"%s: "white"%s", pName(playerid), text[1]);
  547. SendMsgToVips(str, COLOR_WHITE);
  548. return 0;
  549. }
  550. return 1;
  551. }
  552.  
  553. public OnPlayerDeath(playerid, killerid, reason)
  554. {
  555. if(IsBeingSpeced[playerid] == 1)
  556. {
  557. for(new i = 0; i < MAX_PLAYERS; i++)
  558. {
  559. if(spectatorid[i] == playerid)
  560. {
  561. StopSpectate(i);
  562. }
  563. }
  564. }
  565. return 1;
  566. }
  567.  
  568. public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
  569. {
  570. if(IsBeingSpeced[playerid] == 1)
  571. {
  572. for(new i = 0; i < MAX_PLAYERS; i++)
  573. {
  574. if(spectatorid[i] == playerid)
  575. {
  576. SetPlayerInterior(i, GetPlayerInterior(playerid));
  577. SetPlayerVirtualWorld(i, GetPlayerVirtualWorld(playerid));
  578. }
  579. }
  580. }
  581. return 1;
  582. }
  583.  
  584. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  585. {
  586. if(GetPlayerState(playerid) == PLAYER_STATE_SPECTATING && spectatorid[playerid] != INVALID_PLAYER_ID)
  587. {
  588. if(newkeys == KEY_JUMP) AdvanceSpectate(playerid);
  589. else if(newkeys == KEY_SPRINT) ReverseSpectate(playerid);
  590. }
  591. return 1;
  592. }
  593.  
  594. public OnPlayerStateChange(playerid, newstate, oldstate)
  595. {
  596. if(newstate == PLAYER_STATE_ONFOOT)
  597. {
  598. if(IsBeingSpeced[playerid] == 1)
  599. {
  600. for(new i = 0; i < MAX_PLAYERS; i++)
  601. {
  602. if(spectatorid[i] == playerid)
  603. {
  604. PlayerSpectatePlayer(i, playerid);
  605. }
  606. }
  607. }
  608. }
  609. if(newstate == PLAYER_STATE_DRIVER)
  610. {
  611. new vehicleid = GetPlayerVehicleID(playerid);
  612. if(vehicleid == VipVeh[playerid])
  613. {
  614. if(pInfo[playerid][Vip] == 0)
  615. {
  616. RemovePlayerFromVehicle(playerid);
  617. SendClientMessage(playerid, COLOR_RED, "Error: You cannot ride on the VIP Vehicle!");
  618. }
  619. }
  620. }
  621. return 1;
  622. }
  623.  
  624. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  625. {
  626. new str[128];
  627. if(dialogid == cset)
  628. {
  629. if(!response) return 0;
  630. switch(listitem)
  631. {
  632. case 0:
  633. {
  634. if(set2[wgasfw] == 0)
  635. {
  636. format(str, sizeof(str), "RCON %s(%d) has enable the We got Anti-Spam/Forbidden Word script from Dynamic Box Package", pName(playerid), playerid);
  637. SendClientMessageToAll(COLOR_YELLOW, str);
  638. set2[wgasfw] = 1;
  639. }
  640. else if(set2[wgasfw] == 1)
  641. {
  642. format(str, sizeof(str), "RCON %s(%d) has disable the We got Anti-Spam/Forbidden Word script from Dynamic Box Package", pName(playerid), playerid);
  643. SendClientMessageToAll(COLOR_YELLOW, str);
  644. set2[wgasfw] = 0;
  645. }
  646. }
  647. case 1:
  648. {
  649. if(set2[wgasfw] == 0) return SendClientMessage(playerid, COLOR_ORANGE, "Invalid: This command is disabled by Dynamic Box Package!");
  650. if(set2[spam] == 0)
  651. {
  652. format(str, sizeof(str), "RCON %s(%d) has enable the Anti-Spam", pName(playerid), playerid);
  653. SendClientMessageToAll(COLOR_YELLOW, str);
  654. set2[spam] = 1;
  655. }
  656. else if(set2[spam] == 1)
  657. {
  658. format(str, sizeof(str), "RCON %s(%d) has disable the Anti-Spam", pName(playerid), playerid);
  659. SendClientMessageToAll(COLOR_YELLOW, str);
  660. set2[spam] = 0;
  661. }
  662. }
  663. case 2:
  664. {
  665. if(set2[wgasfw] == 0) return SendClientMessage(playerid, COLOR_ORANGE, "Invalid: This command is disabled by Dynamic Box Package!");
  666. if(set2[forbidword] == 0)
  667. {
  668. format(str, sizeof(str), "RCON %s(%d) has enable the Anti-Forbid Word", pName(playerid), playerid);
  669. SendClientMessageToAll(COLOR_YELLOW, str);
  670. set2[forbidword] = 1;
  671. }
  672. else if(set2[spam] == 1)
  673. {
  674. if(set2[wgasfw] == 0) return SendClientMessage(playerid, COLOR_ORANGE, "Invalid: This command is disabled by Dynamic Box Package!");
  675. format(str, sizeof(str), "RCON %s(%d) has disable the Anti-Forbid Word", pName(playerid), playerid);
  676. SendClientMessageToAll(COLOR_YELLOW, str);
  677. set2[forbidword] = 0;
  678. }
  679. }
  680. case 3:
  681. {
  682. ShowPlayerDialog(playerid, cwarn, DIALOG_STYLE_INPUT, "{FFFFFF}Config the Warnings", "{FFFFFF}Function: Put the warnings you like to set when player get's warned\nInput the value not string", "Input", "Back");
  683. }
  684. case 4:
  685. {
  686. ShowPlayerDialog(playerid, csms, DIALOG_STYLE_INPUT, "{FFFFFF}Config the Wait Time", "{FFFFFF}Function: When player chat, We will store the wait time in variable\nThen when player talks when the wait time is not finish he gets warn\nInput the value (Mileseconds) not string", "Input", "Back");
  687. }
  688. case 5:
  689. {
  690. ShowPlayerDialog(playerid, cfw, DIALOG_STYLE_INPUT, "{FFFFFF}Add the Words", "{FFFFFF}Function: Type the string that you want to be forbidden word\nInput the string not the value", "Input", "Back");
  691. }
  692. case 6:
  693. {
  694. new str2[956];
  695. format(str2, sizeof(str2), "Turn on-off\nAnti-Spam [On/Off]\nAnti-ForbidWord [On/Off]\nSpam Warnings [%d]\nSpam Wait [%d]\nAdd Forbid Words\nForbid Words [%d]", set2[swarn], set2[sms], word);
  696. ShowPlayerDialog(playerid, cset, DIALOG_STYLE_LIST, "{FFFFFF}Configuration", str2, "Edit", "Close");
  697. }
  698. }
  699. return 1;
  700. }
  701. if(dialogid == cwarn)
  702. {
  703. if(!response)
  704. {
  705. new str2[956];
  706. format(str2, sizeof(str2), "Turn on-off\nAnti-Spam [On/Off]\nAnti-ForbidWord [On/Off]\nSpam Warnings [%d]\nSpam Wait [%d]\nAdd Forbid Words\nForbid Words [%d]", set2[swarn], set2[sms], word);
  707. ShowPlayerDialog(playerid, cset, DIALOG_STYLE_LIST, "{FFFFFF}Configuration", str2, "Edit", "Close");
  708. return 1;
  709. }
  710. if(!strlen(inputtext))
  711. {
  712. ShowPlayerDialog(playerid, cwarn, DIALOG_STYLE_INPUT, "{FFFFFF}Config the Warnings", "{FFFFFF}Function: Put the warnings you like to set when player get's warned\nInput the value not string\nINVALID: Your field is empty!", "Input", "Back");
  713. return 1;
  714. }
  715. if(!isnumeric(inputtext))
  716. {
  717. ShowPlayerDialog(playerid, cwarn, DIALOG_STYLE_INPUT, "{FFFFFF}Config the Warnings", "{FFFFFF}Function: Put the warnings you like to set when player get's warned\nInput the value not string\nINVALID: That's string not value", "Input", "Back");
  718. return 1;
  719. }
  720. if(set2[wgasfw] == 0) return SendClientMessage(playerid, COLOR_ORANGE, "Invalid: This command is disabled by Dynamic Box Package!");
  721. set2[swarn] = strval(inputtext);
  722. format(str, sizeof(str), "RCON %s(%d) set the Spam Warnings to %d", pName(playerid), playerid, strval(inputtext));
  723. SendClientMessageToAll(COLOR_YELLOW, str);
  724. }
  725. if(dialogid == csms)
  726. {
  727. if(!response)
  728. {
  729. new str2[956];
  730. format(str2, sizeof(str2), "Turn on-off\nAnti-Spam [On/Off]\nAnti-ForbidWord [On/Off]\nSpam Warnings [%d]\nSpam Wait [%d]\nAdd Forbid Words\nForbid Words [%d]", set2[swarn], set2[sms], word);
  731. ShowPlayerDialog(playerid, cset, DIALOG_STYLE_LIST, "{FFFFFF}Configuration", str2, "Edit", "Close");
  732. return 1;
  733. }
  734. if(!strlen(inputtext))
  735. {
  736. ShowPlayerDialog(playerid, csms, DIALOG_STYLE_INPUT, "{FFFFFF}Config the Wait Time", "{FFFFFF}Function: When player chat, We will store the wait time in variable\nThen when player talks when the wait time is not finish he gets warn\nInput the value (Mileseconds) not string\nINVALID: Your field is empty!", "Input", "Back");
  737. return 1;
  738. }
  739. if(!isnumeric(inputtext))
  740. {
  741. ShowPlayerDialog(playerid, csms, DIALOG_STYLE_INPUT, "{FFFFFF}Config the Wait Time", "{FFFFFF}Function: When player chat, We will store the wait time in variable\nThen when player talks when the wait time is not finish he gets warn\nInput the value (Mileseconds) not string\nINVALID: That's string not value", "Input", "Back");
  742. return 1;
  743. }
  744. if(set2[wgasfw] == 0) return SendClientMessage(playerid, COLOR_ORANGE, "Invalid: This command is disabled by Dynamic Box Package!");
  745. set2[sms] = 1000*strval(inputtext);
  746. format(str, sizeof(str), "RCON %s(%d) set the Spam Wait Time to %d seconds", pName(playerid), playerid, strval(inputtext));
  747. SendClientMessageToAll(COLOR_YELLOW, str);
  748. }
  749. if(dialogid == cfw)
  750. {
  751. if(!response)
  752. {
  753. new str2[956];
  754. format(str2, sizeof(str2), "Turn on-off\nAnti-Spam [On/Off]\nAnti-ForbidWord [On/Off]\nSpam Warnings [%d]\nSpam Wait [%d]\nAdd Forbid Words\nForbid Words [%d]", set2[swarn], set2[sms], word);
  755. ShowPlayerDialog(playerid, cset, DIALOG_STYLE_LIST, "{FFFFFF}Configuration", str2, "Edit", "Close");
  756. return 1;
  757. }
  758. if(!strlen(inputtext))
  759. {
  760. ShowPlayerDialog(playerid, cfw, DIALOG_STYLE_INPUT, "{FFFFFF}Add the Words", "{FFFFFF}Function: Type the string that you want to be forbidden word\nInput the string not the value\nINVALID: Your field is empty!", "Input", "Back");
  761. return 1;
  762. }
  763. if(isnumeric(inputtext))
  764. {
  765. ShowPlayerDialog(playerid, cfw, DIALOG_STYLE_INPUT, "{FFFFFF}Add the Words", "{FFFFFF}Function: Type the string that you want to be forbidden word\nInput the string not the value\nINVALID: That's value not a string", "Input", "Back");
  766. return 1;
  767. }
  768. if(set2[wgasfw] == 0) return SendClientMessage(playerid, COLOR_ORANGE, "Invalid: This command is disabled by Dynamic Box Package!");
  769. new File:file, string2[256];
  770. format(string2, 256, "%s/%s", ConfigPath, SettingsWords);
  771. file = fopen(string2, io_append);
  772. format(string2, sizeof(string2), "%s\r\n", inputtext);
  773. fwrite(file, string2);
  774. fclose(file);
  775. new File:file2, file3[256], string[100];
  776. format(file3, sizeof(file3), "%s/%s", ConfigPath, SettingsWords);
  777. word = 0;
  778. if((file2 = fopen(file3, io_read)))
  779. {
  780. while(fread(file2, string))
  781. {
  782. for(new i = 0, j = strlen(string); i < j; i++) if(string[i] == '\n' || string[i] == '\r') string[i] = '\0';
  783. ForbiddenWords[word] = string;
  784. word++;
  785. }
  786. fclose(file2);
  787. printf("[FS]: Forbidden Words has been reloaded - %d Forbidden Words", word);
  788. }
  789. format(str, sizeof(str), "RCON %s(%d) has add the word ''%s'' as Forbidden Word", pName(playerid), playerid, inputtext);
  790. SendClientMessageToAll(COLOR_YELLOW, str);
  791. }
  792. if(dialogid == dbox)
  793. {
  794. new str2[956];
  795. if(!response) return 1;
  796. switch(listitem)
  797. {
  798. case 0:
  799. {
  800. format(str2, sizeof(str2), "Turn on-off\nAnti-Spam [On/Off]\nAnti-ForbidWord [On/Off]\nSpam Warnings [%d]\nSpam Wait [%d]\nAdd Forbid Words\nForbid Words [%d]", set2[swarn], set2[sms], word);
  801. ShowPlayerDialog(playerid, cset, DIALOG_STYLE_LIST, "{FFFFFF}Configuration for WGASFW", str2, "Edit", "Back");
  802. }
  803. case 1:
  804. {
  805. format(str2, sizeof(str2), "Turn on-off\nQuestion Time Ends [%d ms]\nTyping Time Ends [%d ms]\nPrize $$$ [$%d]\nPrize Score [%d]", set2[questiontime], set2[typetime], set2[prize], set2[prizescore]);
  806. ShowPlayerDialog(playerid, typeques, DIALOG_STYLE_LIST, "{FFFFFF}Configuration for TYQUES", str2, "Edit", "Back");
  807. }
  808. case 2:
  809. {
  810. format(str2, sizeof(str2), "ReadCmd [On/Off]\nLvl 1: %s\nLvl 2: %s\nLvl 3: %s\nChat Symbol: %s", set2[rank1], set2[rank2], set2[rank3], set2[symbolchat]);
  811. ShowPlayerDialog(playerid, VipSet, DIALOG_STYLE_LIST, "{FFFFFF}Configuration for RomVip", str2, "Edit", "Back");
  812. }
  813. }
  814. }
  815. if(dialogid == typeques)
  816. {
  817. if(!response)
  818. {
  819. format(str, sizeof(str), "We got A-Spam/Forbid Word [On/Off]\nTyping-Question Test [On/Off]\nRomVip [On/Off]");
  820. ShowPlayerDialog(playerid, dbox, DIALOG_STYLE_LIST, "{FFFFFF}Configuration for Dynamic Box", str, "Edit", "Close");
  821. return 1;
  822. }
  823. switch(listitem)
  824. {
  825. case 0:
  826. {
  827. if(set2[typeq] == 0)
  828. {
  829. format(str, sizeof(str), "RCON %s(%d) has enable the Typing-Question Test script from Dynamic Box Package", pName(playerid), playerid);
  830. SendClientMessageToAll(COLOR_YELLOW, str);
  831. set2[typeq] = 1;
  832. }
  833. else if(set2[typeq] == 1)
  834. {
  835. format(str, sizeof(str), "RCON %s(%d) has disable the Typing-Question script from Dynamic Box Package", pName(playerid), playerid);
  836. SendClientMessageToAll(COLOR_YELLOW, str);
  837. set2[typeq] = 0;
  838. }
  839. }
  840. case 1:
  841. {
  842. ShowPlayerDialog(playerid, questiontimer, DIALOG_STYLE_INPUT, "{FFFFFF}Question Time Config", "Set the time where the Question Timer ends\nMileseconds, Not string", "Input", "Back");
  843. }
  844. case 2:
  845. {
  846. ShowPlayerDialog(playerid, typingtimer, DIALOG_STYLE_INPUT, "{FFFFFF}Type Time Config", "Set the time where the Typing Timer ends\nMileseconds, Not string", "Input", "Back");
  847. }
  848. case 3:
  849. {
  850. ShowPlayerDialog(playerid, Prizes, DIALOG_STYLE_INPUT, "{FFFFFF}Prize $$$ Config", "Set the money prize of the Reaction Contest\nInteger, Not string", "Input", "Back");
  851. }
  852. case 4:
  853. {
  854. ShowPlayerDialog(playerid, PrizesScore, DIALOG_STYLE_INPUT, "{FFFFFF}Prize Score Config", "Set the score prize of the Reaction Contest\nInteger, Not string", "Input", "Back");
  855. }
  856. }
  857. }
  858. if(dialogid == questiontimer)
  859. {
  860. if(!response)
  861. {
  862. format(str, sizeof(str), "We got A-Spam/Forbid Word [On/Off]\nTyping-Question Test [On/Off]\nRomVip [On/Off]");
  863. ShowPlayerDialog(playerid, dbox, DIALOG_STYLE_LIST, "{FFFFFF}Configuration for Dynamic Box", str, "Edit", "Close");
  864. return 1;
  865. }
  866. if(!strlen(inputtext))
  867. {
  868. ShowPlayerDialog(playerid, questiontimer, DIALOG_STYLE_INPUT, "{FFFFFF}Question Time Config", "Set the time where the Question Timer ends\nMileseconds, Not string\nField Empty (Error)", "Input", "Back");
  869. return 1;
  870. }
  871. if(!isnumeric(inputtext))
  872. {
  873. ShowPlayerDialog(playerid, questiontimer, DIALOG_STYLE_INPUT, "{FFFFFF}Question Time Config", "Set the time where the Question Timer ends\nMileseconds, Not string\nThat's string not integer (Error)", "Input", "Back");
  874. return 1;
  875. }
  876. if(set2[typeq] == 0) return SendClientMessage(playerid, COLOR_ORANGE, "Invalid: This command is disabled by Dynamic Box Package!");
  877. set2[questiontime] = 1000*strval(inputtext);
  878. format(str, sizeof(str), "RCON %s(%d) set the Question Test Time to %d seconds", pName(playerid), playerid, strval(inputtext));
  879. SendClientMessageToAll(COLOR_YELLOW, str);
  880. }
  881. if(dialogid == typingtimer)
  882. {
  883. if(!response)
  884. {
  885. format(str, sizeof(str), "We got A-Spam/Forbid Word [On/Off]\nTyping-Question Test [On/Off]\nRomVip [On/Off]");
  886. ShowPlayerDialog(playerid, dbox, DIALOG_STYLE_LIST, "{FFFFFF}Configuration for Dynamic Box", str, "Edit", "Close");
  887. return 1;
  888. }
  889. if(!strlen(inputtext))
  890. {
  891. ShowPlayerDialog(playerid, typingtimer, DIALOG_STYLE_INPUT, "{FFFFFF}Type Time Config", "Set the time where the Typing Timer ends\nMileseconds, Not string\nField Empty (Error!)", "Input", "Back");
  892. return 1;
  893. }
  894. if(!isnumeric(inputtext))
  895. {
  896. ShowPlayerDialog(playerid, typingtimer, DIALOG_STYLE_INPUT, "{FFFFFF}Type Time Config", "Set the time where the Typing Timer ends\nMileseconds, Not string\nThat's string not integer (Error!)", "Input", "Back");
  897. return 1;
  898. }
  899. if(set2[typeq] == 0) return SendClientMessage(playerid, COLOR_ORANGE, "Invalid: This command is disabled by Dynamic Box Package!");
  900. set2[typetime] = 1000*strval(inputtext);
  901. format(str, sizeof(str), "RCON %s(%d) set the Typing Test Time to %d seconds", pName(playerid), playerid, strval(inputtext));
  902. SendClientMessageToAll(COLOR_YELLOW, str);
  903. }
  904. if(dialogid == Prizes)
  905. {
  906. if(!response)
  907. {
  908. format(str, sizeof(str), "We got A-Spam/Forbid Word [On/Off]\nTyping-Question Test [On/Off]\nRomVip [On/Off]");
  909. ShowPlayerDialog(playerid, dbox, DIALOG_STYLE_LIST, "{FFFFFF}Configuration for Dynamic Box", str, "Edit", "Close");
  910. return 1;
  911. }
  912. if(!strlen(inputtext))
  913. {
  914. ShowPlayerDialog(playerid, prize, DIALOG_STYLE_INPUT, "{FFFFFF}Prize $$$ Config", "Set the money prize of the Reaction Contest\nInteger, Not string\nField Empty (Error!)", "Input", "Back");
  915. return 1;
  916. }
  917. if(!isnumeric(inputtext))
  918. {
  919. ShowPlayerDialog(playerid, prize, DIALOG_STYLE_INPUT, "{FFFFFF}Prize $$$ Config", "Set the money prize of the Reaction Contest\nInteger, Not string\nThat's string not integer (Error!)", "Input", "Back");
  920. return 1;
  921. }
  922. if(set2[typeq] == 0) return SendClientMessage(playerid, COLOR_ORANGE, "Invalid: This command is disabled by Dynamic Box Package!");
  923. set2[prize] = strval(inputtext);
  924. format(str, sizeof(str), "RCON %s(%d) set the Typing Test-Question Test Prize (Money) to $%d", pName(playerid), playerid, strval(inputtext));
  925. SendClientMessageToAll(COLOR_YELLOW, str);
  926. }
  927. if(dialogid == PrizesScore)
  928. {
  929. if(!response)
  930. {
  931. format(str, sizeof(str), "We got A-Spam/Forbid Word [On/Off]\nTyping-Question Test [On/Off]\nRomVip [On/Off]");
  932. ShowPlayerDialog(playerid, dbox, DIALOG_STYLE_LIST, "{FFFFFF}Configuration for Dynamic Box", str, "Edit", "Close");
  933. return 1;
  934. }
  935. if(!strlen(inputtext))
  936. {
  937. ShowPlayerDialog(playerid, PrizesScore, DIALOG_STYLE_INPUT, "{FFFFFF}Prize Score Config", "Set the score prize of the Reaction Contest\nInteger, Not string\nField Empty (Error!)", "Input", "Back");
  938. return 1;
  939. }
  940. if(!isnumeric(inputtext))
  941. {
  942. ShowPlayerDialog(playerid, PrizesScore, DIALOG_STYLE_INPUT, "{FFFFFF}Prize Score Config", "Set the score prize of the Reaction Contest\nInteger, Not string\nThat's string not integer (Error!)", "Input", "Back");
  943. return 1;
  944. }
  945. if(set2[typeq] == 0) return SendClientMessage(playerid, COLOR_ORANGE, "Invalid: This command is disabled by Dynamic Box Package!");
  946. set2[prizescore] = strval(inputtext);
  947. format(str, sizeof(str), "RCON %s(%d) set the Typing Test-Question Test Prize (Score) to %d", pName(playerid), playerid, strval(inputtext));
  948. SendClientMessageToAll(COLOR_YELLOW, str);
  949. }
  950. if(dialogid == VipSet)
  951. {
  952. if(!response)
  953. {
  954. format(str, sizeof(str), "We got A-Spam/Forbid Word [On/Off]\nTyping-Question Test [On/Off]\nRomVip [On/Off]");
  955. ShowPlayerDialog(playerid, dbox, DIALOG_STYLE_LIST, "{FFFFFF}Configuration for Dynamic Box", str, "Edit", "Close");
  956. return 1;
  957. }
  958. switch(listitem)
  959. {
  960. case 0:
  961. {
  962. if(set2[readcmd] == 0)
  963. {
  964. format(str, sizeof(str), "RCON %s[%d] enable Reading Commands for VIP", pName(playerid), playerid);
  965. SendClientMessageToAll(COLOR_YELLOW, str);
  966. set2[readcmd] = 1;
  967. }
  968. else if(set2[readcmd] == 1)
  969. {
  970. format(str, sizeof(str), "RCON %s[%d] disable Reading Commands for VIP", pName(playerid), playerid);
  971. SendClientMessageToAll(COLOR_YELLOW, str);
  972. set2[readcmd] = 0;
  973. }
  974. }
  975. case 1:
  976. {
  977. ShowPlayerDialog(playerid, RankSet, DIALOG_STYLE_INPUT, ""white"Lvl 1 Config", ""white"Put the new Level Rank for VIP Level 1\nCancel to go back to config menu!", "Change", "Back");
  978. }
  979. case 2:
  980. {
  981. ShowPlayerDialog(playerid, Rank2Set, DIALOG_STYLE_INPUT, ""white"Lvl 2 Config", ""white"Put the new Level Rank for VIP Level 2\nCancel to go back to config menu!", "Change", "Back");
  982. }
  983. case 3:
  984. {
  985. ShowPlayerDialog(playerid, Rank3Set, DIALOG_STYLE_INPUT, ""white"Lvl 3 Config", ""white"Put the new Level Rank for VIP Level 3\nCancel to go back to config menu!", "Change", "Back");
  986. }
  987. case 4:
  988. {
  989. ShowPlayerDialog(playerid, SymbolSet, DIALOG_STYLE_INPUT, ""white"Symbol Config", ""white"Put the new symbol for the VIP Chat\nCancel to go back to config menu!", "Change", "Back");
  990. }
  991. }
  992. }
  993. if(dialogid == RankSet)
  994. {
  995. new str2[956];
  996. if(!response)
  997. {
  998. format(str2, sizeof(str2), "ReadCmd [On/Off]\nLvl 1: %s\nLvl 2: %s\nLvl 3: %s\nChat Symbol: %s", set2[rank1], set2[rank2], set2[rank3], set2[symbolchat]);
  999. ShowPlayerDialog(playerid, VipSet, DIALOG_STYLE_LIST, "{FFFFFF}Configuration for RomVip", str2, "Edit", "Back");
  1000. return 1;
  1001. }
  1002. if(!strlen(inputtext))
  1003. {
  1004. ShowPlayerDialog(playerid, RankSet, DIALOG_STYLE_INPUT, ""white"Lvl 1 Config", ""white"Put the new Level Rank for VIP Level 1\nCancel to go back to config menu!\nEmpty Field!", "Change", "Back");
  1005. return 1;
  1006. }
  1007. new file[256];
  1008. format(file, sizeof(file), "%s/%s", ConfigPath, SettingsSpam);
  1009. new INI:File = INI_Open(file);
  1010. INI_SetTag(File, "Settings");
  1011. INI_WriteString(File, "Rank1", inputtext);
  1012. INI_Close(File);
  1013. new file3[256];
  1014. format(file3, sizeof(file3), "%s/%s", ConfigPath, SettingsSpam);
  1015. INI_ParseFile(file3, "loadfiles", .bExtra = false);
  1016. format(str, sizeof(str), "RCON %s(%d) change the VIP Level 1 Rank to Rank '%s'", pName(playerid), playerid, inputtext);
  1017. SendClientMessageToAll(COLOR_YELLOW, str);
  1018. }
  1019. if(dialogid == Rank2Set)
  1020. {
  1021. new str2[956];
  1022. if(!response)
  1023. {
  1024. format(str2, sizeof(str2), "ReadCmd [On/Off]\nLvl 1: %s\nLvl 2: %s\nLvl 3: %s\nChat Symbol: %s", set2[rank1], set2[rank2], set2[rank3], set2[symbolchat]);
  1025. ShowPlayerDialog(playerid, VipSet, DIALOG_STYLE_LIST, "{FFFFFF}Configuration for RomVip", str2, "Edit", "Back");
  1026. return 1;
  1027. }
  1028. if(!strlen(inputtext))
  1029. {
  1030. ShowPlayerDialog(playerid, Rank2Set, DIALOG_STYLE_INPUT, ""white"Lvl 2 Config", ""white"Put the new Level Rank for VIP Level 2\nCancel to go back to config menu!\nEmpty Field!", "Change", "Back");
  1031. return 1;
  1032. }
  1033. new file[256];
  1034. format(file, sizeof(file), "%s/%s", ConfigPath, SettingsSpam);
  1035. new INI:File = INI_Open(file);
  1036. INI_SetTag(File, "Settings");
  1037. INI_WriteString(File, "Rank2", inputtext);
  1038. INI_Close(File);
  1039. new file3[256];
  1040. format(file3, sizeof(file3), "%s/%s", ConfigPath, SettingsSpam);
  1041. INI_ParseFile(file3, "loadfiles", .bExtra = false);
  1042. format(str, sizeof(str), "RCON %s(%d) change the VIP Level 2 Rank to Rank '%s'", pName(playerid), playerid, inputtext);
  1043. SendClientMessageToAll(COLOR_YELLOW, str);
  1044. }
  1045. if(dialogid == Rank3Set)
  1046. {
  1047. new str2[956];
  1048. if(!response)
  1049. {
  1050. format(str2, sizeof(str2), "ReadCmd [On/Off]\nLvl 1: %s\nLvl 2: %s\nLvl 3: %s\nChat Symbol: %s", set2[rank1], set2[rank2], set2[rank3], set2[symbolchat]);
  1051. ShowPlayerDialog(playerid, VipSet, DIALOG_STYLE_LIST, "{FFFFFF}Configuration for RomVip", str2, "Edit", "Back");
  1052. return 1;
  1053. }
  1054. if(!strlen(inputtext))
  1055. {
  1056. ShowPlayerDialog(playerid, Rank3Set, DIALOG_STYLE_INPUT, ""white"Lvl 3 Config", ""white"Put the new Level Rank for VIP Level 3\nCancel to go back to config menu!\nEmpty Field!", "Change", "Back");
  1057. return 1;
  1058. }
  1059. new file[256];
  1060. format(file, sizeof(file), "%s/%s", ConfigPath, SettingsSpam);
  1061. new INI:File = INI_Open(file);
  1062. INI_SetTag(File, "Settings");
  1063. INI_WriteString(File, "Rank3", inputtext);
  1064. INI_Close(File);
  1065. new file3[256];
  1066. format(file3, sizeof(file3), "%s/%s", ConfigPath, SettingsSpam);
  1067. INI_ParseFile(file3, "loadfiles", .bExtra = false);
  1068. format(str, sizeof(str), "RCON %s(%d) change the VIP Level 3 Rank to Rank '%s'", pName(playerid), playerid, inputtext);
  1069. SendClientMessageToAll(COLOR_YELLOW, str);
  1070. }
  1071. if(dialogid == SymbolSet)
  1072. {
  1073. new str2[956];
  1074. if(!response)
  1075. {
  1076. format(str2, sizeof(str2), "ReadCmd [On/Off]\nLvl 1: %s\nLvl 2: %s\nLvl 3: %s\nChat Symbol: %s", set2[rank1], set2[rank2], set2[rank3], set2[symbolchat]);
  1077. ShowPlayerDialog(playerid, VipSet, DIALOG_STYLE_LIST, "{FFFFFF}Configuration for RomVip", str2, "Edit", "Back");
  1078. return 1;
  1079. }
  1080. if(!strlen(inputtext))
  1081. {
  1082. ShowPlayerDialog(playerid, SymbolSet, DIALOG_STYLE_INPUT, ""white"Symbol Config", ""white"Put the new symbol for the VIP Chat\nCancel to go back to config menu!\nEmpty Field!", "Change", "Back");
  1083. return 1;
  1084. }
  1085. new file[256];
  1086. format(file, sizeof(file), "%s/%s", ConfigPath, SettingsSpam);
  1087. new INI:File = INI_Open(file);
  1088. INI_SetTag(File, "Settings");
  1089. INI_WriteString(File, "ChatSymbol", inputtext);
  1090. INI_Close(File);
  1091. new file3[256];
  1092. format(file3, sizeof(file3), "%s/%s", ConfigPath, SettingsSpam);
  1093. INI_ParseFile(file3, "loadfiles", .bExtra = false);
  1094. format(str, sizeof(str), "RCON %s(%d) change the VIP Chat Symbol to '%s'", pName(playerid), playerid, inputtext);
  1095. SendClientMessageToAll(COLOR_YELLOW, str);
  1096. }
  1097. return 1;
  1098. }
  1099.  
  1100. public KillTest()
  1101. {
  1102. new str[128];
  1103. if(Starts == true)
  1104. {
  1105. if(TypeGame == 0)
  1106. {
  1107. format(str, sizeof(str), "QUESTION: No one answers the question '%s', The answer is '%s'", question, targetanswer);
  1108. SendClientMessageToAll(COLOR_YELLOW, str);
  1109. Starts = false;
  1110. TypeGame = -1;
  1111. }
  1112. if(TypeGame == 1)
  1113. {
  1114. format(str, sizeof(str), "TYPING: No one types the word '%s'", targetword);
  1115. SendClientMessageToAll(COLOR_YELLOW, str);
  1116. Starts = false;
  1117. TypeGame = -1;
  1118. }
  1119. }
  1120. KillTimer(Timer);
  1121. return 1;
  1122. }
  1123.  
  1124. YCMD:features(playerid, params[], help)
  1125. {
  1126. #pragma unused help
  1127. new str[956];
  1128. strcat(str, ""white"Dynamic Box Package features:\n");
  1129. strcat(str, "\nA Very very simple but fast VIP commands\n");
  1130. strcat(str, "Helpers/VIP listing based on Dialog\n");
  1131. strcat(str, "You can disable or enable any scripts (only in the list) with Dynamic Box Package!\n");
  1132. strcat(str, "Help System based on Roleplays\n");
  1133. strcat(str, "Configable settings of each scripts (Such as Prizes, Mileseconds)\n");
  1134. strcat(str, "A VIP Chat with wonderful colors!\n");
  1135. strcat(str, "A VIP Message with wonderful colors!\n");
  1136. strcat(str, "Fixed some issue bugged from previous scripts\n");
  1137. strcat(str, "A VIP Vehicle provided with VIP Vehicle Protection + VIP Vehicle Label\n");
  1138. strcat(str, "Simple Spectating system with keys!\n");
  1139. strcat(str, "VIP Rank configable in-game > /dsettings\n");
  1140. strcat(str, "VIP Chat Symbol configable in-game > /dsettings\n");
  1141. strcat(str, "Previous scripts is now dynamic!");
  1142. ShowPlayerDialog(playerid, Features, DIALOG_STYLE_MSGBOX, ""white"dBox features", str, "Close", "");
  1143. SendCommands(playerid, "/features");
  1144. return 1;
  1145. }
  1146.  
  1147. YCMD:hh(playerid, params[], help)
  1148. {
  1149. new str[956];
  1150. if(pInfo[playerid][Helper] == 0) return SendClientMessage(playerid, COLOR_RED, Error_Helper);
  1151. strcat(str, ""white"RomHelp - Part of dBox system!\n\n");
  1152. strcat(str, "/accepthelp\t\t\t/denyhelp");
  1153. ShowPlayerDialog(playerid, HelperCmd, DIALOG_STYLE_MSGBOX, ""white"Helper Command", str, "Close", "");
  1154. SendCommands(playerid, "/hh");
  1155. return 1;
  1156. }
  1157.  
  1158. YCMD:helpme(playerid, params[], help)
  1159. {
  1160. new str[128];
  1161. new count = 0;
  1162. if(sscanf(params, "s[128]", params)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /helpme [question]");
  1163. format(str, sizeof(str), ""red"Question: "yellow"%s[%d] asks "white"'%s'", pName(playerid), playerid, params);
  1164. SendMsgToHelpers(str, -1);
  1165. SendMsgToHelpers("Helpers, /accepthelp to answer the question, or /denyhelp to deny the question", COLOR_YELLOW);
  1166. Help = 1;
  1167. Player = playerid;
  1168. for(new i = 0; i < MAX_PLAYERS; i++)
  1169. {
  1170. if(pInfo[i][Helper] == 1)
  1171. {
  1172. count++;
  1173. }
  1174. }
  1175. if(count >= 1)
  1176. {
  1177. format(str, sizeof(str), "Your question has been sent to %d Online Helpers!", count);
  1178. SendClientMessage(playerid, COLOR_ORANGE, str);
  1179. }
  1180. else if(count == 0)
  1181. {
  1182. SendClientMessage(playerid, COLOR_RED, "Your question will not be answer, There is no online helpers!");
  1183. }
  1184. SendCommands(playerid, "/helpme");
  1185. return 1;
  1186. }
  1187.  
  1188. YCMD:accepthelp(playerid, params[], help)
  1189. {
  1190. new str[128];
  1191. if(pInfo[playerid][Helper] == 0) return SendClientMessage(playerid, COLOR_RED, Error_Helper);
  1192. if(Help == 0) return SendClientMessage(playerid, COLOR_RED, "Error: There is no Question from Players!");
  1193. else
  1194. {
  1195. if(isnull(params)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /accepthelp [answer]");
  1196. if(IsPlayerConnected(Player))
  1197. {
  1198. format(str, sizeof(str), ""yellow"Helper "red"%s "white"answer your question", pName(playerid));
  1199. SendClientMessage(Player, -1, str);
  1200. format(str, sizeof(str), ""white"Answer: "yellow"Helper "red"%s: "white"%s", pName(playerid), params);
  1201. SendClientMessage(Player, -1, str);
  1202. format(str, sizeof(str), "You answer %s[%d]'s Question", pName(Player), Player);
  1203. SendClientMessage(playerid, COLOR_LIME, str);
  1204. Help = 0;
  1205. Player = -1;
  1206. SendCommands(playerid, "/accepthelp");
  1207. }
  1208. else return SendClientMessage(playerid, COLOR_RED, Error_Connected);
  1209. }
  1210. return 1;
  1211. }
  1212.  
  1213. YCMD:denyhelp(playerid, params[], help)
  1214. {
  1215. new str[128];
  1216. if(pInfo[playerid][Helper] == 0) return SendClientMessage(playerid, COLOR_RED, Error_Helper);
  1217. if(Help == 0) return SendClientMessage(playerid, COLOR_RED, "Error: There is no Question from Players!");
  1218. else
  1219. {
  1220. if(IsPlayerConnected(Player))
  1221. {
  1222. format(str, sizeof(str), ""yellow"Helper "red"%s deny "white"your Question", pName(playerid));
  1223. SendClientMessage(Player, -1, str);
  1224. format(str, sizeof(str), "You deny %s[%d]'s Question", pName(Player), Player);
  1225. SendClientMessage(playerid, COLOR_RED, str);
  1226. Help = 0;
  1227. Player = -1;
  1228. SendCommands(playerid, "/denyhelp");
  1229. }
  1230. else return SendClientMessage(playerid, COLOR_RED, Error_Connected);
  1231. }
  1232. return 1;
  1233. }
  1234.  
  1235. YCMD:ph(playerid, params[], help)
  1236. {
  1237. new str[956];
  1238. strcat(str, ""white"Dynamic Box Package Commands:\n\n");
  1239. strcat(str, "/vh\t\t\t/ph\t\t\t/features\n");
  1240. strcat(str, "/vips\t\t\t/helpers\t\t/hh\n");
  1241. strcat(str, "/helpme\t\t\t/vstats");
  1242. ShowPlayerDialog(playerid, PlayerCmd, DIALOG_STYLE_MSGBOX, ""white"Player Command", str, "Close", "");
  1243. SendCommands(playerid, "/ph");
  1244. return 1;
  1245. }
  1246.  
  1247. YCMD:vstats(playerid, params[], help)
  1248. {
  1249. new str[956], str2[956], string[1][71];
  1250. switch(pInfo[playerid][Helper])
  1251. {
  1252. case 0: string[0] = "No";
  1253. case 1: string[0] = "Yes";
  1254. }
  1255. switch(pInfo[playerid][Vip])
  1256. {
  1257. case 1: rank = set2[rank1];
  1258. case 2: rank = set2[rank2];
  1259. case 3: rank = set2[rank3];
  1260. }
  1261. format(str, sizeof(str), ""white"Name: "orange"%s\n"white"Helper?: "red"%s\n"white"VIP: "yellow"%s [Lvl: %d]\n"white"Warnings: "red"%d "white"out of "red"%d", pName(playerid), string[0], rank, pInfo[playerid][Vip], playerwarn[playerid], set2[swarn]);
  1262. strcat(str2, str);
  1263. ShowPlayerDialog(playerid, PlayerStats, DIALOG_STYLE_MSGBOX, ""white"Player Stats", str2, "Close", "");
  1264. SendCommands(playerid, "/vstats");
  1265. return 1;
  1266. }
  1267.  
  1268. YCMD:vips(playerid, params[], help)
  1269. {
  1270. #pragma unused help
  1271. new string[956];
  1272. new fstring[956];
  1273. new count = 0;
  1274. SendCommands(playerid, "/vips");
  1275. for(new i = 0; i < MAX_PLAYERS; i++)
  1276. {
  1277. if(pInfo[i][Vip] >= 1)
  1278. {
  1279. count++;
  1280. }
  1281. if(pInfo[i][Vip] == 1)
  1282. {
  1283. format(fstring, sizeof(fstring), ""yellow"%s[%d] "white"| "orange"Lvl [%d] | "red"%s\n", pName(i), i, pInfo[i][Vip], set2[rank1]);
  1284. strcat(string, fstring, 956);
  1285. }
  1286. else if(pInfo[i][Vip] == 2)
  1287. {
  1288. format(fstring, sizeof(fstring), ""yellow"%s[%d] "white"| "orange"Lvl [%d] | "red"%s\n", pName(i), i, pInfo[i][Vip], set2[rank2]);
  1289. strcat(string, fstring, 956);
  1290. }
  1291. else if(pInfo[i][Vip] == 3)
  1292. {
  1293. format(fstring, sizeof(fstring), ""yellow"%s[%d] "white"| "orange"Lvl [%d] | "red"%s\n", pName(i), i, pInfo[i][Vip], set2[rank3]);
  1294. strcat(string, fstring, 956);
  1295. }
  1296. }
  1297. if(count == 0) return ShowPlayerDialog(playerid, VipList, DIALOG_STYLE_MSGBOX, ""white"V.I.Ps", ""red"There is no current VIPs online!", "Close", "");
  1298. else
  1299. {
  1300. format(fstring, sizeof(fstring), "\r\n"white"Total V.I.Ps: %d", count);
  1301. strcat(string, fstring, 956);
  1302. ShowPlayerDialog(playerid, VipList, DIALOG_STYLE_MSGBOX, ""white"V.I.Ps", string, "Close", "");
  1303. }
  1304. return 1;
  1305. }
  1306.  
  1307. YCMD:helpers(playerid, params[], help)
  1308. {
  1309. #pragma unused help
  1310. new string[956];
  1311. new fstring[956];
  1312. new count = 0;
  1313. SendCommands(playerid, "/helpers");
  1314. for(new i = 0; i < MAX_PLAYERS; i++)
  1315. {
  1316. if(pInfo[i][Helper] >= 1)
  1317. {
  1318. count++;
  1319. format(fstring, sizeof(fstring), ""white"%s[%d]\n", pName(i), i);
  1320. strcat(string, fstring, 956);
  1321. }
  1322. }
  1323. if(count == 0) return ShowPlayerDialog(playerid, HelpList, DIALOG_STYLE_MSGBOX, ""white"Helpers", ""red"There is no current Helpers online!", "Close", "");
  1324. else
  1325. {
  1326. format(fstring, sizeof(fstring), "\r\n"white"Total Helpers: %d", count);
  1327. strcat(string, fstring, 956);
  1328. ShowPlayerDialog(playerid, HelpList, DIALOG_STYLE_MSGBOX, ""white"Helpers", string, "Close", "");
  1329. }
  1330. return 1;
  1331. }
  1332.  
  1333. YCMD:vh(playerid, params[], help)
  1334. {
  1335. #pragma unused help
  1336. new str[956], str2[956];
  1337. if(pInfo[playerid][Vip] == 0) return SendClientMessage(playerid, COLOR_RED, Error_Vip);
  1338. strcat(str, ""white"RomVip - Part of dBox system!\n\n");
  1339. strcat(str, ""orange"VIP Lvl 1\t\t\tVIP Lvl 2\t\t\tVIP Lvl 3\n");
  1340. strcat(str, ""red"/vsay\t\t\t\t/vheal\t\t\t\t/vkick\n");
  1341. strcat(str, "/varmour\t\t\t/vspec(off)\t\t\t/vslap\n");
  1342. strcat(str, "/vannounce\t\t\t/vgoto\t\t\t\t/vget\n");
  1343. strcat(str, "/vmyt\t\t\t\t/vipgod\t\t\t\t/vwarn\n");
  1344. strcat(str, "/vmyw\t\t\t\t/vmyint\t\t\t\t/vinfinite\n");
  1345. strcat(str, "/visland\t\t\t/vmyworld\t\t\t/car\n");
  1346. strcat(str, "/vsavskin\t\t\t/vdick\t\t\t\t/resetweapon\n");
  1347. strcat(str, "/vuseskin\t\t\t/stophold\t\t\t/vsp\n");
  1348. strcat(str, "/vduseskin\t\t\t/vdestroy\t\t\t/vlp\n");
  1349. strcat(str, "/vcar\t\t\t\t/vweap\t\t\t\t/vskin");
  1350. strcat(str, "\n/vbike\t\t\t\t/vr\t\t\t\t/vaddress\n");
  1351. strcat(str, "/vheli\t\t\t\t/vburn\n");
  1352. strcat(str, "/vboat\n");
  1353. strcat(str, "/vplane\n\n");
  1354. format(str2, 956, ""white"For VIP chat use symbol '{F2C80C}%s{FFFFFF}' before the message", set2[symbolchat]);
  1355. strcat(str, str2);
  1356. ShowPlayerDialog(playerid, VipCmd, DIALOG_STYLE_MSGBOX, ""white"VIP Help", str, "Close", "");
  1357. SendCommands(playerid, "/vh");
  1358. return 1;
  1359. }
  1360.  
  1361. YCMD:vr(playerid, params[], help)
  1362. {
  1363. if(pInfo[playerid][Vip] >= 2)
  1364. {
  1365. if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_RED, "Error: You are not riding in any vehicle!");
  1366. RepairVehicle(GetPlayerVehicleID(playerid));
  1367. SetVehicleHealth(GetPlayerVehicleID(playerid), 1000.0);
  1368. SendClientMessage(playerid, COLOR_ORANGE, "Your vehicle has been repaired!");
  1369. SendCommands(playerid, "/vr");
  1370. }
  1371. else return SendClientMessage(playerid, COLOR_RED, Error_Vip);
  1372. return 1;
  1373. }
  1374.  
  1375. YCMD:vburn(playerid, params[], help)
  1376. {
  1377. new Float:x, Float:y, Float:z;
  1378. if(pInfo[playerid][Vip] >= 2)
  1379. {
  1380. GetPlayerPos(playerid, x, y, z);
  1381. CreateExplosion(x, y, z, 7, 10.0);
  1382. SendClientMessage(playerid, COLOR_YELLOW, "UHH!!, HOT HOT HOT!");
  1383. SendCommands(playerid, "/vburn");
  1384. }
  1385. else return SendClientMessage(playerid, COLOR_RED, Error_Vip);
  1386. return 1;
  1387. }
  1388.  
  1389. YCMD:vweap(playerid, params[], help)
  1390. {
  1391. new weap, str[128], WeapName[32];
  1392. if(pInfo[playerid][Vip] >= 2)
  1393. {
  1394. if(sscanf(params, "i", weap)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /vweap [weaponid]");
  1395. if(weap == 19 || weap == 20 || weap == 21) return SendClientMessage(playerid, COLOR_RED, "Error: There is no weaponid for 19, 20 and 21!");
  1396. if(weap < 1 || weap > 47) return SendClientMessage(playerid, COLOR_RED, "Error: Invalid WeaponID!");
  1397. GetWeaponName(weap, WeapName, 32);
  1398. format(str, sizeof(str), "~w~%s(%d) ~g~for you!", WeapName, weap);
  1399. GameTextForPlayer(playerid, str, 4000, 3);
  1400. GivePlayerWeapon(playerid, weap, 99999);
  1401. format(str, sizeof(str), "You've spawned Weap %s[%d]", WeapName, weap);
  1402. SendClientMessage(playerid, COLOR_YELLOW, str);
  1403. SendCommands(playerid, "/vweap");
  1404. }
  1405. else return SendClientMessage(playerid, COLOR_RED, Error_Vip);
  1406. return 1;
  1407. }
  1408.  
  1409. YCMD:vspec(playerid, params[], help)
  1410. {
  1411. new str[128], id;
  1412. if(pInfo[playerid][Vip] >= 2)
  1413. {
  1414. if(sscanf(params, "u", id)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /spec [playerid]");
  1415. if(id == playerid) return SendClientMessage(playerid, COLOR_RED, Error_Self);
  1416. if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_RED, Error_Connected);
  1417. if(pInfo[playerid][Vip] < pInfo[id][Vip]) return SendClientMessage(playerid, COLOR_RED, Error_Higher);
  1418. if(IsSpecing[playerid] == 1) return SendClientMessage(playerid, COLOR_RED, "Error: You are already spectatiing someone, /specoff first");
  1419. if(GetPlayerState(id) == PLAYER_STATE_SPECTATING && spectatorid[id] != INVALID_PLAYER_ID)
  1420. return SendClientMessage(playerid, COLOR_RED, "Error: That player is current spectating someone!");
  1421. if(GetPlayerState(id) != 1 && GetPlayerState(id) != 2 && GetPlayerState(id) != 3)
  1422. return SendClientMessage(playerid, COLOR_RED, "Error: That player is not spawned");
  1423. StartSpectate(playerid, id);
  1424. format(str, sizeof(str), "Spec: You spectating %s(%d)", pName(id), id);
  1425. SendClientMessage(playerid, COLOR_ORANGE, str);
  1426. SendClientMessage(playerid, COLOR_YELLOW, "Use /specoff to turn off spectating");
  1427. SendClientMessage(playerid, -1, "Press Left or Right to change spectating!");
  1428. SendCommands(playerid, "/vspec");
  1429. }
  1430. else return SendClientMessage(playerid, COLOR_RED, Error_Vip);
  1431. return 1;
  1432. }
  1433.  
  1434. YCMD:vspecoff(playerid, params[], help)
  1435. {
  1436. if(pInfo[playerid][Vip] >= 2)
  1437. {
  1438. if(IsSpecing[playerid] == 0) return SendClientMessage(playerid, COLOR_RED, "Error: You are not spectating anyone");
  1439. StopSpectate(playerid);
  1440. SendClientMessage(playerid, COLOR_YELLOW, "You stop spectating");
  1441. SendCommands(playerid, "/vspecoff");
  1442. }
  1443. else return SendClientMessage(playerid, COLOR_RED, Error_Vip);
  1444. return 1;
  1445. }
  1446.  
  1447. YCMD:car(playerid, params[], help)
  1448. {
  1449. new string[128], vID[32], vVW, vINT, vid, Float:x, Float:y, Float:z, Float:ang, vehicle;
  1450. if(pInfo[playerid][Vip] >= 1)
  1451. {
  1452. if(GetPlayerState(playerid) == PLAYER_STATE_PASSENGER) return SendClientMessage(playerid, COLOR_RED, "Error: You cannot spawn vehicle while in passenger sit!");
  1453. if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_RED, "Error: You already have a vehicle");
  1454. if(sscanf(params, "s[32]", vID)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /vcar [vehicleid]");
  1455. if(isnumeric(vID)) vid = strval(vID);
  1456. else vid = GetVehicleModelIDFromName(vID);
  1457. GetPlayerPos(playerid, x, y, z);
  1458. GetPlayerFacingAngle(playerid, ang);
  1459. if(vid < 400 || vid > 611) return SendClientMessage(playerid, COLOR_RED, "Error: Invalid VehicleID (Name)");
  1460. vehicle = CreateVehicle(vid, x, y, z, 0, -1, -1, 0);
  1461. vVW = GetPlayerVirtualWorld(playerid);
  1462. vINT = GetPlayerInterior(playerid);
  1463. SetVehicleVirtualWorld(vehicle, vVW);
  1464. LinkVehicleToInterior(vehicle, vINT);
  1465. PutPlayerInVehicle(playerid, vehicle, 0);
  1466. format(string, sizeof(string), "You've spawned %s[%d] vehicle", VehicleName[vid - 400], vid);
  1467. SendClientMessage(playerid, COLOR_YELLOW, string);
  1468. SendCommands(playerid, "/car");
  1469. }
  1470. else return SendClientMessage(playerid, COLOR_RED, Error_Vip);
  1471. return 1;
  1472. }
  1473.  
  1474. YCMD:vdestroy(playerid, params[], help)
  1475. {
  1476. new Float:x, Float:y, Float:z;
  1477. GetPlayerPos(playerid, x, y, z);
  1478. if(pInfo[playerid][Vip] >= 1)
  1479. {
  1480. if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_RED, "Error: You aren't in any vehicle, Enter in a vehicle first!");
  1481. SetPlayerPos(playerid, x, y, z+2);
  1482. DestroyVehicle(GetPlayerVehicleID(playerid));
  1483. SendClientMessage(playerid, COLOR_ORANGE, "Vehicle Destroyed!");
  1484. SendCommands(playerid, "/vdestroy");
  1485. }
  1486. else return SendClientMessage(playerid, COLOR_RED, Error_Vip);
  1487. return 1;
  1488. }
  1489.  
  1490. YCMD:visland(playerid, params[], help)
  1491. {
  1492. if(GetPlayerState(playerid) != 1 && GetPlayerState(playerid) != 2 && GetPlayerState(playerid) != 3)
  1493. return SendClientMessage(playerid, COLOR_RED, "Error: You cannot teleport while you're not spawned");
  1494. if(pInfo[playerid][Vip] >= 1)
  1495. {
  1496. SendClientMessage(playerid, -1, "Credits to JellalKoayz for the map!");
  1497. SendClientMessage(playerid, COLOR_ORANGE, "VIP Island!");
  1498. RemovePlayerFromVehicle(playerid);
  1499. SetCameraBehindPlayer(playerid);
  1500. SetPlayerInterior(playerid, 0);
  1501. SetPlayerPos(playerid, -3946.2520,524.1570,21.1078);
  1502. SetPlayerFacingAngle(playerid, 229.1066);
  1503. SendCommands(playerid, "/visland");
  1504. }
  1505. else return SendClientMessage(playerid, COLOR_RED, Error_Vip);
  1506. return 1;
  1507. }
  1508.  
  1509. YCMD:vcar(playerid, params[], help)
  1510. {
  1511. new Float:x, Float:y, Float:z, Float:angle, str[128];
  1512. GetPlayerPos(playerid, x, y, z);
  1513. GetPlayerFacingAngle(playerid, angle);
  1514. if(pInfo[playerid][Vip] >= 1)
  1515. {
  1516. if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_RED, "Error: You already have a vehicle!");
  1517. VipVeh[playerid] = AddStaticVehicle(411, x, y, z, angle, -1, -1);
  1518. format(str, sizeof(str), "VIP Car Vehicle of\n%s(%d)", pName(playerid), playerid);
  1519. Delete3DTextLabel(VipV[playerid]);
  1520. VipV[playerid] = Create3DTextLabel(str, COLOR_ORANGE, 0.0, 0.0, 0.0, 50.0, 0, 1);
  1521. Attach3DTextLabelToVehicle(VipV[playerid], VipVeh[playerid], 0.0, 0.0, 0.0);
  1522. PutPlayerInVehicle(playerid, VipVeh[playerid], 0);
  1523. SendClientMessage(playerid, COLOR_LIME, "You spawn a VIP Private Car Vehicle!");
  1524. SendCommands(playerid, "/vcar");
  1525. }
  1526. else return SendClientMessage(playerid, COLOR_RED, Error_Vip);
  1527. return 1;
  1528. }
  1529.  
  1530. YCMD:vbike(playerid, params[], help)
  1531. {
  1532. new Float:x, Float:y, Float:z, Float:angle, str[128];
  1533. GetPlayerPos(playerid, x, y, z);
  1534. GetPlayerFacingAngle(playerid, angle);
  1535. if(pInfo[playerid][Vip] >= 1)
  1536. {
  1537. if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_RED, "Error: You already have a vehicle!");
  1538. VipVeh[playerid] = AddStaticVehicle(522, x, y, z, angle, -1, -1);
  1539. format(str, sizeof(str), "VIP Bike Vehicle of\n%s(%d)", pName(playerid), playerid);
  1540. Delete3DTextLabel(VipV[playerid]);
  1541. VipV[playerid] = Create3DTextLabel(str, COLOR_ORANGE, 0.0, 0.0, 0.0, 50.0, 0, 1);
  1542. Attach3DTextLabelToVehicle(VipV[playerid], VipVeh[playerid], 0.0, 0.0, 0.0);
  1543. PutPlayerInVehicle(playerid, VipVeh[playerid], 0);
  1544. SendClientMessage(playerid, COLOR_LIME, "You spawn a VIP Private Bike Vehicle!");
  1545. SendCommands(playerid, "/vbike");
  1546. }
  1547. else return SendClientMessage(playerid, COLOR_RED, Error_Vip);
  1548. return 1;
  1549. }
  1550.  
  1551. YCMD:vheli(playerid, params[], help)
  1552. {
  1553. new Float:x, Float:y, Float:z, Float:angle, str[128];
  1554. GetPlayerPos(playerid, x, y, z);
  1555. GetPlayerFacingAngle(playerid, angle);
  1556. if(pInfo[playerid][Vip] >= 1)
  1557. {
  1558. if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_RED, "Error: You already have a vehicle!");
  1559. VipVeh[playerid] = AddStaticVehicle(425, x, y, z, angle, -1, -1);
  1560. format(str, sizeof(str), "VIP Helicopter Vehicle of\n%s(%d)", pName(playerid), playerid);
  1561. Delete3DTextLabel(VipV[playerid]);
  1562. VipV[playerid] = Create3DTextLabel(str, COLOR_ORANGE, 0.0, 0.0, 0.0, 50.0, 0, 1);
  1563. Attach3DTextLabelToVehicle(VipV[playerid], VipVeh[playerid], 0.0, 0.0, 0.0);
  1564. PutPlayerInVehicle(playerid, VipVeh[playerid], 0);
  1565. SendClientMessage(playerid, COLOR_LIME, "You spawn a VIP Private Helicopter Vehicle!");
  1566. SendCommands(playerid, "/vheli");
  1567. }
  1568. else return SendClientMessage(playerid, COLOR_RED, Error_Vip);
  1569. return 1;
  1570. }
  1571.  
  1572. YCMD:vboat(playerid, params[], help)
  1573. {
  1574. new Float:x, Float:y, Float:z, Float:angle, str[128];
  1575. GetPlayerPos(playerid, x, y, z);
  1576. GetPlayerFacingAngle(playerid, angle);
  1577. if(pInfo[playerid][Vip] >= 1)
  1578. {
  1579. if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_RED, "Error: You already have a vehicle!");
  1580. VipVeh[playerid] = AddStaticVehicle(493, x, y, z, angle, -1, -1);
  1581. format(str, sizeof(str), "VIP Boat Vehicle of\n%s(%d)", pName(playerid), playerid);
  1582. Delete3DTextLabel(VipV[playerid]);
  1583. VipV[playerid] = Create3DTextLabel(str, COLOR_ORANGE, 0.0, 0.0, 0.0, 50.0, 0, 1);
  1584. Attach3DTextLabelToVehicle(VipV[playerid], VipVeh[playerid], 0.0, 0.0, 0.0);
  1585. PutPlayerInVehicle(playerid, VipVeh[playerid], 0);
  1586. SendClientMessage(playerid, COLOR_LIME, "You spawn a VIP Private Boat Vehicle!");
  1587. SendCommands(playerid, "/vboat");
  1588. }
  1589. else return SendClientMessage(playerid, COLOR_RED, Error_Vip);
  1590. return 1;
  1591. }
  1592.  
  1593. YCMD:vplane(playerid, params[], help)
  1594. {
  1595. new Float:x, Float:y, Float:z, Float:angle, str[128];
  1596. GetPlayerPos(playerid, x, y, z);
  1597. GetPlayerFacingAngle(playerid, angle);
  1598. if(pInfo[playerid][Vip] >= 1)
  1599. {
  1600. if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_RED, "Error: You already have a vehicle!");
  1601. VipVeh[playerid] = AddStaticVehicle(519, x, y, z, angle, -1, -1);
  1602. format(str, sizeof(str), "VIP Plane Vehicle of\n%s(%d)", pName(playerid), playerid);
  1603. Delete3DTextLabel(VipV[playerid]);
  1604. VipV[playerid] = Create3DTextLabel(str, COLOR_ORANGE, 0.0, 0.0, 0.0, 50.0, 0, 1);
  1605. Attach3DTextLabelToVehicle(VipV[playerid], VipVeh[playerid], 0.0, 0.0, 1.0);
  1606. PutPlayerInVehicle(playerid, VipVeh[playerid], 0);
  1607. SendClientMessage(playerid, COLOR_LIME, "You spawn a VIP Private Plane Vehicle!");
  1608. SendCommands(playerid, "/vplane");
  1609. }
  1610. else return SendClientMessage(playerid, COLOR_RED, Error_Vip);
  1611. return 1;
  1612. }
  1613.  
  1614. YCMD:vannounce(playerid, params[], help)
  1615. {
  1616. new str[128];
  1617. if(pInfo[playerid][Vip] >= 1)
  1618. {
  1619. if(sscanf(params, "s[128]", params)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /vannounce [text]");
  1620. format(str, sizeof(str), "%s", params);
  1621. GameTextForAll(str, 6000, 3);
  1622. SendCommands(playerid, "/vannounce");
  1623. }
  1624. else return SendClientMessage(playerid, COLOR_RED, Error_Vip);
  1625. return 1;
  1626. }
  1627.  
  1628. YCMD:vmyt(playerid, params[], help)
  1629. {
  1630. new str[128], id;
  1631. if(pInfo[playerid][Vip] >= 1)
  1632. {
  1633. if(sscanf(params, "i", id)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /vmyt [0 - 23]");
  1634. if(id < 0 || id > 23) return SendClientMessage(playerid, COLOR_RED, "Error: Invalid Time!");
  1635. format(str, sizeof(str), ""yellow"You set your time to "orange"%02d:00", id);
  1636. SendClientMessage(playerid, -1, str);
  1637. SetPlayerTime(playerid, id, 0);
  1638. SendCommands(playerid, "/vmyt");
  1639. }
  1640. else return SendClientMessage(playerid, COLOR_RED, Error_Vip);
  1641. return 1;
  1642. }
  1643.  
  1644. YCMD:vmyw(playerid, params[], help)
  1645. {
  1646. new str[128], id;
  1647. if(pInfo[playerid][Vip] >= 1)
  1648. {
  1649. if(sscanf(params, "i", id)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /vmyw [0 - 45]");
  1650. if(id < 0 || id > 45) return SendClientMessage(playerid, COLOR_RED, "Error: Invalid WeatherID!");
  1651. format(str, sizeof(str), ""yellow"You set your weather to "orange"%d", id);
  1652. SendClientMessage(playerid, -1, str);
  1653. SetPlayerWeather(playerid, id);
  1654. SendCommands(playerid, "/vmyw");
  1655. }
  1656. else return SendClientMessage(playerid, COLOR_RED, Error_Vip);
  1657. return 1;
  1658. }
  1659.  
  1660. YCMD:vdick(playerid, params[], help)
  1661. {
  1662. if(pInfo[playerid][Vip] >= 2)
  1663. {
  1664. for(new i = 0; i < 5; i++)
  1665. {
  1666. if(IsPlayerAttachedObjectSlotUsed(playerid, i))
  1667. {
  1668. RemovePlayerAttachedObject(playerid, i);
  1669. }
  1670. }
  1671. SetPlayerAttachedObject(playerid, 1, 19086, 8, -0.049768, -0.014062, -0.108385, 87.458297, 263.478149, 184.123764, 0.622413, 1.041609, 1.012785);
  1672. SendClientMessage(playerid, COLOR_YELLOW, "You have holded a "orange"dick!" );
  1673. SendClientMessage(playerid, COLOR_RED, "To stop holding please type "orange"/stophold!" );
  1674. SendCommands(playerid, "/vdick");
  1675. }
  1676. else return SendClientMessage(playerid, COLOR_RED, Error_Vip);
  1677. return 1;
  1678. }
  1679.  
  1680. YCMD:stophold(playerid, params[], help)
  1681. {
  1682. if(pInfo[playerid][Vip] >= 2)
  1683. {
  1684. if(!IsPlayerAttachedObjectSlotUsed(playerid, 1 )) return SendClientMessage(playerid, COLOR_RED, "Error: You are not holding any object" );
  1685. for(new i = 0; i < 5; i++)
  1686. {
  1687. if(IsPlayerAttachedObjectSlotUsed(playerid, i))
  1688. {
  1689. RemovePlayerAttachedObject( playerid, i );
  1690. }
  1691. }
  1692. SendCommands(playerid, "/stophold");
  1693. SendClientMessage(playerid, COLOR_RED, "You have stopped holding object!");
  1694. }
  1695. else return SendClientMessage(playerid, COLOR_RED, Error_Vip);
  1696. return 1;
  1697. }
  1698.  
  1699. YCMD:vmyint(playerid, params[], help)
  1700. {
  1701. new str[128], id;
  1702. if(pInfo[playerid][Vip] >= 2)
  1703. {
  1704. if(sscanf(params, "i", id)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /vmyint [interior]");
  1705. format(str, sizeof(str), "Interior set to Interior %d", id);
  1706. SendClientMessage(playerid, COLOR_YELLOW, str);
  1707. SetPlayerInterior(playerid, id);
  1708. SendCommands(playerid, "/vmyint");
  1709. }
  1710. else return SendClientMessage(playerid, COLOR_RED, Error_Vip);
  1711. return 1;
  1712. }
  1713.  
  1714. YCMD:vmyworld(playerid, params[], help)
  1715. {
  1716. new str[128], id;
  1717. if(pInfo[playerid][Vip] >= 2)
  1718. {
  1719. if(sscanf(params, "i", id)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /vmyworld [world]");
  1720. format(str, sizeof(str), "World set to Virtual World %d", id);
  1721. SendClientMessage(playerid, COLOR_YELLOW, str);
  1722. SetPlayerVirtualWorld(playerid, id);
  1723. SendCommands(playerid, "/vmyworld");
  1724. }
  1725. else return SendClientMessage(playerid, COLOR_RED, Error_Vip);
  1726. return 1;
  1727. }
  1728.  
  1729. YCMD:vipgod(playerid, params[], help)
  1730. {
  1731. if(pInfo[playerid][Vip] >= 2)
  1732. {
  1733. if(god[playerid] == 0)
  1734. {
  1735. SetPlayerHealth(playerid, INFINITE);
  1736. ResetPlayerWeapons(playerid);
  1737. god[playerid] = 1;
  1738. SendClientMessage(playerid, COLOR_LIME, "GOD MODE ON!");
  1739. }
  1740. else if(god[playerid] == 1)
  1741. {
  1742. SetPlayerHealth(playerid, 100.0);
  1743. SpawnPlayer(playerid);
  1744. god[playerid] = 0;
  1745. SendClientMessage(playerid, COLOR_YELLOW, "GOD MODE OFF!");
  1746. }
  1747. SendCommands(playerid, "/vipgod");
  1748. }
  1749. else return SendClientMessage(playerid, COLOR_RED, Error_Vip);
  1750. return 1;
  1751. }
  1752.  
  1753. YCMD:vgoto(playerid, params[], help)
  1754. {
  1755. new str[128], id;
  1756. new Float:x, Float:y, Float:z;
  1757. if(GetPlayerState(playerid) != 1 && GetPlayerState(playerid) != 2 && GetPlayerState(playerid) != 3)
  1758. return SendClientMessage(playerid, COLOR_RED, "Error: Not spawned, So you cannot use this command!");
  1759. if(pInfo[playerid][Vip] >= 2)
  1760. {
  1761. if(sscanf(params, "u", id)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /vgoto [playerid]");
  1762. if(id == playerid) return SendClientMessage(playerid, COLOR_RED, Error_Self);
  1763. if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_RED, Error_Connected);
  1764. GetPlayerPos(id, x, y, z);
  1765. format(str, sizeof(str), "GOTO: You have teleported to %s[%d] position!", pName(id), id);
  1766. SendClientMessage(playerid, COLOR_LIME, str);
  1767. format(str, sizeof(str), ""yellow"V-Goto: "orange"V.I.P. %s[%d] has teleport to your position!", pName(playerid), playerid);
  1768. SendClientMessage(id, -1, str);
  1769. SetPlayerInterior(playerid, GetPlayerInterior(id));
  1770. SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(id));
  1771. if(GetPlayerState(id) == PLAYER_STATE_DRIVER || GetPlayerState(id) == PLAYER_STATE_PASSENGER)
  1772. {
  1773. SetVehiclePos(GetPlayerVehicleID(playerid), x+3, y, z);
  1774. LinkVehicleToInterior(GetPlayerVehicleID(playerid), GetPlayerInterior(id));
  1775. SetVehicleVirtualWorld(GetPlayerVehicleID(playerid), GetPlayerVirtualWorld(id));
  1776. }
  1777. else SetPlayerPos(playerid, x+2, y, z);
  1778. SendCommands(playerid, "/vgoto");
  1779. }
  1780. else return SendClientMessage(playerid, COLOR_RED, Error_Vip);
  1781. return 1;
  1782. }
  1783.  
  1784. YCMD:vaddress(playerid, params[], help)
  1785. {
  1786. new str[128], id, ip[20];
  1787. if(pInfo[playerid][Vip] >= 3)
  1788. {
  1789. if(sscanf(params, "u", id)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /vaddress [playerid]");
  1790. if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_RED, Error_Connected);
  1791. GetPlayerIp(playerid, ip, 20);
  1792. format(str, sizeof(str), "IP: %s[%d] Ip Address: %s", pName(id), id, ip);
  1793. SendClientMessage(playerid, COLOR_YELLOW, str);
  1794. SendCommands(playerid, "/vaddress");
  1795. }
  1796. else return SendClientMessage(playerid, COLOR_RED, Error_Vip);
  1797. return 1;
  1798. }
  1799.  
  1800. YCMD:vinfinite(playerid, params[], help)
  1801. {
  1802. if(pInfo[playerid][Vip] >= 3)
  1803. {
  1804. new slot, weap, ammo;
  1805. for (slot = 0; slot < 14; slot++)
  1806. {
  1807. GetPlayerWeaponData(playerid, slot, weap, ammo);
  1808. if(weap > 0 && weap < 19 || weap > 21 && weap < 47)
  1809. {
  1810. GivePlayerWeapon(playerid, weap, 99999);
  1811. }
  1812. }
  1813. SendCommands(playerid, "/vinfinite");
  1814. SendClientMessage(playerid, COLOR_YELLOW, "Ammos' of the Weapon are now infinite!");
  1815. }
  1816. else return SendClientMessage(playerid, COLOR_RED, Error_Vip);
  1817. return 1;
  1818. }
  1819.  
  1820. YCMD:vwarn(playerid, params[], help)
  1821. {
  1822. new str[128], id, reason[128];
  1823. if(pInfo[playerid][Vip] >= 3)
  1824. {
  1825. if(sscanf(params, "us[128]", id, reason)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /warn [playerid] [reason]");
  1826. if(id == playerid) return SendClientMessage(playerid, COLOR_RED, Error_Self);
  1827. if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_RED, Error_Connected);
  1828. if(pInfo[playerid][Vip] < pInfo[id][Vip]) return SendClientMessage(playerid, COLOR_RED, Error_Higher);
  1829. playerwarn[playerid] += 1;
  1830. if(playerwarn[id] == set2[swarn])
  1831. {
  1832. format(str, sizeof(str), ""yellow"V-KICK: "red"%s[%d] has been kicked [Reason: Reach the Maxium Warnings!]", pName(id), id);
  1833. SendClientMessageToAll(-1, str);
  1834. SendClientMessage(id, COLOR_ORANGE, ""yellow"V-KICK: "red"You've been kicked [Reason: Reach the Maxium Warnings!]");
  1835. return Kick(id);
  1836. }
  1837. format(str, sizeof(str), ""yellow"V-Warn: "red"V.I.P. %s[%d] warns %s[%d] [Reason: %s] [Warnings: %d/%d]", pName(playerid), playerid, pName(id), id, reason, playerwarn[id], set2[swarn]);
  1838. SendClientMessageToAll(COLOR_YELLOW, str);
  1839. format(str, sizeof(str), "WARN: You warn %s[%d] [Reason: %s] [Warnings: %d/%d]", pName(id), id, reason, playerwarn[id], set2[swarn]);
  1840. SendClientMessage(playerid, COLOR_RED, str);
  1841. format(str, sizeof(str), ""yellow"V-Warn: "red"V.I.P. %s[%d] warns you [Reason: %s] [Warnings: %d/%d]", pName(playerid), playerid, reason, playerwarn[id], set2[swarn]);
  1842. SendClientMessage(id, -1, str);
  1843. SendCommands(playerid, "/vwarn");
  1844. }
  1845. else return SendClientMessage(playerid, COLOR_RED, Error_Vip);
  1846. return 1;
  1847. }
  1848.  
  1849. YCMD:vget(playerid, params[], help)
  1850. {
  1851. new str[128], id;
  1852. if(pInfo[playerid][Vip] >= 3)
  1853. {
  1854. if(sscanf(params, "u", id)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /vget [playerid]");
  1855. if(id == playerid) return SendClientMessage(playerid, COLOR_RED, Error_Self);
  1856. if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_RED, Error_Connected);
  1857. new Float:x, Float:y, Float:z;
  1858. GetPlayerPos(playerid, x, y, z);
  1859. SetPlayerInterior(id, GetPlayerInterior(playerid));
  1860. SetPlayerVirtualWorld(id, GetPlayerVirtualWorld(playerid));
  1861. if(GetPlayerState(id) == PLAYER_STATE_DRIVER || GetPlayerState(id) == PLAYER_STATE_PASSENGER)
  1862. {
  1863. new VehicleID = GetPlayerVehicleID(id);
  1864. SetVehiclePos(VehicleID, x+3, y, z);
  1865. LinkVehicleToInterior(VehicleID, GetPlayerInterior(playerid));
  1866. SetVehicleVirtualWorld(GetPlayerVehicleID(id), GetPlayerVirtualWorld(playerid));
  1867. }
  1868. else SetPlayerPos(id, x+2, y, z);
  1869. format(str, sizeof(str), ""orange"V-Get: "red"V.I.P. %s[%d] "yellow"has get you and put you in his position!", pName(playerid), playerid);
  1870. SendClientMessage(id, -1, str);
  1871. format(str, sizeof(str), "GET: You get %s[%d] and put him in your position", pName(id), id);
  1872. SendClientMessage(playerid, COLOR_YELLOW, str);
  1873. SendCommands(playerid, "/vget");
  1874. }
  1875. else return SendClientMessage(playerid, COLOR_RED, Error_Vip);
  1876. return 1;
  1877. }
  1878.  
  1879. YCMD:vslap(playerid, params[], help)
  1880. {
  1881. #pragma unused help
  1882. new Float:x, Float:y, Float:z, Float:health;
  1883. new str[128], id, reason[128];
  1884. if(pInfo[playerid][Vip] >= 3)
  1885. {
  1886. if(sscanf(params, "us[128]", id, reason)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /slap [playerid] [reason]");
  1887. if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_RED, Error_Connected);
  1888. if(pInfo[playerid][Vip] < pInfo[id][Vip]) return SendClientMessage(playerid, COLOR_RED, Error_Higher);
  1889. GetPlayerPos(id, x, y, z);
  1890. GetPlayerHealth(id, health);
  1891. SetPlayerHealth(id, health-25);
  1892. SetPlayerPos(id, x, y, z+5);
  1893. format(str, sizeof(str), "SLAP: You slap %s[%d] [Reason: %s]", pName(id), id, reason);
  1894. SendClientMessage(playerid, COLOR_YELLOW, str);
  1895. format(str, sizeof(str), ""red"V-Slap: "yellow"You have been slap by "red"V.I.P. %s[%d] [Reason: %s]", pName(playerid), playerid, reason);
  1896. SendClientMessage(id, -1, str);
  1897. PlayerPlaySound(playerid, 1190, 0.0, 0.0, 0.0);
  1898. PlayerPlaySound(id, 1190, 0.0, 0.0, 0.0);
  1899. SendCommands(playerid, "/vslap");
  1900. }
  1901. else return SendClientMessage(playerid, COLOR_RED, Error_Vip);
  1902. return 1;
  1903. }
  1904.  
  1905. YCMD:vkick(playerid, params[], help)
  1906. {
  1907. #pragma unused help
  1908. new string[128], id, reason[128];
  1909. if(pInfo[playerid][Vip] >= 3)
  1910. {
  1911. if(sscanf(params, "us[128]", id, reason)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /kick [playerid] [reason]");
  1912. if(id == playerid) return SendClientMessage(playerid, COLOR_RED, Error_Self);
  1913. if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_RED, Error_Connected);
  1914. if(pInfo[playerid][Vip] < pInfo[id][Vip]) return SendClientMessage(playerid, COLOR_RED, Error_Higher);
  1915. format(string, sizeof(string), "KICK: You kicked %s[%d] [Reason: %s]", pName(id), id, reason);
  1916. SendClientMessage(playerid, COLOR_RED, string);
  1917. format(string, sizeof(string), ""white"V-Kick: "yellow"%s[%d] has been "red"kicked "white"by "yellow"V.I.P. %s[%d] [Reason: %s]", pName(id), id, pName(playerid), playerid, reason);
  1918. SendClientMessageToAll(-1, string);
  1919. format(string, sizeof(string), ""red"V-Kick: You have been kicked by "yellow"V.I.P. %s[%d] [Reason: %s]", pName(playerid), playerid, reason);
  1920. SendClientMessage(id, COLOR_ORANGE, string);
  1921. SendCommands(playerid, "/vkick");
  1922. Kick(id);
  1923. }
  1924. else return SendClientMessage(playerid, COLOR_RED, Error_Vip);
  1925. return 1;
  1926. }
  1927.  
  1928. YCMD:vsp(playerid, params[], help)
  1929. {
  1930. #pragma unused help
  1931. if(pInfo[playerid][Vip] >= 3)
  1932. {
  1933. new Float:x, Float:y, Float:z, Float:a;
  1934. new i = GetPlayerInterior(playerid);
  1935. new w = GetPlayerVirtualWorld(playerid);
  1936. GetPlayerPos(playerid, x, y, z);
  1937. pInfo[playerid][vX] = x; pInfo[playerid][vY] = y; pInfo[playerid][vZ] = z;
  1938. pInfo[playerid][vI] = i; pInfo[playerid][vW] = w; pInfo[playerid][vA] = a;
  1939. SendClientMessage(playerid, COLOR_LIME, "Position saved!");
  1940. SendCommands(playerid, "/vsp");
  1941. }
  1942. else return SendClientMessage(playerid, COLOR_RED, Error_Vip);
  1943. return 1;
  1944. }
  1945.  
  1946. YCMD:vlp(playerid, params[], help)
  1947. {
  1948. #pragma unused help
  1949. if(pInfo[playerid][Vip] >= 3)
  1950. {
  1951. if(pInfo[playerid][vX] == 0.0 && pInfo[playerid][vY] == 0.0 && pInfo[playerid][vZ] == 0.0 && pInfo[playerid][vA] == 0.0) return SendClientMessage(playerid, COLOR_RED, "Error: You haven't saved any positions!");
  1952. SetCameraBehindPlayer(playerid);
  1953. SetPlayerPos(playerid, pInfo[playerid][vX], pInfo[playerid][vY], pInfo[playerid][vZ]);
  1954. SetPlayerFacingAngle(playerid, pInfo[playerid][vA]);
  1955. SetPlayerVirtualWorld(playerid, pInfo[playerid][vW]);
  1956. SetPlayerInterior(playerid, pInfo[playerid][vI]);
  1957. SendClientMessage(playerid, COLOR_YELLOW, "Position loaded!");
  1958. SendCommands(playerid, "/vlp");
  1959. }
  1960. else return SendClientMessage(playerid, COLOR_RED, Error_Vip);
  1961. return 1;
  1962. }
  1963.  
  1964. YCMD:resetweapons(playerid, params[], help)
  1965. {
  1966. #pragma unused help
  1967. if(pInfo[playerid][Vip] >= 3)
  1968. {
  1969. ResetPlayerWeapons(playerid);
  1970. SendClientMessage(playerid, COLOR_ORANGE, "Weapon resetted!");
  1971. SendCommands(playerid, "/resetweapons");
  1972. }
  1973. else return SendClientMessage(playerid, COLOR_RED, Error_Vip);
  1974. return 1;
  1975. }
  1976.  
  1977. YCMD:vsaveskin(playerid, params[], help)
  1978. {
  1979. #pragma unused help
  1980. if(pInfo[playerid][Vip] == 0) return SendClientMessage(playerid, COLOR_RED, Error_Vip);
  1981. pInfo[playerid][FavSkin] = GetPlayerSkin(playerid);
  1982. SendClientMessage(playerid, COLOR_ORANGE, "You've save your current skin as your favorite VIP skin!");
  1983. SendClientMessage(playerid, COLOR_YELLOW, "use /vuseskin to use it!");
  1984. SendCommands(playerid, "/vsaveskin");
  1985. return 1;
  1986. }
  1987.  
  1988. YCMD:vuseskin(playerid, params[], help)
  1989. {
  1990. #pragma unused help
  1991. if(pInfo[playerid][Vip] == 0) return SendClientMessage(playerid, COLOR_RED, Error_Vip);
  1992. if(pInfo[playerid][FavSkin] <= -1) return SendClientMessage(playerid, COLOR_RED, "Error: You don't have any saved skins!");
  1993. if(pInfo[playerid][UseSkin] == 1 && pInfo[playerid][FavSkin] == GetPlayerSkin(playerid)) return SendClientMessage(playerid, COLOR_RED, "Error: You're already using your saved skin!");
  1994. SendClientMessage(playerid, COLOR_ORANGE, "You've used your save VIP skin!");
  1995. SendClientMessage(playerid, COLOR_YELLOW, "use /vduseskin to don't use it!");
  1996. pInfo[playerid][UseSkin] = 1;
  1997. SetPlayerSkin(playerid, pInfo[playerid][FavSkin]);
  1998. SendCommands(playerid, "/vuseskin");
  1999. return 1;
  2000. }
  2001.  
  2002. YCMD:vduseskin(playerid, params[], help)
  2003. {
  2004. #pragma unused help
  2005. if(pInfo[playerid][Vip] == 0) return SendClientMessage(playerid, COLOR_RED, Error_Vip);
  2006. if(pInfo[playerid][FavSkin] >= -1) return SendClientMessage(playerid, COLOR_RED, "Error: You don't have any saved skins!");
  2007. if(pInfo[playerid][UseSkin] == 1 && pInfo[playerid][FavSkin] == GetPlayerSkin(playerid))
  2008. {
  2009. SendClientMessage(playerid, COLOR_ORANGE, "You've stop using your save VIP skin!");
  2010. SendClientMessage(playerid, COLOR_YELLOW, "use /vuseskin to use it again!");
  2011. pInfo[playerid][UseSkin] = 0;
  2012. SetPlayerSkin(playerid, 0);
  2013. SendCommands(playerid, "/vduseskin");
  2014. }
  2015. else return SendClientMessage(playerid, COLOR_RED, "Error: You're not using your saved skin anymore!");
  2016. return 1;
  2017. }
  2018.  
  2019. YCMD:vsay(playerid, params[], help)
  2020. {
  2021. #pragma unused help
  2022. new str[128];
  2023. if(pInfo[playerid][Vip] == 0) return SendClientMessage(playerid, COLOR_RED, Error_Vip);
  2024. if(isnull(params)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /vsay [text]");
  2025. format(str, sizeof(str), ""red"Vip "yellow"%s: "white"%s", pName(playerid), params);
  2026. SendClientMessageToAll(-1, str);
  2027. SendCommands(playerid, "/vsay");
  2028. return 1;
  2029. }
  2030.  
  2031. YCMD:varmour(playerid, params[], help)
  2032. {
  2033. #pragma unused help
  2034. if(pInfo[playerid][Vip] == 0) return SendClientMessage(playerid, COLOR_RED, Error_Vip);
  2035. SetPlayerArmour(playerid, 100.0);
  2036. SendClientMessage(playerid, COLOR_LIME, "Your armour has been refilled!");
  2037. SendCommands(playerid, "/varmour");
  2038. return 1;
  2039. }
  2040.  
  2041. YCMD:vheal(playerid, params[], help)
  2042. {
  2043. #pragma unused help
  2044. if(pInfo[playerid][Vip] >= 2)
  2045. {
  2046. SetPlayerHealth(playerid, 100.0);
  2047. SendClientMessage(playerid, COLOR_LIME, "You have been healed!");
  2048. SendCommands(playerid, "/vheal");
  2049. }
  2050. else return SendClientMessage(playerid, COLOR_RED, Error_Vip);
  2051. return 1;
  2052. }
  2053.  
  2054. YCMD:vskin(playerid, params[], help)
  2055. {
  2056. #pragma unused help
  2057. new skin;
  2058. if(pInfo[playerid][Vip] >= 3)
  2059. {
  2060. if(sscanf(params, "i", skin)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /vskin [0 - 299]");
  2061. if(skin < 0 || skin > 299) return SendClientMessage(playerid, COLOR_RED, "Error: You cannot use invalid skin IDs!");
  2062. SetPlayerSkin(playerid, skin);
  2063. SendClientMessage(playerid, COLOR_LIME, "Your skin has been changed to what you want!");
  2064. SendCommands(playerid, "/vskin");
  2065. }
  2066. else return SendClientMessage(playerid, COLOR_RED, Error_Vip);
  2067. return 1;
  2068. }
  2069.  
  2070. YCMD:setvip(playerid, params[], help)
  2071. {
  2072. #pragma unused help
  2073. new str[128], id, vip;
  2074. if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_ORANGE, "Invalid: You're not allowed to use this command!");
  2075. if(sscanf(params, "ui", id, vip)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /setvip [playerid] [0 - 3]");
  2076. if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_RED, Error_Connected);
  2077. if(vip < 0 || vip > MAX_VIP_LVL) return SendClientMessage(playerid, COLOR_RED, "Error: You cannot set player to invalid VIP Level!");
  2078. if(vip == pInfo[id][Vip]) return SendClientMessage(playerid, COLOR_RED, "Error: That player is already in that Vip Level!");
  2079. if(pInfo[id][Vip] > vip) GameTextForPlayer(id, "~r~Demoted", 3000, 3);
  2080. if(pInfo[id][Vip] < vip) GameTextForPlayer(id, "~g~Promoted", 3000, 3);
  2081. pInfo[id][Vip] = vip;
  2082. if(pInfo[id][Vip] == 0)
  2083. {
  2084. format(str, sizeof(str), "Congratulations!, "yellow"RCON %s[%d] "white"set you to "yellow"VIP Level %d - Player", pName(playerid), playerid, vip);
  2085. SendClientMessage(id, -1, str);
  2086. format(str, sizeof(str), ""yellow"You set "white"%s[%d] to "yellow"VIP Level %d - Player", pName(id), id, vip);
  2087. SendClientMessage(playerid, -1, str);
  2088. }
  2089. else if(pInfo[id][Vip] == 1)
  2090. {
  2091. format(str, sizeof(str), "Congratulations!, "yellow"RCON %s[%d] "white"set you to "yellow"VIP Level %d - %s", pName(playerid), playerid, vip, set2[rank1]);
  2092. SendClientMessage(id, -1, str);
  2093. format(str, sizeof(str), ""yellow"You set "white"%s[%d] to "yellow"VIP Level %d - %s", pName(id), id, vip, set2[rank1]);
  2094. SendClientMessage(playerid, -1, str);
  2095. }
  2096. else if(pInfo[id][Vip] == 2)
  2097. {
  2098. format(str, sizeof(str), "Congratulations!, "yellow"RCON %s[%d] "white"set you to "yellow"VIP Level %d - %s", pName(playerid), playerid, vip, set2[rank2]);
  2099. SendClientMessage(id, -1, str);
  2100. format(str, sizeof(str), ""yellow"You set "white"%s[%d] to "yellow"VIP Level %d - %s", pName(id), id, vip, set2[rank2]);
  2101. SendClientMessage(playerid, -1, str);
  2102. }
  2103. else if(pInfo[id][Vip] == 3)
  2104. {
  2105. format(str, sizeof(str), "Congratulations!, "yellow"RCON %s[%d] "white"set you to "yellow"VIP Level %d - %s", pName(playerid), playerid, vip, set2[rank3]);
  2106. SendClientMessage(id, -1, str);
  2107. format(str, sizeof(str), ""yellow"You set "white"%s[%d] to "yellow"VIP Level %d - %s", pName(id), id, vip, set2[rank3]);
  2108. SendClientMessage(playerid, -1, str);
  2109. }
  2110. SendCommands(playerid, "/setvip");
  2111. return 1;
  2112. }
  2113.  
  2114. YCMD:makehelper(playerid, params[], help)
  2115. {
  2116. #pragma unused help
  2117. new str[128], id;
  2118. if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_ORANGE, "Invalid: You're not allowed to use this command!");
  2119. if(sscanf(params, "u", id)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /makehelper [playerid]");
  2120. if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_RED, Error_Connected);
  2121. pInfo[id][Helper] = 1;
  2122. format(str, sizeof(str), "Congratulations!, "yellow"RCON %s[%d] "white"set you to become "yellow"Helper", pName(playerid), playerid);
  2123. SendClientMessage(id, -1, str);
  2124. format(str, sizeof(str), ""yellow"You set "white"%s[%d] to become "yellow"Helper", pName(id), id);
  2125. SendClientMessage(playerid, -1, str);
  2126. GameTextForPlayer(id, "~g~Promoted", 3000, 3);
  2127. SendCommands(playerid, "/makehelper");
  2128. return 1;
  2129. }
  2130.  
  2131. YCMD:demotehelper(playerid, params[], help)
  2132. {
  2133. #pragma unused help
  2134. new str[128], id;
  2135. if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_ORANGE, "Invalid: You're not allowed to use this command!");
  2136. if(sscanf(params, "u", id)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /demotehelper [playerid]");
  2137. if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_RED, Error_Connected);
  2138. pInfo[id][Helper] = 0;
  2139. format(str, sizeof(str), "Congratulations!, "yellow"RCON %s[%d] "white"demote you from your "yellow"Helper Rank", pName(playerid), playerid);
  2140. SendClientMessage(id, -1, str);
  2141. format(str, sizeof(str), ""yellow"You set "white"%s[%d] demote you from your "yellow"Helper Rank", pName(id), id);
  2142. SendClientMessage(playerid, -1, str);
  2143. GameTextForPlayer(id, "~r~Demoted", 3000, 3);
  2144. SendCommands(playerid, "/demotehelper");
  2145. return 1;
  2146. }
  2147.  
  2148. YCMD:startquestion(playerid, params[], help)
  2149. {
  2150. #pragma unused help
  2151. new str[128];
  2152. if(set2[typeq] == 0) return SendClientMessage(playerid, COLOR_ORANGE, "Invalid: This command is disabled by Dynamic Box Package!");
  2153. if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_ORANGE, "Invalid: You're not allowed to use this command!");
  2154. if(Starts == true) return SendClientMessage(playerid, COLOR_ORANGE, "ERROR: There is current contest starting, Please wait...");
  2155. if(sscanf(params, "p<,>s[128]s[128]", question, targetanswer)) return SendClientMessage(playerid, COLOR_YELLOW, "USAGE: /startquestion [question] [answer]");
  2156. format(str, sizeof(str), "QUESTION: '%s', First who answer it gets '$%d + %d score'", question, set2[prize], set2[prizescore]);
  2157. SendClientMessageToAll(COLOR_YELLOW, str);
  2158. SendClientMessageToAll(-1, "QUESTION: You only have 30 seconds to answer it");
  2159. SendClientMessage(playerid, -1, "Question has been started, The question timer will end about 30 seconds");
  2160. Starts = true;
  2161. TypeGame = 0;
  2162. Timer = SetTimer("KillTest", set2[questiontime], false);
  2163. return 1;
  2164. }
  2165.  
  2166. YCMD:starttype(playerid, params[], help)
  2167. {
  2168. #pragma unused help
  2169. new str[128];
  2170. if(set2[typeq] == 0) return SendClientMessage(playerid, COLOR_ORANGE, "Invalid: This command is disabled by Dynamic Box Package!");
  2171. if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_ORANGE, "Invalid: You're not allowed to use this command!");
  2172. if(Starts == true) return SendClientMessage(playerid, COLOR_ORANGE, "ERROR: There is current contest starting, Please wait...");
  2173. if(sscanf(params, "s[128]", targetword)) return SendClientMessage(playerid, COLOR_YELLOW, "USAGE: /starttype [word]");
  2174. format(str, sizeof(str), "REACTION: First who types '%s', gets '$%d + %d score'", targetword, set2[prize], set2[prizescore]);
  2175. SendClientMessageToAll(COLOR_YELLOW, str);
  2176. SendClientMessageToAll(-1, "QUESTION: You only have 30 seconds to answer it");
  2177. SendClientMessage(playerid, -1, "Question has been started, The type timer will end about 30 seconds");
  2178. Starts = true;
  2179. TypeGame = 1;
  2180. Timer = SetTimer("KillTest", set2[typetime], false);
  2181. return 1;
  2182. }
  2183.  
  2184. YCMD:dsettings(playerid, params[], help)
  2185. {
  2186. #pragma unused help
  2187. new str[956];
  2188. if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_ORANGE, "Invalid: You're not allowed to use this command!");
  2189. format(str, sizeof(str), "We got A-Spam/Forbid Word [On/Off]\nTyping-Question Test [On/Off]\nRomVip [On/Off]");
  2190. ShowPlayerDialog(playerid, dbox, DIALOG_STYLE_LIST, "{FFFFFF}Configuration for Dynamic Box", str, "Edit", "Close");
  2191. return 1;
  2192. }
  2193.  
  2194. //==============================================================================
  2195.  
  2196. public loadfiles(name[], value[])
  2197. {
  2198. INI_Int("TypeQuestion", set2[typeq]);
  2199. INI_Int("SystemSpam", set2[wgasfw]);
  2200. INI_Int("ASpam", set2[spam]);
  2201. INI_Int("SpamWarn", set2[swarn]);
  2202. INI_Int("SpamWait", set2[sms]);
  2203. INI_Int("ForbidWord", set2[forbidword]);
  2204. INI_Int("QuestionMs", set2[questiontime]);
  2205. INI_Int("TypingMs", set2[typetime]);
  2206. INI_Int("PrizeMoney", set2[prize]);
  2207. INI_Int("PrizeScore", set2[prizescore]);
  2208. INI_String("Rank1", set2[rank1], 100);
  2209. INI_String("Rank2", set2[rank2], 100);
  2210. INI_String("Rank3", set2[rank3], 100);
  2211. INI_String("ChatSymbol", set2[symbolchat], 5);
  2212. INI_Int("ReadCmd", set2[readcmd]);
  2213. return 1;
  2214. }
  2215.  
  2216. stock SaveSettings()
  2217. {
  2218. new file[256];
  2219. format(file, sizeof(file), "%s/%s", ConfigPath, SettingsSpam);
  2220. new INI:File = INI_Open(file);
  2221. INI_SetTag(File, "Settings");
  2222. INI_WriteInt(File, "TypeQuestion", set2[typeq]);
  2223. INI_WriteInt(File, "SystemSpam", set2[wgasfw]);
  2224. INI_WriteInt(File, "ASpam", set2[spam]);
  2225. INI_WriteInt(File, "SpamWarn", set2[swarn]);
  2226. INI_WriteInt(File, "SpamWait", set2[sms]);
  2227. INI_WriteInt(File, "ForbidWord", set2[forbidword]);
  2228. INI_WriteInt(File, "QuestionMs", set2[questiontime]);
  2229. INI_WriteInt(File, "TypingMs", set2[typetime]);
  2230. INI_WriteInt(File, "PrizeMoney", set2[prize]);
  2231. INI_WriteInt(File, "PrizeScore", set2[prizescore]);
  2232. INI_WriteInt(File, "ReadCmd", set2[readcmd]);
  2233. INI_Close(File);
  2234. print("[FS]: Now saving the config base on the store results from the variables");
  2235. return 1;
  2236. }
  2237.  
  2238. stock LoadSettings()
  2239. {
  2240. new file[256], File:file2, file3[256], string[100],
  2241. File:file4;
  2242. format(file, sizeof(file), ConfigPath);
  2243. word = 0;
  2244. format(file3, sizeof(file3), "%s/%s", ConfigPath, SettingsSpam);
  2245. if(!fexist(file3))
  2246. {
  2247. print("[FS]: You don't have the configuration, We created it automatically for you");
  2248. print("[FS]: Note the config that we created are in default mode");
  2249. set2[spam] = 1;
  2250. set2[forbidword] = 1;
  2251. set2[swarn] = 3;
  2252. set2[sms] = 4000;
  2253. set2[typetime] = 1000*30;
  2254. set2[questiontime] = 1000*30;
  2255. set2[prize] = 1000;
  2256. set2[prizescore] = 5;
  2257. set2[wgasfw] = 1;
  2258. set2[typeq] = 1;
  2259. set2[readcmd] = 1;
  2260. new INI:File = INI_Open(file3);
  2261. INI_SetTag(File, "Settings");
  2262. INI_WriteInt(File, "TypeQuestion", set2[typeq]);
  2263. INI_WriteInt(File, "SystemSpam", set2[wgasfw]);
  2264. INI_WriteInt(File, "ASpam", set2[spam]);
  2265. INI_WriteInt(File, "SpamWarn", set2[swarn]);
  2266. INI_WriteInt(File, "SpamWait", set2[sms]);
  2267. INI_WriteInt(File, "ForbidWord", set2[forbidword]);
  2268. INI_WriteInt(File, "QuestionMs", set2[questiontime]);
  2269. INI_WriteInt(File, "TypingMs", set2[typetime]);
  2270. INI_WriteInt(File, "PrizeMoney", set2[prize]);
  2271. INI_WriteInt(File, "PrizeScore", set2[prizescore]);
  2272. INI_WriteString(File, "Rank1", "Silver VIP");
  2273. INI_WriteString(File, "Rank2", "Gold VIP");
  2274. INI_WriteString(File, "Rank3", "Premium VIP");
  2275. INI_WriteString(File, "ChatSymbol", "!");
  2276. INI_WriteInt(File, "ReadCmd", set2[readcmd]);
  2277. INI_Close(File);
  2278. format(file3, sizeof(file3), "%s/%s", ConfigPath, SettingsWords);
  2279. file4 = fopen(file3, io_append);
  2280. fwrite(file4, " ");
  2281. fclose(file4);
  2282. }
  2283. else if(fexist(file3))
  2284. {
  2285. format(file3, sizeof(file3), "%s/%s", ConfigPath, SettingsSpam);
  2286. INI_ParseFile(file3, "loadfiles", .bExtra = false);
  2287. print("[FS]: Configuration loaded from the files");
  2288. print("[FS]: Y_INI INI_ParseFile called!");
  2289. }
  2290. format(file3, sizeof(file3), "%s/%s", ConfigPath, SettingsWords);
  2291. if((file2 = fopen(file3, io_read)))
  2292. {
  2293. while(fread(file2, string))
  2294. {
  2295. for(new i = 0, j = strlen(string); i < j; i++) if(string[i] == '\n' || string[i] == '\r') string[i] = '\0';
  2296. ForbiddenWords[word] = string;
  2297. word++;
  2298. }
  2299. fclose(file2);
  2300. printf("[FS]: %i Forbidden Words - Stored in our folder database", word);
  2301. }
  2302. return 1;
  2303. }
  2304.  
  2305. //==============================================================================
  2306.  
  2307. stock ConnectedPlayers()
  2308. {
  2309. new Connected;
  2310. for(new i = 0; i < MAX_PLAYERS; i++)
  2311. {
  2312. if(IsPlayerConnected(i))
  2313. Connected++;
  2314. }
  2315. return Connected;
  2316. }
  2317.  
  2318. stock StartSpectate(playerid, specplayerid)
  2319. {
  2320. GetPlayerPos(playerid, SpecX[playerid], SpecY[playerid], SpecZ[playerid]);
  2321. Inter[playerid] = GetPlayerInterior(playerid);
  2322. vWorld[playerid] = GetPlayerVirtualWorld(playerid);
  2323. for(new x = 0; x < MAX_PLAYERS; x++)
  2324. {
  2325. if(GetPlayerState(x) == PLAYER_STATE_SPECTATING && spectatorid[x] == playerid)
  2326. {
  2327. AdvanceSpectate(x);
  2328. }
  2329. }
  2330. SetPlayerInterior(playerid, GetPlayerInterior(specplayerid));
  2331. TogglePlayerSpectating(playerid, 1);
  2332.  
  2333. if(IsPlayerInAnyVehicle(specplayerid))
  2334. {
  2335. PlayerSpectateVehicle(playerid, GetPlayerVehicleID(specplayerid));
  2336. IsSpecing[playerid] = 1;
  2337. IsBeingSpeced[specplayerid] = 1;
  2338. spectatorid[playerid] = specplayerid;
  2339. PlayerSpectateVehicle(playerid,GetPlayerVehicleID(specplayerid));
  2340. }
  2341. else
  2342. {
  2343. PlayerSpectatePlayer(playerid, specplayerid);
  2344. IsSpecing[playerid] = 1;
  2345. IsBeingSpeced[specplayerid] = 1;
  2346. spectatorid[playerid] = specplayerid;
  2347. }
  2348. return 1;
  2349. }
  2350.  
  2351. stock StopSpectate(playerid)
  2352. {
  2353. TogglePlayerSpectating(playerid, 0);
  2354. spectatorid[playerid] = INVALID_PLAYER_ID;
  2355. GameTextForPlayer(playerid,"~n~~n~~n~~n~~n~~n~~n~~w~~g~Spectate ~w~mode ~r~Ended", 3000,3);
  2356. return 1;
  2357. }
  2358.  
  2359. stock AdvanceSpectate(playerid)
  2360. {
  2361. if(ConnectedPlayers() == 2) { StopSpectate(playerid); return 1; }
  2362. if(GetPlayerState(playerid) == PLAYER_STATE_SPECTATING && spectatorid[playerid] != INVALID_PLAYER_ID)
  2363. {
  2364. for(new x=spectatorid[playerid]+1; x<=MAX_PLAYERS; x++)
  2365. {
  2366. if(x == MAX_PLAYERS) x = 0;
  2367. if(IsPlayerConnected(x) && x != playerid)
  2368. {
  2369. if(GetPlayerState(x) == PLAYER_STATE_SPECTATING && spectatorid[x] != INVALID_PLAYER_ID || (GetPlayerState(x) != 1 && GetPlayerState(x) != 2 && GetPlayerState(x) != 3))
  2370. {
  2371. continue;
  2372. }
  2373. else
  2374. {
  2375. StartSpectate(playerid, x);
  2376. break;
  2377. }
  2378. }
  2379. }
  2380. }
  2381. return 1;
  2382. }
  2383.  
  2384. stock ReverseSpectate(playerid)
  2385. {
  2386. if(ConnectedPlayers() == 2) { StopSpectate(playerid); return 1; }
  2387. if(GetPlayerState(playerid) == PLAYER_STATE_SPECTATING && spectatorid[playerid] != INVALID_PLAYER_ID)
  2388. {
  2389. for(new x=spectatorid[playerid]-1; x>=0; x--)
  2390. {
  2391. if(x == 0) x = MAX_PLAYERS;
  2392. if(IsPlayerConnected(x) && x != playerid)
  2393. {
  2394. if(GetPlayerState(x) == PLAYER_STATE_SPECTATING && spectatorid[x] != INVALID_PLAYER_ID || (GetPlayerState(x) != 1 && GetPlayerState(x) != 2 && GetPlayerState(x) != 3))
  2395. {
  2396. continue;
  2397. }
  2398. else
  2399. {
  2400. StartSpectate(playerid, x);
  2401. break;
  2402. }
  2403. }
  2404. }
  2405. }
  2406. return 1;
  2407. }
  2408.  
  2409. stock SendMsgToHelpers(const string[], color)
  2410. {
  2411. for(new i = 0; i < MAX_PLAYERS; i++)
  2412. {
  2413. if(IsPlayerConnected(i))
  2414. {
  2415. if(pInfo[i][Helper] == 1)
  2416. {
  2417. SendClientMessage(i, color, string);
  2418. }
  2419. }
  2420. }
  2421. return 1;
  2422. }
  2423.  
  2424. stock SendCommands(playerid, const cmd[])
  2425. {
  2426. new str[128];
  2427. if(set2[readcmd] == 1)
  2428. {
  2429. format(str, sizeof(str), "VCMD: %s[%d] has used the command '%s'", pName(playerid), playerid, cmd);
  2430. SendMsgToVips(str, COLOR_BLUE);
  2431. }
  2432. return 1;
  2433. }
  2434.  
  2435. stock cmd()
  2436. {
  2437. new
  2438. cmdBuffer[32],
  2439. commandCount;
  2440.  
  2441. for(new it = 0; it < Scripting_GetPublicsCount(); it++)
  2442. {
  2443. Scripting_GetPublic(it, cmdBuffer);
  2444. if(!strcmp(cmdBuffer, "@yC_", false, 4))
  2445. {
  2446. commandCount++;
  2447. }
  2448. }
  2449. return commandCount;
  2450. }
  2451.  
  2452. stock SendMsgToVips(const string[], color)
  2453. {
  2454. for(new i = 0; i < MAX_PLAYERS; i++)
  2455. {
  2456. if(IsPlayerConnected(i))
  2457. {
  2458. if(pInfo[i][Vip] >= 1)
  2459. {
  2460. SendClientMessage(i, color, string);
  2461. }
  2462. }
  2463. }
  2464. return 1;
  2465. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement