Advertisement
Guest User

VIP Sistem.

a guest
Jan 31st, 2015
749
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 29.48 KB | None | 0 0
  1. #include <a_samp>
  2. #include <zcmd>
  3. #include <sscanf2>
  4. #include <Dini>
  5.  
  6. //------------------------------------------------------------------------------
  7.  
  8. enum vInfo
  9. {
  10. Vip,
  11. Float:vX,
  12. Float:vY,
  13. Float:vZ
  14. }
  15.  
  16. //------------------------------------------------------------------------------
  17.  
  18. new VipInfo[MAX_PLAYERS][vInfo];
  19. new God[MAX_PLAYERS];
  20. new VGod[MAX_PLAYERS];
  21. new Text:Textdraw[11];
  22.  
  23. //------------------------------------------------------------------------------
  24.  
  25. CMD:setvip(playerid, params[])
  26. {
  27. new ID, Nivel, name[MAX_PLAYER_NAME], pname[MAX_PLAYER_NAME], string[144], file[50];
  28. if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "{FF0000}EROARE: {FFFFFF}Nu esti autorizat să folosesti această comandă.");
  29. if(sscanf(params, "ui", ID, Nivel)) return SendClientMessage(playerid, -1, "{FF0000}Folosire: {FFFFFF}/SetVip [Jucător ID] [Nivel]");
  30. if(!IsPlayerConnected(ID)) return SendClientMessage(playerid, -1, "{FF0000}EROARE: {FFFFFF}Jucătorul nu este conectat.");
  31. if(Nivel > 3 || Nivel < 1) return SendClientMessage(playerid, -1, "{FF0000}EROARE: {FFFFFF}Nivel invalid. [1-3]");
  32. if(Nivel == VipInfo[ID][Vip]) return SendClientMessage(playerid, -1, "{FF0000}EROARE: {FFFFFF}Jucătorul acela are deja acel nivel de {FF0000}VIP.");
  33. GetPlayerName(playerid, name, sizeof(name));
  34. GetPlayerName(ID, pname, sizeof(pname));
  35. format(string, sizeof(string), "{FF0000}[VIP]: {FFFFFF}Administrator-ul {FF0000}%s {FFFFFF}te-a făcut VIP: {FF0000}%i.", name, Nivel);
  36. SendClientMessage(ID, -1, string);
  37. format(string, sizeof(string), "{FF0000}[VIP]: {FFFFFF}L-ai făcut pe {FF0000}%s {FFFFFF}VIP: {FF0000}%i.", pname, Nivel);
  38. SendClientMessage(playerid, -1, string);
  39. format(file, sizeof(file), "Vip/%s.ini", pname);
  40. if(!fexist(file))
  41. {
  42. dini_Create(file);
  43. dini_Set(file, "Nume", pname);
  44. dini_Set(file, "Facut de", name);
  45. dini_IntSet(file, "Nivel", Nivel);
  46. }
  47. else
  48. {
  49. dini_Set(file, "Nume", pname);
  50. dini_Set(file, "Facut de", name);
  51. dini_IntSet(file, "Nivel", Nivel);
  52. }
  53. VipInfo[ID][Vip] = Nivel;
  54. return 1;
  55. }
  56.  
  57. //------------------------------------------------------------------------------
  58.  
  59. CMD:scoatevip(playerid, params[])
  60. {
  61. new ID, name[MAX_PLAYER_NAME], pname[MAX_PLAYER_NAME], string[144], file[50];
  62. if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "{FF0000}EROARE: {FFFFFF}Nu esti autorizat să folosesti această comandă.");
  63. if(sscanf(params, "u", ID)) return SendClientMessage(playerid, -1, "{FF0000}Folosire: {FFFFFF}/ScoateVip [Jucător ID]");
  64. if(!IsPlayerConnected(ID)) return SendClientMessage(playerid, -1, "{FF0000}EROARE: {FFFFFF}Jucătorul nu este conectat.");
  65. if(VipInfo[ID][Vip] == 0) return SendClientMessage(playerid, -1, "{FF0000}EROARE: {FFFFFF}Jucătorul acela nu are {FF0000}VIP.");
  66. GetPlayerName(playerid, name, sizeof(name));
  67. GetPlayerName(ID, pname, sizeof(pname));
  68. format(string, sizeof(string), "{FF0000}[VIP]: {FFFFFF}I-ai scos VIP-ul lui {FF0000}%s.", pname);
  69. SendClientMessage(playerid, -1, string);
  70. format(string, sizeof(string), "{FF0000}[VIP]: {FFFFFF}Administrator-ul {FF0000}%s {FFFFFF}ti-a scos {FF0000}VIP-ul.", name);
  71. SendClientMessage(ID, -1, string);
  72. VipInfo[ID][Vip] = 0;
  73. format(file, sizeof(file), "Vip/%s.ini", pname);
  74. if(fexist(file))
  75. {
  76. dini_Remove(file);
  77. }
  78. return 1;
  79. }
  80.  
  81. //------------------------------------------------------------------------------
  82.  
  83. CMD:vcmds(playerid, params[])
  84. {
  85. if(VipInfo[playerid][Vip] >= 1)
  86. {
  87. new Dialog[1500];
  88. strcat(Dialog, "{FF0000}Nivel {15FF00}1;\n\n", sizeof(Dialog));
  89. strcat(Dialog, "{FFCC33}(/V)chat {FFFFFF}- Vorbesti cu ceilalti Vipi in chat.\n");
  90. strcat(Dialog, "{FFCC33}/VKill {FFFFFF}- Te sinucizi.\n");
  91. strcat(Dialog, "{FFCC33}/VSpawnMe {FFFFFF}- Te respawmezi într-un loc aleatoriu.\n");
  92. strcat(Dialog, "{FFCC33}/VNos {FFFFFF}- Primesti {15FF00]'NOS' {FFFFFF}la masina ta.\n");
  93. strcat(Dialog, "{FFCC33}/VCC {FFFFFF}- Schimbi culorile masinii tale.\n");
  94. strcat(Dialog, "{FFCC33}/VSave {FFFFFF}- Salvează pozitia.\n");
  95. strcat(Dialog, "{FFCC33}/VLoad {FFFFFF}- Te teleportezi la pozitia salvată.\n");
  96. strcat(Dialog, "{FFCC33}/VCMC {FFFFFF}- Stergi chat-ul tău.\n");
  97. strcat(Dialog, "{FFCC33}/VSkin {FFFFFF}- Schimbi skin-ul în cel dorit de tine.\n");
  98. strcat(Dialog, "{FFCC33}/VMasina {FFFFFF}- Spawmezi masina dorită cu culorile dorite.\n\n");
  99. strcat(Dialog, "{FF0000}Nivel {15FF00}2;\n\n", sizeof(Dialog));
  100. strcat(Dialog, "{FFCC33}/VName {FFFFFF}- Îti schimbi numele în altul dorit de tine.\n");
  101. strcat(Dialog, "{FFCC33}/VHeal {FFFFFF}- Primesti viată.\n");
  102. strcat(Dialog, "{FFCC33}/VArmour {FFFFFF}- Primesti armură.\n");
  103. strcat(Dialog, "{FFCC33}/VGoto {FFFFFF}- Te teleportezi la un jucător.\n");
  104. strcat(Dialog, "{FFCC33}/VWW {FFFFFF}- Primesti un set de arme.\n");
  105. strcat(Dialog, "{FFCC33}/VColor {FFFFFF}- Schimbi culoarea numelui tău.\n");
  106. strcat(Dialog, "{FFCC33}/VJetpack {FFFFFF}- Primesti un Jetpack.\n\n");
  107. strcat(Dialog, "{FF0000}Nivel {15FF00}3;\n\n", sizeof(Dialog));
  108. strcat(Dialog, "{FFCC33}/VGod {FFFFFF}- Activezi/Dezactivezi modul {FF0000}'God'.\n");
  109. strcat(Dialog, "{FFCC33}/VGodCar {FFFFFF}- Activezi/Dezactivezi modul {FF0000}'God' {FFFFFF}la masină.\n");
  110. strcat(Dialog, "{FFCC33}/VipPack {FFFFFF}- Primesti pachetul {15FF00}VIP.\n");
  111. ShowPlayerDialog(playerid, 3000, DIALOG_STYLE_MSGBOX, "Comenzi VIP", Dialog, "Iesi", "");
  112. }
  113. else
  114. {
  115. SendClientMessage(playerid, -1, "{FF0000}EROARE: {FFFFFF}Nu esti autorizat să folosesti această comandă.");
  116. }
  117. return 1;
  118. }
  119.  
  120. //------------------------------------------------------------------------------
  121.  
  122. CMD:vchat(playerid, params[])
  123. {
  124. if(VipInfo[playerid][Vip] >= 1)
  125. {
  126. new name[MAX_PLAYER_NAME], string[75];
  127. GetPlayerName(playerid, name, sizeof(name));
  128. if(isnull(params)) return SendClientMessage(playerid, -1, "{FF0000}Folosire: {FFFFFF}(/v)chat [Text]");
  129. format(string, sizeof(string), "{FF0000}[VIP]: {FFCC33}%s: {FF0000}%s", name, params);
  130. TrimiteMesajLaVipi(-1, string);
  131. }
  132. else
  133. {
  134. SendClientMessage(playerid, -1, "{FF0000}EROARE: {FFFFFF}Nu esti autorizat să folosesti această comandă.");
  135. }
  136. return 1;
  137. }
  138.  
  139. //------------------------------------------------------------------------------
  140.  
  141. CMD:v(playerid, params[]) return cmd_vchat(playerid, params);
  142.  
  143. //------------------------------------------------------------------------------
  144.  
  145. CMD:vspawn(playerid, params[])
  146. {
  147. if(VipInfo[playerid][Vip] >= 1)
  148. {
  149. SpawnPlayer(playerid);
  150. SendClientMessage(playerid, -1, "{FF0000}[VIP]: {FFFFFF}Te-ai respawmat într-un loc aleatoriu.");
  151. }
  152. else
  153. {
  154. SendClientMessage(playerid, -1, "{FF0000}EROARE: {FFFFFF}Nu esti autorizat să folosesti această comandă.");
  155. }
  156. return 1;
  157. }
  158.  
  159. //------------------------------------------------------------------------------
  160.  
  161. CMD:vkill(playerid, params[])
  162. {
  163. if(VipInfo[playerid][Vip] >= 1)
  164. {
  165. SetPlayerHealth(playerid, 0.0);
  166. SendClientMessage(playerid, -1, "{FF0000}[VIP]: {FFFFFF}Te-ai sinucis.");
  167. }
  168. else
  169. {
  170. SendClientMessage(playerid, -1, "{FF0000}EROARE: {FFFFFF}Nu esti autorizat să folosesti această comandă.");
  171. }
  172. return 1;
  173. }
  174.  
  175. //------------------------------------------------------------------------------
  176.  
  177. CMD:vnos(playerid, params[])
  178. {
  179. new veh;
  180. veh = GetPlayerVehicleID(playerid);
  181. if(VipInfo[playerid][Vip] >= 1)
  182. {
  183. if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1, "{FF0000}EROARE: {FFFFFF}Trebuie să fii într-un vehicul.");
  184. AddVehicleComponent(veh, 1010);
  185. SendClientMessage(playerid, -1, "{FF0000}[VIP]: {FFFFFF}Ti-ai adăugat {15FF00}'NOS' {FFFFFF}la masina ta.");
  186. }
  187. else
  188. {
  189. SendClientMessage(playerid, -1, "{FF0000}EROARE: {FFFFFF}Nu esti autorizat să folosesti această comandă.");
  190. }
  191. return 1;
  192. }
  193.  
  194. //------------------------------------------------------------------------------
  195.  
  196. CMD:vcc(playerid, params[])
  197. {
  198. new veh, Culoare1, Culoare2, string[100];
  199. veh = GetPlayerVehicleID(playerid);
  200. if(VipInfo[playerid][Vip] >= 1)
  201. {
  202. if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1, "{FF0000}EROARE: {FFFFFF}Trebuie să fii într-un vehicul.");
  203. if(sscanf(params, "dd", Culoare1, Culoare2)) return SendClientMessage(playerid, -1, "{FF0000}Folosire: {FFFFFF}/VCC [Culoare 1] [Culoare 2]");
  204. format(string, sizeof(string), "{FF0000}[VIP]: {FFFFFF}Ti-ai schimbat culorile masinii tale in: {FF0000}%d, %d.", Culoare1, Culoare2);
  205. SendClientMessage(playerid, -1, string);
  206. ChangeVehicleColor(veh, Culoare1, Culoare2);
  207. }
  208. else
  209. {
  210. SendClientMessage(playerid, -1, "{FF0000}EROARE: {FFFFFF}Nu esti autorizat să folosesti această comandă.");
  211. }
  212. return 1;
  213. }
  214.  
  215. //------------------------------------------------------------------------------
  216.  
  217. CMD:vsave(playerid, params[])
  218. {
  219. new Float:X, Float:Y, Float:Z;
  220. GetPlayerPos(playerid, X, Y, Z);
  221. if(VipInfo[playerid][Vip] >= 1)
  222. {
  223. SendClientMessage(playerid, -1, "{FF0000}[VIP]: {FFFFFF}Pozitie salvată.");
  224. VipInfo[playerid][vX] = X;
  225. VipInfo[playerid][vY] = Y;
  226. VipInfo[playerid][vZ] = Z;
  227. }
  228. else
  229. {
  230. SendClientMessage(playerid, -1, "{FF0000}EROARE: {FFFFFF}Nu esti autorizat să folosesti această comandă.");
  231. }
  232. return 1;
  233. }
  234.  
  235. //------------------------------------------------------------------------------
  236.  
  237. CMD:vload(playerid, params[])
  238. {
  239. if(VipInfo[playerid][Vip] >= 1)
  240. {
  241. SendClientMessage(playerid, -1, "{FF0000}[VIP]: {FFFFFF}Pozitie loaded.");
  242. SetPlayerPos(playerid, VipInfo[playerid][vX], VipInfo[playerid][vY], VipInfo[playerid][vZ]);
  243. }
  244. else
  245. {
  246. SendClientMessage(playerid, -1, "{FF0000}EROARE: {FFFFFF}Nu esti autorizat să folosesti această comandă.");
  247. }
  248. return 1;
  249. }
  250.  
  251. //------------------------------------------------------------------------------
  252.  
  253. CMD:vcmc(playerid, params[])
  254. {
  255. if(VipInfo[playerid][Vip] >= 1)
  256. {
  257. for(new i = 0; i < 50; i++) SendClientMessage(playerid, -1, " ");
  258. SendClientMessage(playerid, -1, "{FF0000}[VIP]: {FFFFFF}Chat-ul tău a fost sters.");
  259. }
  260. else
  261. {
  262. SendClientMessage(playerid, -1, "{FF0000}EROARE: {FFFFFF}Nu esti autorizat să folosesti această comandă.");
  263. }
  264. return 1;
  265. }
  266.  
  267. //------------------------------------------------------------------------------
  268.  
  269. CMD:vskin(playerid, params[])
  270. {
  271. new Skin, string[100];
  272. if(VipInfo[playerid][Vip] >= 1)
  273. {
  274. if(sscanf(params, "i", Skin)) return SendClientMessage(playerid, -1, "{FF0000}Folosire: {FFFFFF}/VSkin [Skin ID]");
  275. if(Skin > 299) return SendClientMessage(playerid, -1, "{FF0000}EROARE: {FFFFFF}Skin invalid. [0 - 299]");
  276. if(GetPlayerSkin(playerid) == Skin) return SendClientMessage(playerid, -1, "{FF0000}EROARE: {FFFFFF}Ai deja acest skin.");
  277. format(string, sizeof(string), "{FF0000}[VIP]: {FFFFFF}Skin-ul tău a fost schimbat în: {FF0000}%i{FFFFFF}.", Skin);
  278. SendClientMessage(playerid, -1, string);
  279. SetPlayerSkin(playerid, Skin);
  280. }
  281. else
  282. {
  283. SendClientMessage(playerid, -1, "{FF0000}EROARE: {FFFFFF}Nu esti autorizat să folosesti această comandă.");
  284. }
  285. return 1;
  286. }
  287.  
  288. //------------------------------------------------------------------------------
  289.  
  290. CMD:vmasina(playerid, params[])
  291. {
  292. new Model, Float:X, Float:Y, Float:Z, Float:A, Culoare1, Culoare2, string[144];
  293. GetPlayerPos(playerid, X, Y, Z);
  294. GetPlayerFacingAngle(playerid, A);
  295. if(VipInfo[playerid][Vip] >= 1)
  296. {
  297. if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1, "{FF0000}EROARE: {FFFFFF}Esti deja într-o masină.");
  298. if(sscanf(params, "idd", Model, Culoare1, Culoare2)) return SendClientMessage(playerid, -1, "{FF0000}Folosire: {FFFFFF}/VMasina [Model ID] [Culoare 1] [Culoare 2]");
  299. if(Model > 611 || Model < 411) return SendClientMessage(playerid, -1, "{FF0000}EROARE: {FFFFFF}Model invalid. [411 - 611]");
  300. AddStaticVehicle(Model, X, Y, Z, A, Culoare1, Culoare2);
  301. format(string, sizeof(string), "{FF0000}[VIP]: {FFFFFF}Ai spawmat o masină: {FF0000}%i {FFFFFF}cu culorile {FF0000}%d, %d.", Model, Culoare1, Culoare2);
  302. SendClientMessage(playerid, -1, string);
  303. }
  304. else
  305. {
  306. SendClientMessage(playerid, -1, "{FF0000}EROARE: {FFFFFF}Nu esti autorizat să folosesti această comandă.");
  307. }
  308. return 1;
  309. }
  310.  
  311. //------------------------------------------------------------------------------
  312.  
  313. CMD:vname(playerid, params[])
  314. {
  315. new name[24], oldfile[50], newfile[50], pname[MAX_PLAYER_NAME], string[100];
  316. GetPlayerName(playerid, pname, sizeof(pname));
  317. if(VipInfo[playerid][Vip] >= 2)
  318. {
  319. if(sscanf(params, "s[24]", name)) return SendClientMessage(playerid, -1, "{FF0000}Folosire: {FFFFFF}/VName [Nume Nou]");
  320. format(oldfile, sizeof(oldfile), "Vip/%s.ini", pname);
  321. format(newfile, sizeof(newfile), "Vip/%s.ini", name);
  322. if(fexist(oldfile))
  323. {
  324. dini_Remove(oldfile);
  325. }
  326. if(fexist(newfile)) return SendClientMessage(playerid, -1, "{FF0000}EROARE: {FFFFFF}Numele este deja luat.");
  327. dini_Create(newfile);
  328. dini_Set(newfile, "Nume", name);
  329. dini_IntSet(newfile, "Vip", VipInfo[playerid][Vip]);
  330. SetPlayerName(playerid, name);
  331. format(string, sizeof(string), "{FF0000}[VIP]: {FFFFFF}Ti-ai schimbat numele în: {FF0000}%s{FFFFFF}.", name);
  332. SendClientMessage(playerid, -1, string);
  333. }
  334. else
  335. {
  336. SendClientMessage(playerid, -1, "{FF0000}EROARE: {FFFFFF}Nu esti autorizat să folosesti această comandă.");
  337. }
  338. return 1;
  339. }
  340.  
  341. //------------------------------------------------------------------------------
  342.  
  343. CMD:vheal(playerid, params[])
  344. {
  345. if(VipInfo[playerid][Vip] >= 2)
  346. {
  347. SetPlayerHealth(playerid, 100);
  348. SendClientMessage(playerid, -1, "{FF0000}[VIP]: {FFFFFF}Ai primit viată.");
  349. }
  350. else
  351. {
  352. SendClientMessage(playerid, -1, "{FF0000}EROARE: {FFFFFF}Nu esti autorizat să folosesti această comandă.");
  353. }
  354. return 1;
  355. }
  356.  
  357. //------------------------------------------------------------------------------
  358.  
  359. CMD:varmour(playerid, params[])
  360. {
  361. if(VipInfo[playerid][Vip] >= 2)
  362. {
  363. SetPlayerArmour(playerid, 100);
  364. SendClientMessage(playerid, -1, "{FF0000}[VIP]: {FFFFFF}Ai primit armură.");
  365. }
  366. else
  367. {
  368. SendClientMessage(playerid, -1, "{FF0000}EROARE: {FFFFFF}Nu esti autorizat să folosesti această comandă.");
  369. }
  370. return 1;
  371. }
  372.  
  373. //------------------------------------------------------------------------------
  374.  
  375. CMD:vgoto(playerid, params[])
  376. {
  377. new Float:X, Float:Y, Float:Z, Float:A, string[144], ID, name[MAX_PLAYER_NAME], pname[MAX_PLAYER_NAME];
  378. if(VipInfo[playerid][Vip] >= 2)
  379. {
  380. if(sscanf(params, "u", ID)) return SendClientMessage(playerid, -1, "{FF0000}Folosire: {FFFFFF}/VGoto [Jucător ID]");
  381. if(!IsPlayerConnected(ID)) return SendClientMessage(playerid, -1, "{FF0000}EROARE: {FFFFFF}Jucătorul nu este conectat.");
  382. if(ID == playerid) return SendClientMessage(playerid, -1, "{FF0000}EROARE: {FFFFFF}Nu te poti teleporta la tine însusi.");
  383. GetPlayerPos(ID, X, Y, Z);
  384. GetPlayerName(playerid, name, sizeof(name));
  385. GetPlayerName(ID, pname, sizeof(pname));
  386. GetPlayerFacingAngle(ID, A);
  387. SetPlayerPos(playerid, X, Y, Z);
  388. SetPlayerFacingAngle(playerid, A);
  389. SetPlayerInterior(playerid, GetPlayerInterior(ID));
  390. SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(ID));
  391. format(string, sizeof(string), "{FF0000}[VIP]: {FFFFFF}Te-ai teleportat la: {FF0000}%s.", pname);
  392. SendClientMessage(playerid, -1, string);
  393. format(string, sizeof(string), "{FF0000}[VIP]: {FFFFFF}Vip-ul: {FF0000}%s {FFFFFF}s-a teleportat la tine.", name);
  394. SendClientMessage(ID, -1, string);
  395. }
  396. else
  397. {
  398. SendClientMessage(playerid, -1, "{FF0000}EROARE: {FFFFFF}Nu esti autorizat să folosesti această comandă.");
  399. }
  400. return 1;
  401. }
  402.  
  403. //------------------------------------------------------------------------------
  404.  
  405. CMD:vww(playerid, params[])
  406. {
  407. if(VipInfo[playerid][Vip] >= 2)
  408. {
  409. Arme(playerid);
  410. }
  411. else
  412. {
  413. SendClientMessage(playerid, -1, "{FF0000}EROARE: {FFFFFF}Nu esti autorizat să folosesti această comandă.");
  414. }
  415. return 1;
  416. }
  417.  
  418. //------------------------------------------------------------------------------
  419.  
  420. CMD:vcolor(playerid, params[])
  421. {
  422. if(VipInfo[playerid][Vip] >= 2)
  423. {
  424. ShowPlayerDialog(playerid, 3001, DIALOG_STYLE_LIST, "Culoare", "{FF0000}Rosu\n{0066CC}Albastru\n{FFFF00}Galben\n{15FF00}Verde\n{FFFFFF}Alb", "Selecteaza", "Iesi");
  425. }
  426. else
  427. {
  428. SendClientMessage(playerid, -1, "{FF0000}EROARE: {FFFFFF}Nu esti autorizat să folosesti această comandă.");
  429. }
  430. return 1;
  431. }
  432.  
  433. //------------------------------------------------------------------------------
  434.  
  435. CMD:vjetpack(playerid, params[])
  436. {
  437. if(VipInfo[playerid][Vip] >= 2)
  438. {
  439. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_USEJETPACK);
  440. SendClientMessage(playerid, -1, "{FF0000}[VIP]: {FFFFFF}Ti-ai spawmat un Jetpack.");
  441. }
  442. else
  443. {
  444. SendClientMessage(playerid, -1, "{FF0000}EROARE: {FFFFFF}Nu esti autorizat să folosesti această comandă.");
  445. }
  446. return 1;
  447. }
  448.  
  449. //------------------------------------------------------------------------------
  450.  
  451. CMD:vgod(playerid, params[])
  452. {
  453. if(VipInfo[playerid][Vip] >= 3)
  454. {
  455. if(God[playerid] == 0)
  456. {
  457. SendClientMessage(playerid, -1, "{FF0000}[VIP]: {FFFFFF}Ti-ai activat modul {FF0000}God.");
  458. God[playerid] = 1;
  459. SetPlayerHealth(playerid, 100000);
  460. }
  461. else if(God[playerid] == 1)
  462. {
  463. SendClientMessage(playerid, -1, "{FF0000}[VIP]: {FFFFFF}Ti-ai dezactivat modul {FF0000}God.");
  464. God[playerid] = 0;
  465. SetPlayerHealth(playerid, 100);
  466. }
  467. }
  468. else
  469. {
  470. SendClientMessage(playerid, -1, "{FF0000}EROARE: {FFFFFF}Nu esti autorizat să folosesti această comandă.");
  471. }
  472. return 1;
  473. }
  474.  
  475. //------------------------------------------------------------------------------
  476.  
  477. CMD:vgodcar(playerid, params[])
  478. {
  479. if(VipInfo[playerid][Vip] >= 3)
  480. {
  481. if(VGod[playerid] == 0)
  482. {
  483. SendClientMessage(playerid, -1, "{FF0000}[VIP]: {FFFFFF}Ti-ai activat modul {FF0000}God {FFFFFF}la masină.");
  484. VGod[playerid] = 1;
  485. SetVehicleHealth(playerid, 100000);
  486. }
  487. else if(VGod[playerid] == 1)
  488. {
  489. SendClientMessage(playerid, -1, "{FF0000}[VIP]: {FFFFFF}Ti-ai dezactivat modul {FF0000}God {FFFFFF}la masină.");
  490. VGod[playerid] = 0;
  491. SetVehicleHealth(playerid, 100);
  492. }
  493. }
  494. else
  495. {
  496. SendClientMessage(playerid, -1, "{FF0000}EROARE: {FFFFFF}Nu esti autorizat să folosesti această comandă.");
  497. }
  498. return 1;
  499. }
  500.  
  501. //------------------------------------------------------------------------------
  502.  
  503. CMD:vippack(playerid, params[])
  504. {
  505. if(VipInfo[playerid][Vip] >= 3)
  506. {
  507. Arme(playerid);
  508. SetPlayerHealth(playerid, 100);
  509. SetPlayerArmour(playerid, 100);
  510. }
  511. else
  512. {
  513. SendClientMessage(playerid, -1, "{FF0000}EROARE: {FFFFFF}Nu esti autorizat să folosesti această comandă.");
  514. }
  515. return 1;
  516. }
  517.  
  518. //------------------------------------------------------------------------------
  519.  
  520. CMD:vipmenu(playerid, params[])
  521. {
  522. if(VipInfo[playerid][Vip] >= 3)
  523. {
  524. ArataMeniu(playerid);
  525. }
  526. else
  527. {
  528. SendClientMessage(playerid, -1, "{FF0000}EROARE: {FFFFFF}Nu esti autorizat să folosesti această comandă.");
  529. }
  530. return 1;
  531. }
  532.  
  533. //------------------------------------------------------------------------------
  534.  
  535. stock LoadVIP(playerid)
  536. {
  537. new name[MAX_PLAYER_NAME], file[50];
  538. GetPlayerName(playerid, name, sizeof(name));
  539. format(file, sizeof(file), "Vip/%s.ini", name);
  540. if(fexist(file))
  541. {
  542. VipInfo[playerid][Vip] = dini_Int(file, "Nivel");
  543. }
  544. printf("VIP STATUS: %s LOADED.", name);
  545. return 1;
  546. }
  547.  
  548. //------------------------------------------------------------------------------
  549.  
  550. stock Arme(playerid)
  551. {
  552. GivePlayerWeapon(playerid, 24, 9999);
  553. GivePlayerWeapon(playerid, 28, 9999);
  554. GivePlayerWeapon(playerid, 30, 9999);
  555. GivePlayerWeapon(playerid, 34, 9999);
  556. SendClientMessage(playerid, -1, "{FF0000}[VIP]: {FFFFFF}Ai primit pachetul cu arme.");
  557. }
  558.  
  559. //------------------------------------------------------------------------------
  560.  
  561. stock SeteazaVIP(playerid, nivel)
  562. {
  563. VipInfo[playerid][Vip] = nivel;
  564. return 1;
  565. }
  566.  
  567. //------------------------------------------------------------------------------
  568.  
  569. stock TrimiteMesajLaVipi(culoare, string[])
  570. {
  571. for(new i = 0; i < MAX_PLAYERS; i++)
  572. {
  573. if(IsPlayerConnected(i))
  574. {
  575. if(VipInfo[i][Vip] >= 1)
  576. {
  577. SendClientMessage(culoare, culoare, string);
  578. }
  579. }
  580. }
  581. }
  582.  
  583. //------------------------------------------------------------------------------
  584.  
  585. stock GetPlayerVip(playerid)
  586. {
  587. new vrank[100];
  588. switch(VipInfo[playerid][Vip])
  589. {
  590. case 3: vrank = "Gold VIP";
  591. case 2: vrank = "Silver VIP";
  592. case 1: vrank = "VIP";
  593. default: vrank = "Nimic";
  594. }
  595. return vrank;
  596. }
  597.  
  598. //------------------------------------------------------------------------------
  599.  
  600. stock EsteJucatorulVip(playerid)
  601. {
  602. if(VipInfo[playerid][Vip] >= 1) return true;
  603. else return false;
  604. }
  605.  
  606. //------------------------------------------------------------------------------
  607.  
  608. stock ArataMeniu(playerid)
  609. {
  610. TextDrawShowForPlayer(playerid, Textdraw[0]);
  611. TextDrawShowForPlayer(playerid, Textdraw[1]);
  612. TextDrawShowForPlayer(playerid, Textdraw[2]);
  613. TextDrawShowForPlayer(playerid, Textdraw[3]);
  614. TextDrawShowForPlayer(playerid, Textdraw[4]);
  615. TextDrawShowForPlayer(playerid, Textdraw[5]);
  616. TextDrawShowForPlayer(playerid, Textdraw[6]);
  617. TextDrawShowForPlayer(playerid, Textdraw[7]);
  618. TextDrawShowForPlayer(playerid, Textdraw[8]);
  619. TextDrawShowForPlayer(playerid, Textdraw[9]);
  620. SelectTextDraw(playerid, 0xFFFFFFFF);
  621. }
  622.  
  623. //------------------------------------------------------------------------------
  624.  
  625. stock InchideMeniu(playerid)
  626. {
  627. TextDrawHideForPlayer(playerid, Textdraw[0]);
  628. TextDrawHideForPlayer(playerid, Textdraw[1]);
  629. TextDrawHideForPlayer(playerid, Textdraw[2]);
  630. TextDrawHideForPlayer(playerid, Textdraw[3]);
  631. TextDrawHideForPlayer(playerid, Textdraw[4]);
  632. TextDrawHideForPlayer(playerid, Textdraw[5]);
  633. TextDrawHideForPlayer(playerid, Textdraw[6]);
  634. TextDrawHideForPlayer(playerid, Textdraw[7]);
  635. TextDrawHideForPlayer(playerid, Textdraw[8]);
  636. TextDrawHideForPlayer(playerid, Textdraw[9]);
  637. CancelSelectTextDraw(playerid);
  638. }
  639.  
  640. //------------------------------------------------------------------------------
  641.  
  642. public OnPlayerConnect(playerid)
  643. {
  644. LoadVIP(playerid);
  645. VGod[playerid] = 0;
  646. God[playerid] = 0;
  647. return 1;
  648. }
  649.  
  650. //------------------------------------------------------------------------------
  651.  
  652. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  653. {
  654. if(dialogid == 3001)
  655. {
  656. if(response)
  657. {
  658. if(listitem == 0)
  659. {
  660. SetPlayerColor(playerid, 0xFF0000FF);
  661. SendClientMessage(playerid, -1, "{FF0000}[VIP]: {FFFFFF}Culoare {FF0000}setata.");
  662. }
  663. if(listitem == 1)
  664. {
  665. SetPlayerColor(playerid, 0x0066CCFF);
  666. SendClientMessage(playerid, -1, "{FF0000}[VIP]: {FFFFFF}Culoare {0066CC}setata.");
  667. }
  668. if(listitem == 2)
  669. {
  670. SetPlayerColor(playerid, 0xFFFF00FF);
  671. SendClientMessage(playerid, -1, "{FF0000}[VIP]: {FFFFFF}Culoare {FFFF00}setata.");
  672. }
  673. if(listitem == 3)
  674. {
  675. SetPlayerColor(playerid, 0x15FF00FF);
  676. SendClientMessage(playerid, -1, "{FF0000}[VIP]: {FFFFFF}Culoare {15FF00}setata.");
  677. }
  678. if(listitem == 4)
  679. {
  680. SetPlayerColor(playerid, 0xFFFFFFFF);
  681. SendClientMessage(playerid, -1, "{FF0000}[VIP]: {FFFFFF}Culoare setata.");
  682. }
  683. }
  684. }
  685. return 1;
  686. }
  687.  
  688. //------------------------------------------------------------------------------
  689.  
  690. public OnPlayerClickTextDraw(playerid, Text:clickedid)
  691. {
  692. if(clickedid == Textdraw[3])
  693. {
  694. SetPlayerHealth(playerid, 100);
  695. SendClientMessage(playerid, -1, "{FF0000}[VIP MENU]: {FFFFFF}Ai primit viată.");
  696. }
  697. else if(clickedid == Textdraw[4])
  698. {
  699. SetPlayerArmour(playerid, 100);
  700. SendClientMessage(playerid, -1, "{FF0000}[VIP MENU]: {FFFFFF}Ai primit armură.");
  701. }
  702. else if(clickedid == Textdraw[5])
  703. {
  704. Arme(playerid);
  705. }
  706. else if(clickedid == Textdraw[6])
  707. {
  708. if(God[playerid] == 0)
  709. {
  710. SendClientMessage(playerid, -1, "{FF0000}[VIP MENU]: {FFFFFF}Ti-ai activat modul {FF0000}God.");
  711. God[playerid] = 1;
  712. SetPlayerHealth(playerid, 100000);
  713. }
  714. else if(God[playerid] == 1)
  715. {
  716. SendClientMessage(playerid, -1, "{FF0000}[VIP MENU]: {FFFFFF}Ti-ai dezactivat modul {FF0000}God.");
  717. God[playerid] = 0;
  718. SetPlayerHealth(playerid, 100);
  719. }
  720. }
  721. else if(clickedid == Textdraw[7])
  722. {
  723. if(VGod[playerid] == 0)
  724. {
  725. SendClientMessage(playerid, -1, "{FF0000}[VIP MENU]: {FFFFFF}Ti-ai activat modul {FF0000}God {FFFFFF}la masină.");
  726. VGod[playerid] = 1;
  727. SetVehicleHealth(playerid, 100000);
  728. }
  729. else if(VGod[playerid] == 1)
  730. {
  731. SendClientMessage(playerid, -1, "{FF0000}[VIP MENU]: {FFFFFF}Ti-ai dezactivat modul {FF0000}God {FFFFFF}la masină.");
  732. VGod[playerid] = 0;
  733. SetVehicleHealth(playerid, 100);
  734. }
  735. }
  736. else if(clickedid == Textdraw[8])
  737. {
  738. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_USEJETPACK);
  739. SendClientMessage(playerid, -1, "{FF0000}[VIP MENU]: {FFFFFF}Ti-ai spawmat un Jetpack.");
  740. }
  741. else if(clickedid == Textdraw[9])
  742. {
  743. InchideMeniu(playerid);
  744. }
  745. return 1;
  746. }
  747.  
  748. //------------------------------------------------------------------------------
  749.  
  750. public OnPlayerText(playerid, text[])
  751. {
  752. new name[MAX_PLAYER_NAME], string[100];
  753. GetPlayerName(playerid, name, sizeof(name));
  754. if(VipInfo[playerid][Vip] >= 1)
  755. {
  756. format(string, sizeof(string), "{FF0000}[VIP]: {15FF00}%s: {FFFFFF}%s", name, text);
  757. SendClientMessageToAll(-1, string);
  758. return 1;
  759. }
  760. return 0;
  761. }
  762.  
  763. //------------------------------------------------------------------------------
  764.  
  765. public OnFilterScriptInit()
  766. {
  767. Textdraw[0] = TextDrawCreate(649.999938, 150.086700, "usebox");
  768. TextDrawLetterSize(Textdraw[0], 0.000000, 33.117408);
  769. TextDrawTextSize(Textdraw[0], 381.999969, 0.000000);
  770. TextDrawAlignment(Textdraw[0], 1);
  771. TextDrawColor(Textdraw[0], 0);
  772. TextDrawUseBox(Textdraw[0], true);
  773. TextDrawBoxColor(Textdraw[0], 255);
  774. TextDrawSetShadow(Textdraw[0], 0);
  775. TextDrawSetOutline(Textdraw[0], 0);
  776. TextDrawFont(Textdraw[0], 0);
  777.  
  778. Textdraw[1] = TextDrawCreate(429.600067, 150.826629, "Meniu VIP");
  779. TextDrawLetterSize(Textdraw[1], 0.660399, 2.861866);
  780. TextDrawAlignment(Textdraw[1], 1);
  781. TextDrawColor(Textdraw[1], 16777215);
  782. TextDrawSetShadow(Textdraw[1], 0);
  783. TextDrawSetOutline(Textdraw[1], 1);
  784. TextDrawBackgroundColor(Textdraw[1], 51);
  785. TextDrawFont(Textdraw[1], 2);
  786. TextDrawSetProportional(Textdraw[1], 1);
  787.  
  788. Textdraw[2] = TextDrawCreate(546.400085, 178.453323, "by HY.");
  789. TextDrawLetterSize(Textdraw[2], 0.449999, 1.600000);
  790. TextDrawAlignment(Textdraw[2], 1);
  791. TextDrawColor(Textdraw[2], -1);
  792. TextDrawSetShadow(Textdraw[2], 0);
  793. TextDrawSetOutline(Textdraw[2], 1);
  794. TextDrawBackgroundColor(Textdraw[2], 51);
  795. TextDrawFont(Textdraw[2], 2);
  796. TextDrawSetProportional(Textdraw[2], 1);
  797.  
  798. Textdraw[3] = TextDrawCreate(394.400085, 221.759994, "- Viata");
  799. TextDrawLetterSize(Textdraw[3], 0.562799, 2.182400);
  800. TextDrawAlignment(Textdraw[3], 1);
  801. TextDrawColor(Textdraw[3], -1);
  802. TextDrawSetShadow(Textdraw[3], 0);
  803. TextDrawSetOutline(Textdraw[3], 1);
  804. TextDrawBackgroundColor(Textdraw[3], 51);
  805. TextDrawFont(Textdraw[3], 2);
  806. TextDrawSetProportional(Textdraw[3], 1);
  807. TextDrawSetSelectable(Textdraw[3], true);
  808.  
  809. Textdraw[4] = TextDrawCreate(391.200012, 250.880035, "- Armura");
  810. TextDrawLetterSize(Textdraw[4], 0.504399, 1.906133);
  811. TextDrawAlignment(Textdraw[4], 1);
  812. TextDrawColor(Textdraw[4], -1);
  813. TextDrawSetShadow(Textdraw[4], 0);
  814. TextDrawSetOutline(Textdraw[4], 1);
  815. TextDrawBackgroundColor(Textdraw[4], 51);
  816. TextDrawFont(Textdraw[4], 2);
  817. TextDrawSetProportional(Textdraw[4], 1);
  818. TextDrawSetSelectable(Textdraw[4], true);
  819.  
  820. Textdraw[5] = TextDrawCreate(390.400146, 280.746734, "- Arme");
  821. TextDrawLetterSize(Textdraw[5], 0.535600, 1.891200);
  822. TextDrawAlignment(Textdraw[5], 1);
  823. TextDrawColor(Textdraw[5], -1);
  824. TextDrawSetShadow(Textdraw[5], 0);
  825. TextDrawSetOutline(Textdraw[5], 1);
  826. TextDrawBackgroundColor(Textdraw[5], 51);
  827. TextDrawFont(Textdraw[5], 2);
  828. TextDrawSetProportional(Textdraw[5], 1);
  829. TextDrawSetSelectable(Textdraw[5], true);
  830.  
  831. Textdraw[6] = TextDrawCreate(390.399993, 311.359985, "- God Mode");
  832. TextDrawLetterSize(Textdraw[6], 0.502000, 1.995733);
  833. TextDrawAlignment(Textdraw[6], 1);
  834. TextDrawColor(Textdraw[6], -1);
  835. TextDrawSetShadow(Textdraw[6], 0);
  836. TextDrawSetOutline(Textdraw[6], 1);
  837. TextDrawBackgroundColor(Textdraw[6], 51);
  838. TextDrawFont(Textdraw[6], 2);
  839. TextDrawSetProportional(Textdraw[6], 1);
  840. TextDrawSetSelectable(Textdraw[6], true);
  841.  
  842. Textdraw[7] = TextDrawCreate(392.799896, 342.719940, "- God Mode la masina");
  843. TextDrawLetterSize(Textdraw[7], 0.479599, 1.913600);
  844. TextDrawAlignment(Textdraw[7], 1);
  845. TextDrawColor(Textdraw[7], -1);
  846. TextDrawSetShadow(Textdraw[7], 0);
  847. TextDrawSetOutline(Textdraw[7], 1);
  848. TextDrawBackgroundColor(Textdraw[7], 51);
  849. TextDrawFont(Textdraw[7], 2);
  850. TextDrawSetProportional(Textdraw[7], 1);
  851. TextDrawSetSelectable(Textdraw[7], true);
  852.  
  853. Textdraw[8] = TextDrawCreate(393.600036, 376.319946, "- Jetpack");
  854. TextDrawLetterSize(Textdraw[8], 0.509200, 2.003199);
  855. TextDrawAlignment(Textdraw[8], 1);
  856. TextDrawColor(Textdraw[8], -1);
  857. TextDrawSetShadow(Textdraw[8], 0);
  858. TextDrawSetOutline(Textdraw[8], 1);
  859. TextDrawBackgroundColor(Textdraw[8], 51);
  860. TextDrawFont(Textdraw[8], 2);
  861. TextDrawSetProportional(Textdraw[8], 1);
  862. TextDrawSetSelectable(Textdraw[8], true);
  863.  
  864. Textdraw[9] = TextDrawCreate(520.000366, 425.599945, "Inchide");
  865. TextDrawLetterSize(Textdraw[9], 0.552400, 2.189866);
  866. TextDrawAlignment(Textdraw[9], 1);
  867. TextDrawColor(Textdraw[9], -5963521);
  868. TextDrawSetShadow(Textdraw[9], 0);
  869. TextDrawSetOutline(Textdraw[9], 1);
  870. TextDrawBackgroundColor(Textdraw[9], 51);
  871. TextDrawFont(Textdraw[9], 2);
  872. TextDrawSetProportional(Textdraw[9], 1);
  873. TextDrawSetSelectable(Textdraw[9], true);
  874. return 1;
  875. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement