Advertisement
Guest User

VIP System by HY

a guest
Dec 23rd, 2014
1,998
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 27.01 KB | None | 0 0
  1. #include <a_samp>
  2. #include <zcmd>
  3. #include <sscanf>
  4. #include <YSI\y_ini>
  5.  
  6. #define SPATH "/ReportVip/%s.ini"
  7. #define DIALOG_VCMDS 9000
  8. #define DIALOG_COLOR 9001
  9.  
  10. enum vInfo
  11. {
  12. Vip
  13. }
  14. new VipInfo[MAX_PLAYERS][vInfo];
  15. new God[MAX_PLAYERS];
  16. new VGod[MAX_PLAYERS];
  17. new Text:Textdraw0;
  18. new Text:Textdraw1;
  19. new Text:Textdraw2;
  20. new Text:Textdraw3;
  21. new Text:Textdraw4;
  22. new Text:Textdraw5;
  23. new Text:Textdraw6;
  24. new Text:Textdraw7;
  25. new Text:Textdraw8;
  26. new Text:Textdraw9;
  27.  
  28. public OnPlayerConnect(playerid)
  29. {
  30. God[playerid] = 0;
  31. VGod[playerid] = 0;
  32. return 1;
  33. }
  34.  
  35. //============================/SETVIP===========================================
  36.  
  37. CMD:setvip(playerid, params[])
  38. {
  39. new ID, Level, string[128], name[MAX_PLAYER_NAME], pname[MAX_PLAYER_NAME];
  40. if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "{FF0000}ERROR: {FFFFFF}You are not authorized to use this command.");
  41. if(sscanf(params, "ui", ID, Level)) return SendClientMessage(playerid, -1, "{FF0000}USAGE: {FFFFFF}/SetVip [ID] [Level]");
  42. if(Level > 3 || Level == 0) return SendClientMessage(playerid, -1, "{FF0000}ERROR: {FFFFFF}Invalid Level. [1-3]");
  43. if(VipInfo[ID][Vip] == Level) return SendClientMessage(playerid, -1, "{FF0000}ERROR: {FFFFFF}That player it's already havin' that {FF0000}VIP {FFFFFF}Level.");
  44. GetPlayerName(playerid, name, sizeof(name));
  45. GetPlayerName(playerid, pname, sizeof(pname));
  46. format(string, sizeof(string), "{FF0000}[INFO]: {FFFFFF}Administrator {FF0000}%s {FFFFFF}has setted you {FF0000}VIP {FFFFFF}Account Level: {FF0000}%i.", name, Level);
  47. SendClientMessage(ID, -1, string);
  48. format(string, sizeof(string), "{FF0000}[INFO]: {FFFFFF}You have setted to {FF0000}%s {FFFFFF}VIP Account Level: {FF0000}%i.", pname, Level);
  49. SendClientMessage(playerid, -1, string);
  50. VipInfo[ID][Vip] = Level;
  51. return 1;
  52. }
  53.  
  54. //========================/REPORTVIP============================================
  55.  
  56. CMD:reportvip(playerid, params[])
  57. {
  58. new ID, string[128], name[MAX_PLAYER_NAME];
  59. if(sscanf(params, "us[128]", ID, string)) return SendClientMessage(playerid, -1, "{FF0000}USAGE: {FFFFFF}/ReportVIP [Vip ID] [Reason]");
  60. if(!IsPlayerConnected(ID)) return SendClientMessage(playerid, -1, "{FF0000}ERROR: {FFFFFF}That player is not connected.");
  61. if(VipInfo[ID][Vip] == 0) return SendClientMessage(playerid, -1, "{FF0000}ERROR: {FFFFFF}That player is not {FF0000}VIP{FFFFFF}.");
  62. GetPlayerName(ID, name, sizeof(name));
  63. new INI:File = INI_Open(ReportsPath(playerid));
  64. INI_SetTag(File,"|| VIP REPORTED ||");
  65. INI_WriteString(File,"Reported VIP Name", name);
  66. INI_WriteString(File,"Report Reason", string);
  67. INI_Close(File);
  68. return 1;
  69. }
  70.  
  71. //=============================/VCMDS===========================================
  72.  
  73. CMD:vcmds(playerid, params[])
  74. {
  75. if(VipInfo[playerid][Vip] >= 1)
  76. {
  77. new pDialog[2000];
  78. strcat(pDialog, "{FF0000}Level {15FF00}1;\n\n", sizeof(pDialog));
  79. strcat(pDialog, "{FFCC33}/VChat {FFFFFF}- Speak in VIP Chat with others {15FF00}'Vips'.\n", sizeof(pDialog));
  80. strcat(pDialog, "{FFCC33}/VNos {FFFFFF}- Add {15FF00}'NOS' {FFFFFF}to your car.\n", sizeof(pDialog));
  81. strcat(pDialog, "{FFCC33}/VCarColor {FFFFFF}- Change your car's colors.\n", sizeof(pDialog));
  82. strcat(pDialog, "{FFCC33}/VKillMe {FFFFFF}- Kills yourself.\n", sizeof(pDialog));
  83. strcat(pDialog, "{FFCC33}/VSkin {FFFFFF}- Change your skin to another one.\n", sizeof(pDialog));
  84. strcat(pDialog, "{FFCC33}/VColor {FFFFFF}- Change your name's color.\n", sizeof(pDialog));
  85. strcat(pDialog, "{FFCC33}/VCar {FFFFFF}- Spawns specified car for you.\n\n", sizeof(pDialog));
  86. strcat(pDialog, "{FF0000}Level {15FF00}2;\n\n", sizeof(pDialog));
  87. strcat(pDialog, "{FFCC33}/VPack {FFFFFF}- Receive {FF0000}Vip's {FFFFFF}pack.\n", sizeof(pDialog));
  88. strcat(pDialog, "{FFCC33}/VJetpack {FFFFFF}- Spawns a Jetpack.\n", sizeof(pDialog));
  89. strcat(pDialog, "{FFCC33}/VSpawn {FFFFFF}- Spawns yourself in a random place.\n", sizeof(pDialog));
  90. strcat(pDialog, "{FFCC33}/VGun {FFFFFF}- Get a Gun's pack.\n", sizeof(pDialog));
  91. strcat(pDialog, "{FFCC33}/VGoto {FFFFFF}- Teleports you to a player.\n", sizeof(pDialog));
  92. strcat(pDialog, "{FFCC33}/VTime {FFFFFF}- Changes your hour to specified hour.\n", sizeof(pDialog));
  93. strcat(pDialog, "{FFCC33}/Weather {FFFFFF}- Changes your weather to specified weather.\n", sizeof(pDialog));
  94. strcat(pDialog, "{FFCC33}/VHeal {FFFFFF}- Heals yourself.\n", sizeof(pDialog));
  95. strcat(pDialog, "{FFCC33}/VArmour {FFFFFF}- Armours yourself.\n\n", sizeof(pDialog));
  96. strcat(pDialog, "{FF0000}Level {15FF00}3;\n\n", sizeof(pDialog));
  97. strcat(pDialog, "{FFCC33}/VPack {FFFFFF}- Receive {FF0000}Vip's {FFFFFF}Pack.\n", sizeof(pDialog));
  98. strcat(pDialog, "{FFCC33}/VGod {FFFFFF}- {15FF00}Activate/{FF0000}Dezactivate {FFFFFF}GodMode.\n", sizeof(pDialog));
  99. strcat(pDialog, "{FFCC33}/VehGod {FFFFFF}- {15FF00}Activate/{FF0000}Dezactivate {FFFFFF}GodMode at your car.\n", sizeof(pDialog));
  100. strcat(pDialog, "{FFCC33}/VMini {FFFFFF}- Spawns a Minigun.\n", sizeof(pDialog));
  101. strcat(pDialog, "{FFCC33}/VGet {FFFFFF}- Teleport a player to your position.\n", sizeof(pDialog));
  102. ShowPlayerDialog(playerid, DIALOG_VCMDS, DIALOG_STYLE_MSGBOX, "VIP Commands", pDialog, "Exit", "");
  103. }
  104. else
  105. {
  106. SendClientMessage(playerid, -1, "{FF0000}ERROR: {FFFFFF}You are not authorized to use this command.");
  107. }
  108. return 1;
  109. }
  110.  
  111. //-----------------------------VIP 1--------------------------------------------
  112.  
  113. CMD:vchat(playerid, params[])
  114. {
  115. new string[128], name[MAX_PLAYER_NAME];
  116. GetPlayerName(playerid, name, sizeof(name));
  117. if(VipInfo[playerid][Vip] >= 1)
  118. {
  119. if(isnull(params)) return SendClientMessage(playerid, -1, "{FF0000}/VChat [Text]");
  120. for(new i = 0; i < MAX_PLAYERS; i++)
  121. {
  122. if(VipInfo[i][Vip] >= 1)
  123. {
  124. format(string, sizeof(string), "{FF0000}[VIP]: {15FF00}%s: {FFCC33}%s", name, params);
  125. SendClientMessage(i, -1, string);
  126. }
  127. }
  128. }
  129. else
  130. {
  131. SendClientMessage(playerid, -1, "{FF0000}ERROR: {FFFFFF}You are not authorized to use this command.");
  132. }
  133. return 1;
  134. }
  135.  
  136. //------------------------------------------------------------------------------
  137.  
  138. CMD:vkillme(playerid, params[])
  139. {
  140. if(VipInfo[playerid][Vip] >= 1)
  141. {
  142. SetPlayerHealth(playerid, 0.0);
  143. SendClientMessage(playerid, -1, "{FF0000}USAGE: {FFFFFF}You have killed yourself.");
  144. }
  145. else
  146. {
  147. SendClientMessage(playerid, -1, "{FF0000}ERROR: {FFFFFF}You are not authorized to use this command.");
  148. }
  149. return 1;
  150. }
  151.  
  152. //------------------------------------------------------------------------------
  153.  
  154. CMD:vnos(playerid, params[])
  155. {
  156. if(VipInfo[playerid][Vip] >= 1)
  157. {
  158. new veh;
  159. veh = GetPlayerVehicleID(playerid);
  160. AddVehicleComponent(veh, 1077);
  161. if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1, "{FF0000}ERROR: {FFFFFF}You need to be in a vehicle to use this command.");
  162. SendClientMessage(playerid, -1, "{FF0000}[INFO]: {FFFFFF}You added {FF0000}'NOS' {FFFFFF}at your car.");
  163. }
  164. else
  165. {
  166. SendClientMessage(playerid, -1, "{FF0000}ERROR: {FFFFFF}You are not authorized to use this command.");
  167. }
  168. return 1;
  169. }
  170.  
  171. //------------------------------------------------------------------------------
  172.  
  173. CMD:vcarcolor(playerid, params[])
  174. {
  175. if(VipInfo[playerid][Vip] >= 1)
  176. {
  177. new Col1, Col2, vehicle, string[128];
  178. vehicle = GetPlayerVehicleID(playerid);
  179. if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1, "{FF0000}ERROR: {FFFFFF}You need to be in a vehicle to use this command.");
  180. if(sscanf(params, "dd", Col1, Col2)) return SendClientMessage(playerid, -1, "{FF0000}USAGE: {FFFFFF}/CarColor [Color 1] [Color 2]");
  181. ChangeVehicleColor(vehicle, Col1, Col2);
  182. format(string, sizeof(string), "{FF0000}[INFO]: {FFFFFF}You changed your vehicle's: {FF0000}%i {FFFFFF}color to: {FF0000}%d, %d.", vehicle, Col1, Col2);
  183. SendClientMessage(playerid, -1, string);
  184. }
  185. else
  186. {
  187. SendClientMessage(playerid, -1, "{FF0000}ERROR: {FFFFFF}You are not authorized to use this command.");
  188. }
  189. return 1;
  190. }
  191.  
  192. //------------------------------------------------------------------------------
  193.  
  194. CMD:vskin(playerid, params[])
  195. {
  196. if(VipInfo[playerid][Vip] >= 1)
  197. {
  198. new Skin, string[128];
  199. if(sscanf(params, "i", Skin)) return SendClientMessage(playerid, -1, "{FF0000}USAGE: {FFFFFF}/VSkin [Skin ID]");
  200. if(Skin > 299) return SendClientMessage(playerid, -1, "{FF0000}ERROR: {FFFFFF}Invalid Skin. [0-299]");
  201. format(string, sizeof(string), "{FF0000}[INFO]: {FFFFFF}You succesfully changed your skin to: {FF0000}%i.", Skin);
  202. SendClientMessage(playerid, -1, string);
  203. }
  204. else
  205. {
  206. SendClientMessage(playerid, -1, "{FF0000}ERROR: {FFFFFF}You are not authorized to use this command.");
  207. }
  208. return 1;
  209. }
  210.  
  211. //------------------------------------------------------------------------------
  212.  
  213. CMD:vcolor(playerid, params[])
  214. {
  215. if(VipInfo[playerid][Vip] >= 1)
  216. {
  217. ShowPlayerDialog(playerid, DIALOG_COLOR, DIALOG_STYLE_LIST, "Change your color", "{FF0000}Red\n{0066CC}Blue\n{FFFFFF}White\n{FFCC33}Orange\n{FFFF00}Yellow\n{15FF00}Green", "Change", "Exit");
  218. }
  219. else
  220. {
  221. SendClientMessage(playerid, -1, "{FF0000}ERROR: {FFFFFF}You are not authorized to use this command.");
  222. }
  223. return 1;
  224. }
  225.  
  226. //------------------------------------------------------------------------------
  227.  
  228. CMD:vcar(playerid, params[])
  229. {
  230. if(VipInfo[playerid][Vip] >= 1)
  231. {
  232. new Float:X, Float:Y, Float:Z, Float:A, Model, Color1, Color2;
  233. GetPlayerPos(playerid, X, Y, Z);
  234. GetPlayerFacingAngle(playerid, A);
  235. if(sscanf(params, "idd", Model, Color1, Color2)) return SendClientMessage(playerid, -1, "{FF0000}USAGE: {FFFFFF}/Car [Model] [Color 1] [Color 2]");
  236. AddStaticVehicle(Model, X, Y, Z, A, Color1, Color2);
  237. }
  238. else
  239. {
  240. SendClientMessage(playerid, -1, "{FF0000}ERROR: {FFFFFF}You are not authorized to use this command.");
  241. }
  242. return 1;
  243. }
  244.  
  245. //-----------------------------VIP 2--------------------------------------------
  246.  
  247. CMD:vpack(playerid, params[])
  248. {
  249. if(VipInfo[playerid][Vip] >= 2)
  250. {
  251. Pack(playerid);
  252. }
  253. else
  254. {
  255. SendClientMessage(playerid, -1, "{FF0000}ERROR: {FFFFFF}You are not authorized to use this command.");
  256. }
  257. return 1;
  258. }
  259.  
  260. //------------------------------------------------------------------------------
  261.  
  262. CMD:vjetpack(playerid, params[])
  263. {
  264. if(VipInfo[playerid][Vip] >= 2)
  265. {
  266. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_USEJETPACK);
  267. SendClientMessage(playerid, -1, "{FF0000}[INFO]: {FFFFFF}You succesfully spawned a jetpack.");
  268. }
  269. else
  270. {
  271. SendClientMessage(playerid, -1, "{FF0000}ERROR: {FFFFFF}You are not authorized to use this command.");
  272. }
  273. return 1;
  274. }
  275.  
  276. //------------------------------------------------------------------------------
  277.  
  278. CMD:vspawn(playerid, params[])
  279. {
  280. if(VipInfo[playerid][Vip] >= 2)
  281. {
  282. SpawnPlayer(playerid);
  283. SendClientMessage(playerid, -1, "{FF0000}[INFO]: {FFFFFF}You succesfully got spanwed in a random place.");
  284. }
  285. else
  286. {
  287. SendClientMessage(playerid, -1, "{FF0000}ERROR: {FFFFFF}You are not authorized to use this command.");
  288. }
  289. return 1;
  290. }
  291.  
  292. //------------------------------------------------------------------------------
  293.  
  294. CMD:vgun(playerid, params[])
  295. {
  296. if(VipInfo[playerid][Vip] >= 2)
  297. {
  298. GivePlayerWeapon(playerid, 24, 9999);
  299. GivePlayerWeapon(playerid, 28, 9999);
  300. GivePlayerWeapon(playerid, 30, 9999);
  301. GivePlayerWeapon(playerid, 34, 9999);
  302. SendClientMessage(playerid, -1, "{FF0000}[INFO]: {FFFFFF}You received {FF0000}VIP's {FFFFFF}guns.");
  303. }
  304. else
  305. {
  306. SendClientMessage(playerid, -1, "{FF0000}ERROR: {FFFFFF}You are not authorized to use this command.");
  307. }
  308. return 1;
  309. }
  310.  
  311. //------------------------------------------------------------------------------
  312.  
  313. CMD:vgoto(playerid, params[])
  314. {
  315. if(VipInfo[playerid][Vip] >= 2)
  316. {
  317. new ID, string[128], Float:X, Float:Y, Float:Z, name[MAX_PLAYER_NAME], pname[MAX_PLAYER_NAME];
  318. if(sscanf(params, "u", ID)) return SendClientMessage(playerid, -1, "{FF0000}USAGE: {FFFFFF}/VGoto [ID]");
  319. if(!IsPlayerConnected(ID)) return SendClientMessage(playerid, -1, "{FF0000}ERROR: {FFFFFF}That player isn't connected.");
  320. if(ID == playerid) return SendClientMessage(playerid, -1, "{FF0000}ERROR: {FFFFFF}You can't teleport to yourself.");
  321. GetPlayerName(playerid, name, sizeof(name));
  322. GetPlayerName(ID, pname, sizeof(pname));
  323. GetPlayerPos(ID, X, Y, Z);
  324. format(string, sizeof(string), "{FF0000}[INFO]: {FFFFFF}VIP Player {FF0000}%s {FFFFFF}has teleported to you.", name);
  325. SendClientMessage(ID, -1, string);
  326. format(string, sizeof(string), "{FF0000}[INFO]: {FFFFFF}You have been teleported to {FF0000}%s {FFFFFF}.", pname);
  327. SendClientMessage(playerid, -1, string);
  328. SetPlayerPos(playerid, X, Y, Z+2);
  329. }
  330. else
  331. {
  332. SendClientMessage(playerid, -1, "{FF0000}ERROR: {FFFFFF}You are not authorized to use this command.");
  333. }
  334. return 1;
  335. }
  336.  
  337. //------------------------------------------------------------------------------
  338.  
  339. CMD:vtime(playerid, params[])
  340. {
  341. if(VipInfo[playerid][Vip] >= 2)
  342. {
  343. new time, string[128];
  344. if(sscanf(params, "d", time)) return SendClientMessage(playerid, -1, "{FF0000}USAGE: {FFFFFF}/VTime [Time]");
  345. if(time > 24) return SendClientMessage(playerid, -1, "{FF0000}ERROR: {FFFFFF}Invalid hour. [0-24]");
  346. SetPlayerTime(playerid, time, 0);
  347. format(string, sizeof(string), "{FF0000}[INFO]: {FFFFFF}You have changed your hour to: {FF0000}%d.", time);
  348. SendClientMessage(playerid, -1, string);
  349. }
  350. else
  351. {
  352. SendClientMessage(playerid, -1, "{FF0000}ERROR: {FFFFFF}You are not authorized to use this command.");
  353. }
  354. return 1;
  355. }
  356.  
  357. //------------------------------------------------------------------------------
  358.  
  359. CMD:weather(playerid, params[])
  360. {
  361. if(VipInfo[playerid][Vip] >= 2)
  362. {
  363. new weather, string[128];
  364. if(sscanf(params, "d", weather)) return SendClientMessage(playerid, -1, "{FF0000}USAGE: {FFFFFF}/Weather [Weather ID]");
  365. if(weather > 44) return SendClientMessage(playerid, -1, "{FF0000}ERROR: {FFFFFF}Invalid weather. [0-44]");
  366. SetPlayerWeather(playerid, weather);
  367. format(string, sizeof(string), "{FF0000}[INFO]: {FFFFFF}You have changed your weather to: {FF0000}%d.", weather);
  368. SendClientMessage(playerid, -1, string);
  369. }
  370. else
  371. {
  372. SendClientMessage(playerid, -1, "{FF0000}ERROR: {FFFFFF}You are not authorized to use this command.");
  373. }
  374. return 1;
  375. }
  376.  
  377. //------------------------------------------------------------------------------
  378.  
  379. CMD:vheal(playerid, params[])
  380. {
  381. if(VipInfo[playerid][Vip] >= 2)
  382. {
  383. SetPlayerHealth(playerid, 100);
  384. SendClientMessage(playerid, -1, "{FF0000}[INFO]: {FFFFFF}You have healed yourself.");
  385. }
  386. else
  387. {
  388. SendClientMessage(playerid, -1, "{FF0000}ERROR: {FFFFFF}You are not authorized to use this command.");
  389. }
  390. return 1;
  391. }
  392.  
  393. //------------------------------------------------------------------------------
  394.  
  395. CMD:varmour(playerid, params[])
  396. {
  397. if(VipInfo[playerid][Vip] >= 2)
  398. {
  399. SetPlayerArmour(playerid, 100);
  400. SendClientMessage(playerid, -1, "{FF0000}[INFO]: {FFFFFF}You have armoured yourself.");
  401. }
  402. else
  403. {
  404. SendClientMessage(playerid, -1, "{FF0000}ERROR: {FFFFFF}You are not authorized to use this command.");
  405. }
  406. return 1;
  407. }
  408.  
  409. //-----------------------------VIP 3--------------------------------------------
  410.  
  411. CMD:vgod(playerid, params[])
  412. {
  413. if(VipInfo[playerid][Vip] >= 3)
  414. {
  415. if(God[playerid] == 0)
  416. {
  417. GodLike(playerid, 1);
  418. God[playerid] = 1;
  419. }
  420. else if(God[playerid] == 1)
  421. {
  422. GodLike(playerid, 0);
  423. God[playerid] = 0;
  424. }
  425. }
  426. else
  427. {
  428. SendClientMessage(playerid, -1, "{FF0000}ERROR: {FFFFFF}You are not authorized to use this command.");
  429. }
  430. return 1;
  431. }
  432.  
  433. //------------------------------------------------------------------------------
  434.  
  435. CMD:vehgod(playerid, params[])
  436. {
  437. if(VipInfo[playerid][Vip] >= 3)
  438. {
  439. if(VGod[playerid] == 0)
  440. {
  441. VehGodLike(playerid, 1);
  442. VGod[playerid] = 1;
  443. }
  444. else if(VGod[playerid] == 1)
  445. {
  446. VehGodLike(playerid, 0);
  447. VGod[playerid] = 0;
  448. }
  449. }
  450. else
  451. {
  452. SendClientMessage(playerid, -1, "{FF0000}ERROR: {FFFFFF}You are not authorized to use this command.");
  453. }
  454. return 1;
  455. }
  456.  
  457. //------------------------------------------------------------------------------
  458.  
  459. CMD:vmini(playerid, params[])
  460. {
  461. if(VipInfo[playerid][Vip] >= 3)
  462. {
  463. GivePlayerWeapon(playerid, 38, 9999);
  464. }
  465. else
  466. {
  467. SendClientMessage(playerid, -1, "{FF0000}ERROR: {FFFFFF}You are not authorized to use this command.");
  468. }
  469. return 1;
  470. }
  471.  
  472. //------------------------------------------------------------------------------
  473.  
  474. CMD:vget(playerid, params[])
  475. {
  476. if(VipInfo[playerid][Vip] >= 3)
  477. {
  478. new ID, string[128], Float:X, Float:Y, Float:Z, name[MAX_PLAYER_NAME], pname[MAX_PLAYER_NAME];
  479. if(sscanf(params, "u", ID)) return SendClientMessage(playerid, -1, "{FF0000}USAGE: {FFFFFF}/VGet [ID]");
  480. if(!IsPlayerConnected(ID)) return SendClientMessage(playerid, -1, "{FF0000}ERROR: {FFFFFF}That player isn't connected.");
  481. if(ID == playerid) return SendClientMessage(playerid, -1, "{FF0000}ERROR: {FFFFFF}You can't teleport to yourself to yourself.");
  482. GetPlayerName(playerid, name, sizeof(name));
  483. GetPlayerName(ID, pname, sizeof(pname));
  484. GetPlayerPos(playerid, X, Y, Z);
  485. format(string, sizeof(string), "{FF0000}[INFO]: {FFFFFF}VIP Player {FF0000}%s {FFFFFF}has teleported you to his location.", name);
  486. SendClientMessage(ID, -1, string);
  487. format(string, sizeof(string), "{FF0000}[INFO]: {FFFFFF}You teleported {FF0000}%s {FFFFFF}to your location.", pname);
  488. SendClientMessage(playerid, -1, string);
  489. SetPlayerPos(ID, X, Y, Z+2);
  490. }
  491. else
  492. {
  493. SendClientMessage(playerid, -1, "{FF0000}ERROR: {FFFFFF}You are not authorized to use this command.");
  494. }
  495. return 1;
  496. }
  497.  
  498. //------------------------------------------------------------------------------
  499.  
  500. CMD:vipmenu(playerid, params)
  501. {
  502. if(VipInfo[playerid][Vip] >= 3)
  503. {
  504. Show(playerid);
  505. SelectTextDraw(playerid, 0xFFFFFFFF);
  506. }
  507. else
  508. {
  509. SendClientMessage(playerid, -1, "{FF0000}ERROR: {FFFFFF}You are not authorized to use this command.");
  510. }
  511. return 1;
  512. }
  513.  
  514. //==============================================================================
  515.  
  516. public OnPlayerClickTextDraw(playerid, Text:clickedid)
  517. {
  518. if(clickedid == Textdraw2)
  519. {
  520. SetPlayerHealth(playerid, 100);
  521. SendClientMessage(playerid, -1, "{FF0000}[INFO]: {FFFFFF}You have been healed.");
  522. }
  523. else if(clickedid == Textdraw3)
  524. {
  525. SetPlayerArmour(playerid, 100);
  526. SendClientMessage(playerid, -1, "{FF0000}[INFO]: {FFFFFF}You have been armoured.");
  527. }
  528. else if(clickedid == Textdraw4)
  529. {
  530. if(God[playerid] == 0)
  531. {
  532. GodLike(playerid, 1);
  533. God[playerid] = 1;
  534. }
  535. else if(God[playerid] == 1)
  536. {
  537. GodLike(playerid, 0);
  538. God[playerid] = 0;
  539. }
  540. }
  541. else if(clickedid == Textdraw5)
  542. {
  543. if(VGod[playerid] == 0)
  544. {
  545. VehGodLike(playerid, 1);
  546. VGod[playerid] = 1;
  547. }
  548. else if(VGod[playerid] == 1)
  549. {
  550. VehGodLike(playerid, 0);
  551. VGod[playerid] = 0;
  552. }
  553. }
  554. else if(clickedid == Textdraw6)
  555. {
  556. Pack(playerid);
  557. SendClientMessage(playerid, -1, "{FF0000}[INFO]: {FFFFFF}You got weapons.");
  558. }
  559. else if(clickedid == Textdraw7)
  560. {
  561. Pack(playerid);
  562. SendClientMessage(playerid, -1, "{FF0000}[INFO]: {FFFFFF}You got VIP Pack.");
  563. }
  564. else if(clickedid == Textdraw8)
  565. {
  566. Hide(playerid);
  567. SendClientMessage(playerid, -1, "{FF0000}[INFO]: {FFFFFF}You closed {FF0000}Vip's {FFFFFF}menu.");
  568. }
  569. return 1;
  570. }
  571.  
  572. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  573. {
  574. if(dialogid == DIALOG_COLOR)
  575. {
  576. if(response)
  577. {
  578. if(listitem == 0)
  579. {
  580. SetPlayerColor(playerid, 0xFF0000FF);
  581. SendClientMessage(playerid, -1, "{FF0000}[INFO]: {FFFFFF}Color {FF0000}changed.");
  582. }
  583. if(listitem == 1)
  584. {
  585. SetPlayerColor(playerid, 0x0066CCFF);
  586. SendClientMessage(playerid, -1, "{FF0000}[INFO]: {FFFFFF}Color {0066CC}changed.");
  587. }
  588. if(listitem == 2)
  589. {
  590. SetPlayerColor(playerid, 0xFFFFFFFF);
  591. SendClientMessage(playerid, -1, "{FF0000}[INFO]: {FFFFFF}Color {FFFFFF}changed.");
  592. }
  593. if(listitem == 3)
  594. {
  595. SetPlayerColor(playerid, 0xFFCC33FF);
  596. SendClientMessage(playerid, -1, "{FF0000}[INFO]: {FFFFFF}Color {FFCC33}changed.");
  597. }
  598. if(listitem == 4)
  599. {
  600. SetPlayerColor(playerid, 0xFFFF00FF);
  601. SendClientMessage(playerid, -1, "{FF0000}[INFO]: {FFFFFF}Color {FFFF00}changed.");
  602. }
  603. if(listitem == 5)
  604. {
  605. SetPlayerColor(playerid, 0x15FF00FF);
  606. SendClientMessage(playerid, -1, "{FF0000}[INFO]: {FFFFFF}Color {15FF00}changed.");
  607. }
  608. }
  609. }
  610. return 1;
  611. }
  612.  
  613. public OnFilterScriptInit()
  614. {
  615. Textdraw0 = TextDrawCreate(643.599914, 140.379989, "usebox");
  616. TextDrawLetterSize(Textdraw0, 0.000000, 33.781108);
  617. TextDrawTextSize(Textdraw0, 374.799957, 0.000000);
  618. TextDrawAlignment(Textdraw0, 1);
  619. TextDrawColor(Textdraw0, 0);
  620. TextDrawUseBox(Textdraw0, true);
  621. TextDrawBoxColor(Textdraw0, 102);
  622. TextDrawSetShadow(Textdraw0, 0);
  623. TextDrawSetOutline(Textdraw0, 0);
  624. TextDrawFont(Textdraw0, 0);
  625.  
  626. Textdraw1 = TextDrawCreate(442.399963, 132.906600, "Vip Menu");
  627. TextDrawLetterSize(Textdraw1, 0.670800, 3.153066);
  628. TextDrawAlignment(Textdraw1, 1);
  629. TextDrawColor(Textdraw1, 16777215);
  630. TextDrawSetShadow(Textdraw1, 0);
  631. TextDrawSetOutline(Textdraw1, 1);
  632. TextDrawBackgroundColor(Textdraw1, 51);
  633. TextDrawFont(Textdraw1, 2);
  634. TextDrawSetProportional(Textdraw1, 1);
  635.  
  636. Textdraw2 = TextDrawCreate(385.600006, 200.853256, "1. Heal");
  637. TextDrawLetterSize(Textdraw2, 0.617999, 2.324267);
  638. TextDrawAlignment(Textdraw2, 1);
  639. TextDrawColor(Textdraw2, -1);
  640. TextDrawSetShadow(Textdraw2, 0);
  641. TextDrawSetOutline(Textdraw2, 1);
  642. TextDrawBackgroundColor(Textdraw2, 51);
  643. TextDrawFont(Textdraw2, 2);
  644. TextDrawSetProportional(Textdraw2, 1);
  645. TextDrawSetSelectable(Textdraw2, true);
  646.  
  647. Textdraw3 = TextDrawCreate(383.199981, 229.226593, "2. Armour");
  648. TextDrawLetterSize(Textdraw3, 0.494000, 2.152533);
  649. TextDrawTextSize(Textdraw3, -228.800003, -74.666664);
  650. TextDrawAlignment(Textdraw3, 1);
  651. TextDrawColor(Textdraw3, -1);
  652. TextDrawSetShadow(Textdraw3, 0);
  653. TextDrawSetOutline(Textdraw3, 1);
  654. TextDrawBackgroundColor(Textdraw3, 51);
  655. TextDrawFont(Textdraw3, 2);
  656. TextDrawSetProportional(Textdraw3, 1);
  657. TextDrawSetSelectable(Textdraw3, true);
  658.  
  659. Textdraw4 = TextDrawCreate(381.600097, 258.346649, "3. GodMode");
  660. TextDrawLetterSize(Textdraw4, 0.518799, 2.077867);
  661. TextDrawAlignment(Textdraw4, 1);
  662. TextDrawColor(Textdraw4, -1);
  663. TextDrawSetShadow(Textdraw4, 0);
  664. TextDrawSetOutline(Textdraw4, 1);
  665. TextDrawBackgroundColor(Textdraw4, 51);
  666. TextDrawFont(Textdraw4, 2);
  667. TextDrawSetProportional(Textdraw4, 1);
  668. TextDrawSetSelectable(Textdraw4, true);
  669.  
  670. Textdraw5 = TextDrawCreate(383.999938, 288.213317, "4. Vehicle GodMode");
  671. TextDrawLetterSize(Textdraw5, 0.435599, 2.174932);
  672. TextDrawAlignment(Textdraw5, 1);
  673. TextDrawColor(Textdraw5, -1);
  674. TextDrawSetShadow(Textdraw5, 0);
  675. TextDrawSetOutline(Textdraw5, 1);
  676. TextDrawBackgroundColor(Textdraw5, 51);
  677. TextDrawFont(Textdraw5, 2);
  678. TextDrawSetProportional(Textdraw5, 1);
  679. TextDrawSetSelectable(Textdraw5, true);
  680.  
  681. Textdraw6 = TextDrawCreate(383.999969, 318.826660, "5. Guns");
  682. TextDrawLetterSize(Textdraw6, 0.497200, 2.197334);
  683. TextDrawAlignment(Textdraw6, 1);
  684. TextDrawColor(Textdraw6, -1);
  685. TextDrawSetShadow(Textdraw6, 0);
  686. TextDrawSetOutline(Textdraw6, 1);
  687. TextDrawBackgroundColor(Textdraw6, 51);
  688. TextDrawFont(Textdraw6, 2);
  689. TextDrawSetProportional(Textdraw6, 1);
  690. TextDrawSetSelectable(Textdraw6, true);
  691.  
  692. Textdraw7 = TextDrawCreate(383.999969, 347.199951, "6. Vip Pack");
  693. TextDrawLetterSize(Textdraw7, 0.485999, 2.174932);
  694. TextDrawAlignment(Textdraw7, 1);
  695. TextDrawColor(Textdraw7, -1);
  696. TextDrawSetShadow(Textdraw7, 0);
  697. TextDrawSetOutline(Textdraw7, 1);
  698. TextDrawBackgroundColor(Textdraw7, 51);
  699. TextDrawFont(Textdraw7, 2);
  700. TextDrawSetProportional(Textdraw7, 1);
  701. TextDrawSetSelectable(Textdraw7, true);
  702.  
  703. Textdraw8 = TextDrawCreate(573.600158, 430.080017, "Close");
  704. TextDrawLetterSize(Textdraw8, 0.464399, 1.943466);
  705. TextDrawAlignment(Textdraw8, 1);
  706. TextDrawColor(Textdraw8, -5963521);
  707. TextDrawSetShadow(Textdraw8, 0);
  708. TextDrawSetOutline(Textdraw8, 1);
  709. TextDrawBackgroundColor(Textdraw8, 51);
  710. TextDrawFont(Textdraw8, 2);
  711. TextDrawSetProportional(Textdraw8, 1);
  712. TextDrawSetSelectable(Textdraw8, true);
  713.  
  714. Textdraw9 = TextDrawCreate(641.199951, 435.313323, "usebox");
  715. TextDrawLetterSize(Textdraw9, 0.000000, 1.176666);
  716. TextDrawTextSize(Textdraw9, 564.400024, 0.000000);
  717. TextDrawAlignment(Textdraw9, 1);
  718. TextDrawColor(Textdraw9, 0);
  719. TextDrawUseBox(Textdraw9, true);
  720. TextDrawBoxColor(Textdraw9, 102);
  721. TextDrawSetShadow(Textdraw9, 0);
  722. TextDrawSetOutline(Textdraw9, 0);
  723. TextDrawFont(Textdraw9, 0);
  724. return 1;
  725. }
  726.  
  727. stock ReportsPath(playerid)
  728. {
  729. new string[128],playername[MAX_PLAYER_NAME];
  730. GetPlayerName(playerid,playername,sizeof(playername));
  731. format(string,sizeof(string),SPATH,playername);
  732. return string;
  733. }
  734.  
  735. stock Pack(playerid)
  736. {
  737. SetPlayerHealth(playerid, 100);
  738. SetPlayerArmour(playerid, 100);
  739. GivePlayerWeapon(playerid, 24, 9999);
  740. GivePlayerWeapon(playerid, 28, 9999);
  741. GivePlayerWeapon(playerid, 30, 9999);
  742. GivePlayerWeapon(playerid, 34, 9999);
  743. SetPlayerSkin(playerid, 217);
  744. SetPlayerColor(playerid, 0xFF0000FF);
  745. SendClientMessage(playerid, -1, "{FF0000}[INFO]: {FFFFFF}You received {FF0000}VIP's {FFFFFF}pack.");
  746. }
  747.  
  748. stock GodLike(playerid, type)
  749. {
  750. if(type == 0)
  751. {
  752. SetPlayerHealth(playerid, 100);
  753. SendClientMessage(playerid, -1, "{FF0000}[INFO]: {FFFFFF}You have disabled {FF0000}'GodMode'");
  754. }
  755. else if(type == 1)
  756. {
  757. SetPlayerHealth(playerid, 9999999999);
  758. SendClientMessage(playerid, -1, "{FF0000}[INFO]: {FFFFFF}You have activated {FF0000}'GodMode'");
  759. }
  760. }
  761.  
  762. stock VehGodLike(playerid, type)
  763. {
  764. if(type == 0)
  765. {
  766. SetVehicleHealth(playerid, 100);
  767. SendClientMessage(playerid, -1, "{FF0000}[INFO]: {FFFFFF}You have disabled {FF0000}'GodMode' {FFFFFF}at your car.");
  768. }
  769. else if(type == 1)
  770. {
  771. SetVehicleHealth(playerid, 9999999999);
  772. SendClientMessage(playerid, -1, "{FF0000}[INFO]: {FFFFFF}You have activated {FF0000}'GodMode' {FFFFFF}at your car.");
  773. }
  774. }
  775.  
  776. stock Show(playerid)
  777. {
  778. TextDrawShowForPlayer(playerid, Textdraw0);
  779. TextDrawShowForPlayer(playerid, Textdraw1);
  780. TextDrawShowForPlayer(playerid, Textdraw2);
  781. TextDrawShowForPlayer(playerid, Textdraw3);
  782. TextDrawShowForPlayer(playerid, Textdraw4);
  783. TextDrawShowForPlayer(playerid, Textdraw5);
  784. TextDrawShowForPlayer(playerid, Textdraw6);
  785. TextDrawShowForPlayer(playerid, Textdraw7);
  786. TextDrawShowForPlayer(playerid, Textdraw8);
  787. TextDrawShowForPlayer(playerid, Textdraw9);
  788. }
  789.  
  790. stock Hide(playerid)
  791. {
  792. TextDrawHideForPlayer(playerid, Textdraw0);
  793. TextDrawHideForPlayer(playerid, Textdraw1);
  794. TextDrawHideForPlayer(playerid, Textdraw2);
  795. TextDrawHideForPlayer(playerid, Textdraw3);
  796. TextDrawHideForPlayer(playerid, Textdraw4);
  797. TextDrawHideForPlayer(playerid, Textdraw5);
  798. TextDrawHideForPlayer(playerid, Textdraw6);
  799. TextDrawHideForPlayer(playerid, Textdraw7);
  800. TextDrawHideForPlayer(playerid, Textdraw8);
  801. TextDrawHideForPlayer(playerid, Textdraw9);
  802. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement