Guest User

Untitled

a guest
Oct 18th, 2017
929
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 32.09 KB | None | 0 0
  1. // == Includes
  2. #include <a_samp>
  3. #include <sscanf>
  4. #include <zcmd>
  5. #include <dof2>
  6.  
  7. // == Cores
  8. #define OURO 0xEEC900FF
  9. #define PRATA 0x9C9C9CFF
  10. #define BRONZE 0x8B5A2BFF
  11. #define COR_VIP 0x008B00FF
  12. #define VERMELHO 0xFF030FFF
  13. #define LARANJA 0xF97804FF
  14. #define CINZA 0xCECECEFF
  15.  
  16. // == Dialogs
  17. #define DIALOG_VIPS 4995
  18. #define DIALOG_VENC_VIP 4996
  19. #define DIALOG_COMANDOS_VIP 4997
  20. #define DIALOG_EFECTS 4998
  21. #define DIALOG_TOYS 4999
  22.  
  23. #define DIALOG_ENABLE_KEY 5000
  24. #define DIALOG_NEW_KEY 5001
  25. #define DIALOG_NEW_KEY_LEVEL 5005
  26. #define DIALOG_NEW_KEY_DAYS 5002
  27. #define DIALOG_KEY_CONFIRM 5003
  28. #define DIALOG_REMOVE_KEY 5004
  29.  
  30.  
  31. enum pInfo
  32. {
  33. Vip,
  34. DiasVip,
  35. TempoVip,
  36. vKey[25],
  37. vDias,
  38. vNivel,
  39. Nome,
  40. bool:PegouKit,
  41. bool:PegouColete
  42. };
  43. new PlayerInfo[MAX_PLAYERS][pInfo], Timer, CarrosCriados[100], TodosCarros = 0;
  44.  
  45.  
  46. public OnFilterScriptInit()
  47. {
  48. print("Sistema C-VIP v2.0 carregado com sucesso.");
  49. print(" Criado por: Cleyson Stein.");
  50.  
  51. Timer = SetTimer("CheckVip", 60000, true);
  52. return 1;
  53. }
  54.  
  55. public OnFilterScriptExit()
  56. {
  57. KillTimer(Timer);
  58. DOF2_Exit();
  59. return 1;
  60. }
  61.  
  62. public OnPlayerConnect(playerid)
  63. {
  64. GetPlayerName(playerid, PlayerInfo[playerid][Nome], 24);
  65.  
  66. new var[40];
  67. format(var, sizeof(var), "cVIP/Vips/%s.ini", PlayerInfo[playerid][Nome]);
  68.  
  69. if(DOF2_FileExists(var))
  70. {
  71. PlayerInfo[playerid][Vip] = DOF2_GetInt(var, "Nivel");
  72. PlayerInfo[playerid][DiasVip] = DOF2_GetInt(var, "Dias");
  73. PlayerInfo[playerid][TempoVip] = DOF2_GetInt(var, "TempoVip");
  74. } else {
  75. PlayerInfo[playerid][Vip] = 0;
  76. PlayerInfo[playerid][DiasVip] = 0;
  77. PlayerInfo[playerid][TempoVip] = 0;
  78. }
  79. return 1;
  80. }
  81.  
  82. public OnPlayerDisconnect(playerid, reason)
  83. {
  84. if(PlayerInfo[playerid][Vip] > 0)
  85. {
  86. new var[40];
  87. format(var, sizeof(var), "cVIP/Vips/%s.ini", PlayerInfo[playerid][Nome]);
  88. if(!DOF2_FileExists(var)) DOF2_CreateFile(var);
  89.  
  90. DOF2_SetInt(var, "Nivel", PlayerInfo[playerid][Vip]);
  91. DOF2_SetInt(var, "Dias", PlayerInfo[playerid][DiasVip]);
  92. DOF2_SetInt(var, "TempoVip", PlayerInfo[playerid][TempoVip]);
  93. DOF2_SaveFile();
  94. }
  95. return 1;
  96. }
  97.  
  98. public OnPlayerDeath(playerid, killerid, reason)
  99. {
  100. if(PlayerInfo[playerid][PegouKit] == true) LiberarKit(playerid);
  101. if(PlayerInfo[playerid][PegouColete] == true) LiberarColete(playerid);
  102. return 1;
  103. }
  104.  
  105. SetVip(playerid, Nivel, Dias)
  106. {
  107. new stringV[70];
  108. if(PlayerInfo[playerid][Vip] > 0)
  109. {
  110. format(stringV, sizeof stringV, "C-VIP: Seu VIP foi renovado. + %d dias. Nivel: %d.", Dias, Nivel);
  111. PlayerInfo[playerid][TempoVip] += Dias;
  112. PlayerInfo[playerid][DiasVip] += Dias;
  113. PlayerInfo[playerid][Vip] = Nivel;
  114.  
  115. } else {
  116.  
  117. format(stringV, sizeof stringV, "C-VIP: Seu VIP foi ativado. %d dias. Nivel: %d. /ComandosVip", Dias, Nivel);
  118. PlayerInfo[playerid][TempoVip] = Dias;
  119. PlayerInfo[playerid][DiasVip] = Dias;
  120. PlayerInfo[playerid][Vip] = Nivel;
  121. }
  122. SendClientMessage(playerid, COR_VIP, stringV);
  123. return 1;
  124. }
  125.  
  126. RemoveVip(playerid)
  127. {
  128. PlayerInfo[playerid][TempoVip] = 0;
  129. PlayerInfo[playerid][Vip] = 0;
  130. PlayerInfo[playerid][DiasVip] = 0;
  131. SendClientMessage(playerid, COR_VIP, "C-VIP: Seus dias VIP chegaram ao fim. Para renovar adquira uma nova key VIP.");
  132. return 1;
  133. }
  134.  
  135. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  136. {
  137. switch(dialogid)
  138. {
  139. case DIALOG_NEW_KEY:
  140. {
  141. if(!response) return 1;
  142. if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_NEW_KEY, DIALOG_STYLE_INPUT, "KEYS VIP", "\nDigite uma nova key válida\n{FFFF00}Letras e Numeros são aceitos:\n\n", "Criar", "Cancelar");
  143. format(PlayerInfo[playerid][vKey], 50, inputtext);
  144. new Dialog[128];
  145. format(Dialog, sizeof Dialog, "{FFFFFF}Seu novo codigo VIP: {DE3A3A}%s\n\n{FFFFFF}Agora nos informe a quantidade de dias VIP:", PlayerInfo[playerid][vKey]);
  146. ShowPlayerDialog(playerid, DIALOG_NEW_KEY_DAYS, DIALOG_STYLE_INPUT, "KEYS VIP", Dialog, "Criar", "Cancelar");
  147. }
  148.  
  149. case DIALOG_NEW_KEY_DAYS:
  150. {
  151. if(!IsNumeric(inputtext)) return SendClientMessage(playerid, VERMELHO, "ERRO: Digite uma quantidade de dias válidos.");
  152. if(strval(inputtext) <= 0) return SendClientMessage(playerid, VERMELHO, "ERRO: Não pode ser criada uma Key com 0 dias vips.");
  153. PlayerInfo[playerid][vDias] = strval(inputtext);
  154. new Dialog[170];
  155. format(Dialog, sizeof Dialog, "{FFFFFF}Seu novo codigo VIP: {DE3A3A}%s\n{FFFFFF}Vencimento: {DE3A3A}%d dias\n\n{FFFFFF}Agora nos informe o nivel da key VIP: {DE3A3A}1 a 3", PlayerInfo[playerid][vKey], PlayerInfo[playerid][vDias]);
  156. ShowPlayerDialog(playerid, DIALOG_NEW_KEY_LEVEL, DIALOG_STYLE_INPUT, "KEYS VIP", Dialog, "Criar", "Cancelar");
  157. }
  158.  
  159. case DIALOG_NEW_KEY_LEVEL:
  160. {
  161. if(!IsNumeric(inputtext)) return SendClientMessage(playerid, VERMELHO, "ERRO: Digite uma quantidade de nivel válidos 1 a 3.");
  162. if(strval(inputtext) < 1 || strval(inputtext) > 3) return SendClientMessage(playerid, VERMELHO, "ERRO: Digite uma quantidade de nivel válidos 1 a 3.");
  163. PlayerInfo[playerid][vNivel] = strval(inputtext);
  164. new Dialog[190];
  165. format(Dialog, sizeof Dialog, "{FFFFFF}Informações de sua nova key:\n\nCódigo: {DE3A3A}%s\n{FFFFFF}Vencimento: {DE3A3A}%d dias\n{FFFFFF}Nivel: {DE3A3A}%d\n\n{FFFFFF}Deseja criar ?", PlayerInfo[playerid][vKey], PlayerInfo[playerid][vDias], PlayerInfo[playerid][vNivel]);
  166. ShowPlayerDialog(playerid, DIALOG_KEY_CONFIRM, DIALOG_STYLE_MSGBOX, "KEYS VIP", Dialog, "Sim", "Não");
  167. }
  168.  
  169. case DIALOG_KEY_CONFIRM:
  170. {
  171. if(!response) return 1;
  172.  
  173. new var[40];
  174. format(var, sizeof(var), "cVIP/Keys/%s.ini", PlayerInfo[playerid][vKey]);
  175. if(DOF2_FileExists(var)) return SendClientMessage(playerid, VERMELHO, "ERRO: Key ja existente.");
  176.  
  177. DOF2_CreateFile(var);
  178. DOF2_SetString(var, "Key", PlayerInfo[playerid][vKey]);
  179. DOF2_SetInt(var, "Dias", PlayerInfo[playerid][vDias]);
  180. DOF2_SetInt(var, "Nivel", PlayerInfo[playerid][vNivel]);
  181. DOF2_SaveFile();
  182.  
  183. new MsgKeyVip[70];
  184. SendClientMessage(playerid, LARANJA, "KEY: Nova Key VIP criada.");
  185. format(MsgKeyVip, sizeof MsgKeyVip, "KEY: [%s] - DIAS: [%d] - NIVEL: [%d]", PlayerInfo[playerid][vKey], PlayerInfo[playerid][vDias], PlayerInfo[playerid][vNivel]);
  186. SendClientMessage(playerid, LARANJA, MsgKeyVip);
  187. }
  188.  
  189. case DIALOG_REMOVE_KEY:
  190. {
  191. new var[40];
  192. format(var, sizeof(var), "cVIP/Keys/%s.ini", inputtext);
  193. if(!DOF2_FileExists(var)) return SendClientMessage(playerid, VERMELHO, "ERRO: Key não existente.");
  194.  
  195. DOF2_RemoveFile(var);
  196. DOF2_SaveFile();
  197.  
  198. new MsgKeyVip[60];
  199. format(MsgKeyVip, sizeof MsgKeyVip, "ADMIN: A key %s foi removida com sucesso.", inputtext);
  200. SendClientMessage(playerid, LARANJA, MsgKeyVip);
  201. }
  202.  
  203. case DIALOG_ENABLE_KEY:
  204. {
  205. new var[40];
  206. format(var, sizeof(var), "cVIP/Keys/%s.ini", inputtext);
  207. if(!DOF2_FileExists(var)) return SendClientMessage(playerid, VERMELHO, "ERRO: Key não existente.");
  208.  
  209. new ValorDias = DOF2_GetInt(var, "Dias");
  210. new Nivel = DOF2_GetInt(var, "Nivel");
  211.  
  212. SetVip(playerid, Nivel, ValorDias);
  213.  
  214. DOF2_RemoveFile(var);
  215. DOF2_SaveFile();
  216. }
  217.  
  218. case DIALOG_TOYS:
  219. {
  220. if(!response) return 1;
  221. SendClientMessage(playerid, COR_VIP, "C-VIP: Use /tbrinq para remover o brinquedo.");
  222. GameTextForPlayer(playerid, "~g~/tbrinquedos", 2000, 3);
  223. switch(listitem)
  224. {
  225. case 0: SetPlayerAttachedObject(playerid, 0, 19330, 2, 0.166000, -0.038999, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 1.000000, 1.000000);
  226. case 1: SetPlayerAttachedObject(playerid, 0, 19161, 2, 0.078999, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 1.000000, 1.000000);
  227. case 2: SetPlayerAttachedObject(playerid, 0, 18639, 2, 0.131000, 0.019000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 1.000000, 1.000000);
  228. case 3: SetPlayerAttachedObject(playerid, 0, 18638, 2, 0.148999, 0.031000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 1.000000, 1.000000);
  229. case 4: SetPlayerAttachedObject(playerid, 0, 18939, 2, 0.164000, 0.001999, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 1.000000, 1.000000);
  230. case 5: SetPlayerAttachedObject(playerid, 0, 19488, 2, 0.121999, 0.000000, -0.005999, -83.199966, 98.200027, -2.500000, 1.000000, 1.000000, 1.000000);
  231. case 6: SetPlayerAttachedObject(playerid, 0, 19352, 2, 0.106999, 0.016000, -0.010999, 4.500000, 82.099990, -3.100001, 1.000000, 1.000000, 1.000000);
  232. case 7: SetPlayerAttachedObject(playerid, 0, 19090, 2, -0.315999, 0.019999, 0.030000, 0.000000, 0.000000, 0.000000, 1.455999, 0.526000, 0.541000);
  233. case 8: SetPlayerAttachedObject(playerid, 0, 19424, 2, 0.070999, -0.026000, -0.002000, -85.299987, 1.600005, -99.500000, 0.944001, 0.915000, 0.809999);
  234. case 9: SetPlayerAttachedObject(playerid, 0, 19078, 1, -1.000000,-0.517000,0.000000,0.000000,0.299999,10.499994,8.673998,9.400999,7.410993);
  235. case 10: SetPlayerAttachedObject(playerid,0, 19078, 4, -0.067000,0.053999,0.018000,-168.400039,-169.800003,-2.800000,1.000000,1.000000,1.000000);
  236. case 11: SetPlayerAttachedObject(playerid,0, 19085, 2, 0.090999,0.035000,-0.015000,106.599983,83.199996,0.800003,1.000000,1.000000,1.000000);
  237. case 12: SetPlayerAttachedObject(playerid,1, 19086, 15, 0.051000,0.000000,-0.424999,0.000000,0.000000,-102.100006,1.000000,1.000000,1.000000);
  238. case 13: SetPlayerAttachedObject(playerid,0, 19137, 2, 0.101000,0.000000,0.000000,0.000000,0.000000,0.000000,1.000000,1.000000,1.000000);
  239. case 14: SetPlayerAttachedObject(playerid,0, 19137, 15, 0.040999,0.000000,-0.130000,-86.300003,106.100013,-96.100051,7.741999,4.874000,5.584998);
  240. case 15: SetPlayerAttachedObject(playerid,0, 19315, 1, -0.247999,0.509999,-0.015999,4.300004,86.900024,85.500015,3.010000,4.463000,3.824000);
  241. case 16: SetPlayerAttachedObject(playerid,0, 19314, 2, 0.157000,0.000000,0.000000,-0.199999,-7.600006,-88.599998,1.000000,1.000000,1.000000);
  242. case 17: SetPlayerAttachedObject(playerid,0, 19314, 2, 0.157000,0.000000,0.000000,1.400000,-7.600006,-28.599973,0.711000,0.919999,0.361999);
  243. case 18: SetPlayerAttachedObject(playerid,0, 19320, 2, 0.000000,0.000000,0.000000,4.299999,72.999992,3.199999,3.594999,3.787999,4.951001);
  244. case 19: SetPlayerAttachedObject(playerid,0, 18963, 2, 0.261000,0.084999,0.004999,4.999999,85.400039,84.699974,2.097000,2.627000,3.033999);
  245. case 20: SetPlayerAttachedObject(playerid,0, 1607, 2, 0.267000,0.000000,0.000000,-0.199999,81.199996,-3.499999,1.135000,1.000000,1.126999);
  246. case 21: SetPlayerAttachedObject(playerid,0, 1608, 1, 0.000000,0.000000,0.000000,0.499999,89.200042,0.199999,1.000000,1.000000,1.000000);
  247. case 22: SetPlayerAttachedObject(playerid,0, 1609, 1, -0.358000,0.000000,0.170000,0.000000,93.099998,0.000000,1.427000,1.509000,1.641000);
  248. case 23: SetPlayerAttachedObject(playerid,0, 16442, 15, 0.000000,0.000000,0.259000,0.000000,0.000000,-104.400001,1.000000,1.000000,1.000000);
  249. case 24: SetPlayerAttachedObject(playerid,1, 373, 1, 0.33, -0.029, -0.15, 65, 25, 35);
  250. case 25: SetPlayerAttachedObject(playerid,1, 1240, 1, 0.15, 0.17, 0.06, 0.0, 90.0, 0.0);
  251. case 26: SetPlayerAttachedObject(playerid,1, 1252, 1, 0.1, -0.2, 0.0, 0.0, 90.0, 0.0);
  252. case 27: SetPlayerAttachedObject(playerid,1, 356, 1, -0.2, -0.15, 0.0, 0.0, 24.0, 0.0);
  253. case 28: SetPlayerAttachedObject(playerid,1 ,359, 15 ,-0.02 ,0.08 ,-0.3 ,0 ,50 ,-10);
  254. case 29: SetPlayerAttachedObject(playerid,0, 19065, 2, 0.120000, 0.040000, -0.003500, 0, 100, 100, 1.4, 1.4, 1.4);
  255. case 30: SetPlayerAttachedObject(playerid,0 ,1852 ,2 ,0.1 ,0 ,-0.01 ,0 ,15 ,0);
  256. case 31: SetPlayerAttachedObject(playerid,1, 1654, 1, 0.1,0.20,0.0,180.0,100.0,0.0);
  257. }
  258. }
  259.  
  260. case DIALOG_EFECTS:
  261. {
  262. if(!response) return 1;
  263. SendClientMessage(playerid, COR_VIP, "C-VIP: Use /tefeitos para remover o efeito.");
  264. GameTextForPlayer(playerid, "~g~/tefeitos", 2000, 3);
  265. switch(listitem)
  266. {
  267. case 0: SetPlayerAttachedObject(playerid,1,18688,1,-0.895839,0.631365,-1.828601,21.642332,7.385670,13.958697,1.232679,1.000000,1.090367); // fire - Bruno
  268. case 1: SetPlayerAttachedObject(playerid,1,18742,1,0.036487,-1.759890,1.772809,225.616638,1.132580,0.677276,1.000000,1.000000,1.000000); // water_speed - explosaoaquatica
  269. case 2: SetPlayerAttachedObject(playerid,1,18864,1,2.178843,0.000000,0.000000,0.000000,0.000000,0.000000,1.000000,1.000000,1.000000); // FakeSnow1 - neve
  270. case 3: SetPlayerAttachedObject(playerid,1,867,1,-0.213616,-0.444311,0.070721,0.000000,0.000000,0.000000,1.000000,1.000000,1.000000); // p_rubble04col - pedras
  271. case 4: SetPlayerAttachedObject(playerid,1,1254,1,0.448984,0.065604,0.006619,4.313228,89.284942,0.000000,1.000000,1.000000,1.000000); // killfrenzy - caveira
  272. case 5: SetPlayerAttachedObject(playerid,1,1242,1,0.090351,0.088730,-0.000036,0.000000,89.157951,0.000000,1.619548,1.000000,1.348966); // bodyarmour - colete
  273. case 6: SetPlayerAttachedObject(playerid,1,18735,1,0.000000,-0.479024,-1.590823,0.000000,0.000000,0.000000,13.498819,1.000000,0.678294); // vent2 - fumaçao
  274. case 7: SetPlayerAttachedObject(playerid,1,19065,15,-0.025,-0.04,0.23,0,0,270,2,2,2); // Toca de Natal
  275.  
  276. case 8:
  277. {
  278. SetPlayerAttachedObject(playerid,1,18688,1,-0.895839,0.631365,-1.828601,21.642332,7.385670,13.958697,1.232679,1.000000,1.090367); // fire - Bruno
  279. SetPlayerAttachedObject(playerid,2,1254,1,0.448984,0.065604,0.006619,4.313228,89.284942,0.000000,1.000000,1.000000,1.000000); // killfrenzy - caveira
  280. }
  281. case 9:
  282. {
  283. SetPlayerAttachedObject(playerid,1,1242,1,0.090351,0.088730,-0.000036,0.000000,89.157951,0.000000,1.619548,1.000000,1.348966); // bodyarmour - colete
  284. SetPlayerAttachedObject(playerid,2,18735,1,0.000000,-0.479024,-1.590823,0.000000,0.000000,0.000000,13.498819,1.000000,0.678294); // vent2 - fumaçao
  285.  
  286. }
  287. case 10:
  288. {
  289. SetPlayerAttachedObject(playerid,1,867,1,-0.213616,-0.444311,0.070721,0.000000,0.000000,0.000000,1.000000,1.000000,1.000000); // p_rubble04col - pedras
  290. SetPlayerAttachedObject(playerid,2,18742,1,0.036487,-1.759890,1.772809,225.616638,1.132580,0.677276,1.000000,1.000000,1.000000); // water_speed - explosaoaquatica
  291. }
  292. case 11:
  293. {
  294. SetPlayerAttachedObject(playerid,1,19065,15,-0.025,-0.04,0.23,0,0,270,2,2,2); // Toca de Natal
  295. SetPlayerAttachedObject(playerid,2,18864,1,2.178843,0.000000,0.000000,0.000000,0.000000,0.000000,1.000000,1.000000,1.000000); // FakeSnow1 - neve
  296. }
  297. }
  298. }
  299. }
  300. return 1;
  301. }
  302.  
  303. // verificar dias
  304. forward CheckVip();
  305. public CheckVip()
  306. {
  307. for(new i = 0; i < MAX_PLAYERS; i++)
  308. {
  309. if(IsPlayerConnected(i) && PlayerInfo[i][Vip] == 1)
  310. {
  311. if(PlayerInfo[i][TempoVip] > 0)
  312. {
  313. PlayerInfo[i][TempoVip] = gettime() - ExpireVIP(i);
  314. } else {
  315. RemoveVip(i);
  316. }
  317. }
  318. }
  319. return 1;
  320. }
  321.  
  322. ExpireVIP(playerid)
  323. {
  324. new Dias = PlayerInfo[playerid][DiasVip] * 86400; // 86400 == 24horas
  325. return Dias;
  326. }
  327.  
  328. IsNumeric(const string[])
  329. {
  330. for (new i = 0, j = strlen(string); i < j; i++)
  331. {
  332. if (string[i] > '9' || string[i] < '0') return 0;
  333. }
  334. return 1;
  335. }
  336.  
  337. LiberarKit(playerid)
  338. {
  339. SendClientMessage(playerid, COR_VIP, "C-VIP: Você ja pode pegar seu KIT-VIP novamente!");
  340. PlayerInfo[playerid][PegouKit] = false;
  341. }
  342.  
  343. LiberarColete(playerid)
  344. {
  345. SendClientMessage(playerid, COR_VIP, "C-VIP: Você ja pode pegar seu COLETE-VIP novamente!!");
  346. PlayerInfo[playerid][PegouColete] = false;
  347. }
  348.  
  349. VerificarNivelVip(playerid, lvl)
  350. {
  351. if(PlayerInfo[playerid][Vip] < lvl)
  352. {
  353. new MsgErro[50];
  354. format(MsgErro, sizeof(MsgErro), "ERRO: Comando indisponivel. Vip %d+", lvl);
  355. SendClientMessage(playerid, VERMELHO, MsgErro);
  356. return 0;
  357. }
  358. return 1;
  359. }
  360.  
  361. PosicaoFrentePlayer(playerid, &Float:x, &Float:y, Float:distance)
  362. {
  363. new Float:a;
  364. GetPlayerPos( playerid, x, y, a);
  365. GetPlayerFacingAngle( playerid, a);
  366. if(GetPlayerVehicleID( playerid ))
  367. {
  368. GetVehicleZAngle(GetPlayerVehicleID( playerid ), a);
  369. }
  370. x += (distance * floatsin(-a, degrees));
  371. y += (distance * floatcos(-a, degrees));
  372. }
  373.  
  374. ShowToys(playerid)
  375. {
  376. new string[1700];
  377. strcat(string, "{FFFF00}-{FFFFFF} Chapéu de Bombeiro {0088FF}Slot 1 \n"); // 0
  378. strcat(string, "{FFFF00}-{FFFFFF} Chapéu de Policial {0088FF}Slot 1 \n"); // 1
  379. strcat(string, "{FFFF00}-{FFFFFF} Chapéu Michael Jackson {0088FF}Slot 1 \n"); // 2
  380. strcat(string, "{FFFF00}-{FFFFFF} Chapéu Operário {0088FF}Slot 1 \n"); // 3
  381. strcat(string, "{FFFF00}-{FFFFFF} Chapéu de Funkeiro {0088FF}Slot 1 \n"); // 4
  382. strcat(string, "{FFFF00}-{FFFFFF} Chapéu de Veio {0088FF}Slot 1 \n"); // 5
  383. strcat(string, "{FFFF00}-{FFFFFF} Chapéu do Harry Potter {0088FF}Slot 1 \n"); // 6
  384. strcat(string, "{FFFF00}-{FFFFFF} Bolsa de sequestrador {0088FF}Slot 1 \n");// 7
  385. strcat(string, "{FFFF00}-{FFFFFF} Fones de ouvido {0088FF}Slot 1 \n");// 8
  386. strcat(string, "{FFFF00}-{FFFFFF} Loro José Gigante {0088FF}Slot 1 \n");// 9
  387. strcat(string, "{FFFF00}-{FFFFFF} Loro José menor (Ombro) {0088FF}Slot 2 \n");// 10
  388. strcat(string, "{FFFF00}-{FFFFFF} Tapa olho de pirata {0088FF}Slot 2 \n");// 11
  389. strcat(string, "{FFFF00}-{FFFFFF} Dildo {0088FF}Slot 2\n");// 12
  390. strcat(string, "{FFFF00}-{FFFFFF} Cabeça de galo {0088FF}Slot 1 \n");// 13
  391. strcat(string, "{FFFF00}-{FFFFFF} Cabeça de galo gigante Slot 1 \n");// 14
  392. strcat(string, "{FFFF00}-{FFFFFF} Cervo {0088FF}Slot 1 \n");// 15
  393. strcat(string, "{FFFF00}-{FFFFFF} Chifre de boi 1 {0088FF}Slot 1 \n");// 16
  394. strcat(string, "{FFFF00}-{FFFFFF} Chifre de boi 2 {0088FF}Slot 1 \n");// 17
  395. strcat(string, "{FFFF00}-{FFFFFF} Fanstasia de obóbora {0088FF}Slot 1 \n");// 18
  396. strcat(string, "{FFFF00}-{FFFFFF} Cabeção do CJ {0088FF}Slot 1 \n"); // 19
  397. strcat(string, "{FFFF00}-{FFFFFF} Golfinho {0088FF}Slot 1 \n"); // 20
  398. strcat(string, "{FFFF00}-{FFFFFF} Tubarão {0088FF}Slot 1 \n"); // 21
  399. strcat(string, "{FFFF00}-{FFFFFF} Fantasia de tartaruga {0088FF}Slot 1 \n"); // 22
  400. strcat(string, "{FFFF00}-{FFFFFF} Vaca {0088FF}Slot 1 \n"); // 23
  401. strcat(string, "{FFFF00}-{FFFFFF} Colete no corpo {0088FF}Slot 2 \n");// 24
  402. strcat(string, "{FFFF00}-{FFFFFF} Coração no peito {0088FF}Slot 2 \n");// 25
  403. strcat(string, "{FFFF00}-{FFFFFF} C4 nas costas {0088FF}Slot 2 \n");// 26
  404. strcat(string, "{FFFF00}-{FFFFFF} M4 nas costas {0088FF}Slot 2 \n");// 27
  405. strcat(string, "{FFFF00}-{FFFFFF} Bazzuka nas costas {0088FF}Slot 2 \n");// 28
  406. strcat(string, "{FFFF00}-{FFFFFF} Toca do Papai Noel {0088FF}Slot 1 \n");// 29
  407. strcat(string, "{FFFF00}-{FFFFFF} Dado na cabeça {0088FF}Slot 1 \n");// 30
  408. strcat(string, "{FFFF00}-{FFFFFF} C4 no peito {0088FF}Slot 2 \n");// 31
  409. ShowPlayerDialog(playerid, DIALOG_TOYS, DIALOG_STYLE_LIST, "C-VIP: Selecione para adicionar a seu skin:", string, "APLICAR", "SAIR");
  410. return 1;
  411. }
  412.  
  413. ShowEfects(playerid)
  414. {
  415. new string[800];
  416. strcat(string, "{FFFF00}-{FFFFFF} Fogo na Skin {0088FF}Slot 1\n"); // 0
  417. strcat(string, "{FFFF00}-{FFFFFF} Explosão Aquatica {0088FF}Slot 1\n"); // 1
  418. strcat(string, "{FFFF00}-{FFFFFF} Neve {0088FF}Slot 1\n"); // 2
  419. strcat(string, "{FFFF00}-{FFFFFF} Pedras {0088FF}Slot 1\n"); // 3
  420. strcat(string, "{FFFF00}-{FFFFFF} Caveira {0088FF}Slot 1\n"); // 4
  421. strcat(string, "{FFFF00}-{FFFFFF} Colete {0088FF}Slot 1\n"); // 5
  422. strcat(string, "{FFFF00}-{FFFFFF} Fumaça {0088FF}Slot 1\n"); // 6
  423. strcat(string, "{FFFF00}-{FFFFFF} Touca de Natal {0088FF}Slot 1\n");// 7
  424. strcat(string, "{FFFF00}-{FFFFFF} Caveira e Fogo {0088FF}Slot 1 e 2\n");// 8
  425. strcat(string, "{FFFF00}-{FFFFFF} Colete e Fumaça {0088FF}Slot 1 e 2\n");// 9
  426. strcat(string, "{FFFF00}-{FFFFFF} Pedras e Explosão Aquatica {0088FF}Slot 1 e 2\n");// 10
  427. strcat(string, "{FFFF00}-{FFFFFF} Touca de Natal e Neve {0088FF}Slot 1 e 2\n");// 11
  428. ShowPlayerDialog(playerid, DIALOG_EFECTS, DIALOG_STYLE_LIST, "C-VIP: Selecione para adicionar a seu skin:", string, "APLICAR", "SAIR");
  429. return 1;
  430. }
  431.  
  432. forward SendVipMessageToAll(playerid, const string[]);
  433. public SendVipMessageToAll(playerid, const string[])
  434. {
  435. switch(PlayerInfo[playerid][Vip])
  436. {
  437. case 1: SendClientMessageToAll(BRONZE, string);
  438. case 2: SendClientMessageToAll(PRATA, string);
  439. case 3: SendClientMessageToAll(OURO, string);
  440. }
  441. return 1;
  442. }
  443.  
  444. forward ChatVIP(const string[]);
  445. public ChatVIP(const string[])
  446. {
  447. for(new i = 0; i < MAX_PLAYERS; i++)
  448. {
  449. if(IsPlayerConnected(i) && PlayerInfo[i][Vip] > 0)
  450. {
  451. switch(PlayerInfo[i][Vip])
  452. {
  453. case 1: SendClientMessage(i, BRONZE, string);
  454. case 2: SendClientMessage(i, PRATA, string);
  455. case 3: SendClientMessage(i, OURO, string);
  456. }
  457. }
  458. }
  459. return 1;
  460. }
  461.  
  462. // ==================== Comandos VIP nivel 1
  463.  
  464. CMD:comandosvip(playerid)
  465. {
  466. //if(!VerificarNivelVip(playerid, 1)) return 1;
  467. new String[800];
  468. strcat(String, "{FFFFFF}.: COMANDOS VIP {8B5A2B}BRONZE{FFFFFF} :.\n\n");
  469. strcat(String, "{8B5A2B} /v {FFFFFF}- Falar no modo VIP\n");
  470. strcat(String, "{8B5A2B} /cv {FFFFFF}- Falar no chat VIP\n");
  471. strcat(String, "{8B5A2B} /souvip {FFFFFF}- Ostentar seu VIP\n");
  472. strcat(String, "{8B5A2B} /venc {FFFFFF}- Ver vencimento do seu VIP\n\n\n");
  473. strcat(String, "{FFFFFF}.: COMANDOS VIP {9C9C9C}PRATA{FFFFFF} :.\n\n");
  474. strcat(String, "{9C9C9C} /vkit {FFFFFF}- Pegar KIT-VIP\n");
  475. strcat(String, "{9C9C9C} /vcolete {FFFFFF}- Colocar um colete\n");
  476. strcat(String, "{9C9C9C} /vjetpack {FFFFFF}- Criar um jetpack\n");
  477. strcat(String, "{9C9C9C} /vreparar {FFFFFF}- Reparar um veiculo\n\n\n");
  478. strcat(String, "{FFFFFF}.: COMANDOS VIP {EEC900}OURO{FFFFFF} :.\n\n");
  479. strcat(String, "{EEC900} /vcar {FFFFFF}- Criar carro VIP\n");
  480. strcat(String, "{EEC900} /vbike {FFFFFF}- Criar moto VIP\n");
  481. strcat(String, "{EEC900} /efeitos {FFFFFF}- Abre um menu de efeitos VIP\n");
  482. strcat(String, "{EEC900} /brinquedos {FFFFFF}- Abre um menu de brinquedos VIP\n");
  483. ShowPlayerDialog(playerid, DIALOG_COMANDOS_VIP, DIALOG_STYLE_MSGBOX, "{EEC900}C-VIP: - Comandos VIP", String, "Fechar", #);
  484. return 1;
  485. }
  486.  
  487. CMD:venc(playerid)
  488. {
  489. if(!VerificarNivelVip(playerid, 1)) return 1;
  490. new String[256], Str[128];
  491. format(Str, sizeof(Str), "{ffffff}NICK: {008B00}%s{FFFFFF} [{008B00}%d{FFFFFF}] - ", PlayerInfo[playerid][Nome], playerid);
  492. strcat(String, Str);
  493. format(Str, sizeof(Str), "{ffffff}VENCIMENTO EM: {008B00}%d {FFFFFF}DIAS\n\n", PlayerInfo[playerid][DiasVip]);
  494. strcat(String, Str);
  495. ShowPlayerDialog(playerid, DIALOG_VENC_VIP, DIALOG_STYLE_MSGBOX, "{EEC900}C-VIP: - Vencimento VIP ", String, "Fechar", #);
  496. return 1;
  497. }
  498.  
  499. CMD:cv(playerid, params[])
  500. {
  501. if(!VerificarNivelVip(playerid, 1)) return 1;
  502. new texto[100], String[128];
  503. if(sscanf(params, "s", texto)) return SendClientMessage(playerid, CINZA, "Use: /cv [texto]");
  504. if(strval(texto) > 100) return SendClientMessage(playerid, VERMELHO, "ERRO: Texto muito grande, diminua por favor!");
  505. format(String, sizeof(String), "%s {FFFF00}.:CHAT-VIP:.{FFFFFF} %s", PlayerInfo[playerid][Nome], texto);
  506. ChatVIP(String);
  507. return 1;
  508. }
  509.  
  510. CMD:souvip(playerid)
  511. {
  512. if(!VerificarNivelVip(playerid, 1)) return 1;
  513. new String[60];
  514. format(String, sizeof(String), "-VIP » %s: Eu sou VIP, então me chupa!", PlayerInfo[playerid][Nome]);
  515. SendVipMessageToAll(playerid, String);
  516. return 1;
  517. }
  518.  
  519. CMD:v(playerid, params[])
  520. {
  521. if(!VerificarNivelVip(playerid, 1)) return 1;
  522. new texto[100], String[128];
  523. if(sscanf(params, "s", texto)) return SendClientMessage(playerid, CINZA, "Use: /v [Texto]");
  524.  
  525. format(String, sizeof(String), "-VIP » %s: %s", PlayerInfo[playerid][Nome], texto);
  526. SendVipMessageToAll(playerid, String);
  527. return 1;
  528. }
  529.  
  530. // ======================================================
  531.  
  532.  
  533. // ==================== Comandos VIP nivel 2
  534. CMD:vjetpack(playerid)
  535. {
  536. if(!VerificarNivelVip(playerid, 2)) return 1;
  537. if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, VERMELHO, "ERRO: Você não pode utilizar esse comando em um veículo!");
  538. SendClientMessage(playerid, COR_VIP, "C-VIP: Jetpack criado com sucesso!");
  539. SetPlayerSpecialAction(playerid, 2);
  540. return 1;
  541. }
  542.  
  543. CMD:vcolete(playerid)
  544. {
  545. if(!VerificarNivelVip(playerid, 3)) return 1;
  546. if(PlayerInfo[playerid][PegouColete] == true) return SendClientMessage(playerid, VERMELHO, "ERRO: Você já pegou seu COLETE-VIP recentemente!");
  547. SendClientMessage(playerid, COR_VIP, "C-VIP: Colete criado com sucesso!");
  548. SetPlayerArmour(playerid, 100.0);
  549. PlayerInfo[playerid][PegouColete] = true;
  550. return 1;
  551. }
  552.  
  553. CMD:vkit(playerid)
  554. {
  555. if(!VerificarNivelVip(playerid, 2)) return 1;
  556. if(PlayerInfo[playerid][PegouKit] == true) return SendClientMessage(playerid, VERMELHO, "ERRO: Você já pegou seu KIT-VIP recentemente!");
  557. SendClientMessage(playerid, COR_VIP, "C-VIP: Você pegou seu KIT-VIP com sucesso!");
  558. GivePlayerWeapon(playerid, 4, 99999);
  559. GivePlayerWeapon(playerid, 24, 99999);
  560. GivePlayerWeapon(playerid, 26, 99999);
  561. GivePlayerWeapon(playerid, 31, 99999);
  562. GivePlayerWeapon(playerid, 32, 99999);
  563. GivePlayerWeapon(playerid, 34, 99999);
  564.  
  565. PlayerInfo[playerid][PegouKit] = true;
  566. return 1;
  567. }
  568.  
  569. CMD:vreparar(playerid)
  570. {
  571. if(!VerificarNivelVip(playerid, 2)) return 1;
  572. if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, VERMELHO, "ERRO: Você não pode utilizar esse comando fora de um veículo!");
  573. SendClientMessage(playerid, COR_VIP, "C-VIP: Veiculo reparado com sucesso!");
  574. RepairVehicle(GetPlayerVehicleID(playerid));
  575. return 1;
  576. }
  577.  
  578. // ======================================================
  579.  
  580.  
  581. // ==================== Comandos VIP nivel 3
  582.  
  583. CMD:vcar(playerid, params[])
  584. {
  585. if(!VerificarNivelVip(playerid, 3)) return 1;
  586. new Cor1, Cor2, idcarro;
  587. if(sscanf(params, "ii", Cor1, Cor2)) return SendClientMessage(playerid, CINZA, "Use: /vcar [Cor1] [Cor2]");
  588. new Float:X, Float:Y, Float:Z, Float:X1, Float:Y1, Float:A;
  589. PosicaoFrentePlayer(playerid, X, Y, 3);
  590. GetPlayerPos(playerid, X1, Y1, Z);
  591. GetPlayerFacingAngle(playerid, A);
  592. idcarro = AddStaticVehicle(411, X, Y, Z, A+90, Cor1, Cor2);
  593. CarrosCriados[TodosCarros] = idcarro;
  594. TodosCarros ++;
  595. SendClientMessage(playerid, COR_VIP, "C-VIP: Veiculo VIP criado com sucesso!");
  596. return 1;
  597. }
  598.  
  599. CMD:vbike(playerid, params[])
  600. {
  601. if(!VerificarNivelVip(playerid, 3)) return 1;
  602. new Cor1, Cor2, idcarro;
  603. if(sscanf(params, "ii", Cor1, Cor2)) return SendClientMessage(playerid, CINZA, "Use: /vbike [Cor1] [Cor2]");
  604. new Float:X, Float:Y, Float:Z, Float:X1, Float:Y1, Float:A;
  605. PosicaoFrentePlayer(playerid, X, Y, 3);
  606. GetPlayerPos(playerid, X1, Y1, Z);
  607. GetPlayerFacingAngle(playerid, A);
  608. idcarro = AddStaticVehicle(522, X, Y, Z, A+90, Cor1, Cor2);
  609. CarrosCriados[TodosCarros] = idcarro;
  610. TodosCarros ++;
  611. SendClientMessage(playerid, COR_VIP, "C-VIP: Moto VIP criada com sucesso!");
  612. return 1;
  613. }
  614.  
  615. CMD:brinquedos(playerid)
  616. {
  617. if(!VerificarNivelVip(playerid, 3)) return 1;
  618. if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, VERMELHO, "ERRO: Você não pode utilizar esse comando em um veículo!");
  619. SendClientMessage(playerid, COR_VIP, "C-VIP: Lista de Brinquedos.");
  620. ShowToys(playerid);
  621. return 1;
  622. }
  623.  
  624. CMD:tbrinquedos(playerid)
  625. {
  626. if(!VerificarNivelVip(playerid, 3)) return 1;
  627. for(new i=0; i< MAX_PLAYER_ATTACHED_OBJECTS; i++)
  628. {
  629. if(IsPlayerAttachedObjectSlotUsed(playerid, i)) RemovePlayerAttachedObject(playerid, i);
  630. }
  631. SendClientMessage(playerid, COR_VIP, "C-VIP: Brinquedos removidos com sucesso!");
  632. return 1;
  633. }
  634.  
  635. CMD:efeitos(playerid)
  636. {
  637. if(!VerificarNivelVip(playerid, 3)) return 1;
  638. if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, VERMELHO, "ERRO: Você não pode utilizar esse comando em um veículo!");
  639. SendClientMessage(playerid, COR_VIP, "C-VIP: Lista de Efeitos.");
  640. ShowEfects(playerid);
  641. return 1;
  642. }
  643.  
  644. CMD:tefeitos(playerid)
  645. {
  646. if(!VerificarNivelVip(playerid, 3)) return 1;
  647. RemovePlayerAttachedObject(playerid, 1); // Remoçao dos Efeitos
  648. RemovePlayerAttachedObject(playerid, 2); // Remoçao dos Efeitos2
  649. SendClientMessage(playerid, COR_VIP, "C-VIP: Efeitos removidos com sucesso!");
  650. return 1;
  651. }
  652.  
  653. // ======================================================
  654.  
  655.  
  656. // ==================== Comandos PLAYER
  657.  
  658. CMD:ativarvip(playerid)
  659. {
  660. SendClientMessage(playerid, COR_VIP, "C-VIP: Adicione uma Key valída para ativar o VIP.");
  661. ShowPlayerDialog(playerid, DIALOG_ENABLE_KEY, DIALOG_STYLE_INPUT, "VIP", "\nNos informe sua key para ativar seu beneficio VIP:\n\n", "Ativar", "Sair");
  662. return 1;
  663. }
  664.  
  665. CMD:vips(playerid)
  666. {
  667. new ContVIP = 0, String[1000], Str[128];
  668. for(new i = 0; i < MAX_PLAYERS; i++)
  669. {
  670. if(IsPlayerConnected(i) && PlayerInfo[i][Vip] > 0)
  671. {
  672. format(Str, sizeof(Str), ".:: VIP ON ::. {008B00}%s {FFFFFF} [{008B00}%i{FFFFFF}]\n", PlayerInfo[i][Nome], i);
  673. strcat(String, Str);
  674. ContVIP++;
  675. }
  676. }
  677. if(ContVIP == 0)
  678. {
  679. ShowPlayerDialog(playerid, DIALOG_VIPS, DIALOG_STYLE_MSGBOX, "{EEC900}C-VIP: - VIPs Online", "{FF0000}Nenhum VIP online no momento!", "Fechar", #);
  680. } else {
  681. ShowPlayerDialog(playerid, DIALOG_VIPS, DIALOG_STYLE_MSGBOX, "{EEC900}C-VIP: - VIPs Online", String, "Fechar", #);
  682. }
  683. return 1;
  684. }
  685. // ======================================================
  686.  
  687.  
  688. // ==================== Comandos ADMIN RCON
  689.  
  690. CMD:criarkey(playerid)
  691. {
  692. if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, VERMELHO,"ERRO: Comando indisponivel. Admin RCON");
  693. ShowPlayerDialog(playerid, DIALOG_NEW_KEY, DIALOG_STYLE_INPUT, "KEYS VIP", "\nDigite uma nova key válida\n{FFFF00}Apenas letras são aceitas:\n\n", "Criar", "Cancelar");
  694. return 1;
  695. }
  696.  
  697. CMD:removerkey(playerid)
  698. {
  699. if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, VERMELHO,"ERRO: Comando indisponivel. Admin RCON");
  700. ShowPlayerDialog(playerid, DIALOG_REMOVE_KEY, DIALOG_STYLE_INPUT, "KEYS VIP", "\nDigite a Key que deseja Remover:\n\n", "Remover", "Cancelar");
  701. return 1;
  702. }
  703.  
  704. CMD:darvip(playerid, params[])
  705. {
  706. if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, VERMELHO,"ERRO: Comando indisponivel. Admin RCON");
  707. new Nivel, Dias, ID;
  708. if(sscanf(params, "udd", ID, Nivel, Dias)) return SendClientMessage(playerid, CINZA, "ADMIN: Use /darvip [ID] [Nivel] [Dias]");
  709. if(Nivel < 1 || Nivel > 3) return SendClientMessage(playerid, VERMELHO, "ERRO: Nivel Inválido! Disponível de 1 a 3.");
  710. if(!IsPlayerConnected(ID)) return SendClientMessage(playerid, VERMELHO, "ERRO: Jogador não conectado.");
  711. SendClientMessage(playerid, LARANJA, "ADMIN: Comando efetuado com sucesso !");
  712. SetVip(ID, Nivel, Dias);
  713. return 1;
  714. }
  715.  
  716. CMD:removervip(playerid, params[])
  717. {
  718. if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, VERMELHO,"ERRO: Comando indisponivel. Admin RCON");
  719. new Motivo[100], Msg[128], ID;
  720. if(sscanf(params, "us", ID, Motivo)) return SendClientMessage(playerid, CINZA, "ADMIN: Use /tirarvipmysql_escape_string() [ID] [Motivo]");
  721. if(!IsPlayerConnected(ID)) return SendClientMessage(playerid, VERMELHO, "ERRO: Jogador não conectado.");
  722. format(Msg, sizeof Msg, "C-VIP: O admin %s retirou seu VIP. Motivo: %s.", PlayerInfo[playerid][Nome], Motivo);
  723. SendClientMessage(ID, COR_VIP, Msg);
  724. RemoveVip(ID);
  725. SendClientMessage(playerid, LARANJA, "ADMIN: Comando efetuado com sucesso !");
  726. return 1;
  727. }
  728.  
  729. CMD:respawn(playerid)
  730. {
  731. if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, VERMELHO,"ERRO: Comando indisponivel. Admin RCON");
  732. new String[70];
  733. format(String, sizeof(String), "ADMIN: O Admin %s deu respawn em todos os veiculos VIP criados!", PlayerInfo[playerid][Nome]);
  734. SendClientMessageToAll(LARANJA, String);
  735. SendClientMessage(playerid, LARANJA, "ADMIN: Todos os veiculos VIP criados foram destruidos!");
  736. for(new i = 0; i < sizeof(CarrosCriados); i++) DestroyVehicle(CarrosCriados[i]);
  737. return 1;
  738. }
  739. // ======================================================
Advertisement
Add Comment
Please, Sign In to add comment