Advertisement
Guest User

Untitled

a guest
Jan 4th, 2018
856
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 31.37 KB | None | 0 0
  1. #include <a_samp>
  2. #include <sscanf2>
  3. #include <pawn.cmd>
  4. #include <dof2>
  5.  
  6.  
  7. #define GOLD 0xEEC900FF
  8. #define SILVER 0x9C9C9CFF
  9. #define BRONZE 0x8B5A2BFF
  10. #define COR_VIP 0x008B00FF
  11. #define RED 0xFF030FFF
  12. #define ORANGE 0xF97804FF
  13. #define GREY 0xCECECEFF
  14.  
  15.  
  16. #define DIALOG_VIPS 4995
  17. #define DIALOG_VENC_VIP 4996
  18. #define DIALOG_COMMANDS_VIP 4997
  19. #define DIALOG_EFECTS 4998
  20. #define DIALOG_TOYS 4999
  21.  
  22. #define DIALOG_ENABLE_KEY 5000
  23. #define DIALOG_NEW_KEY 5001
  24. #define DIALOG_NEW_KEY_LEVEL 5005
  25. #define DIALOG_NEW_KEY_DAYS 5002
  26. #define DIALOG_KEY_CONFIRM 5003
  27. #define DIALOG_REMOVE_KEY 5004
  28.  
  29.  
  30. enum pInfo
  31. {
  32. Vip,
  33. DaysVip,
  34. TimeVip,
  35. vKey[25],
  36. vDays,
  37. vLevel,
  38. vName,
  39. bool:GotKit,
  40. bool:GotColete
  41. };
  42. new PlayerInfo[MAX_PLAYERS][pInfo], Timer, CarsCreated[100], AllCars = 0;
  43.  
  44.  
  45. public OnFilterScriptInit()
  46. {
  47. print("------ System C-VIP v2.0 loaded successfully. ------");
  48. print("------------ Created by: Cleyson Stein. ------------");
  49.  
  50. Timer = SetTimer("CheckVip", 60000, true);
  51. return 1;
  52. }
  53.  
  54. public OnFilterScriptExit()
  55. {
  56. KillTimer(Timer);
  57. DOF2_Exit();
  58. return 1;
  59. }
  60.  
  61. public OnPlayerConnect(playerid)
  62. {
  63. GetPlayerName(playerid, PlayerInfo[playerid][vName], 24);
  64.  
  65. new var[40];
  66. format(var, sizeof(var), "cVIP/Vips/%s.ini", PlayerInfo[playerid][vName]);
  67.  
  68. if(DOF2_FileExists(var))
  69. {
  70. PlayerInfo[playerid][Vip] = DOF2_GetInt(var, "Level");
  71. PlayerInfo[playerid][DaysVip] = DOF2_GetInt(var, "Days");
  72. PlayerInfo[playerid][TimeVip] = DOF2_GetInt(var, "TimeVip");
  73. } else {
  74. PlayerInfo[playerid][Vip] = 0;
  75. PlayerInfo[playerid][DaysVip] = 0;
  76. PlayerInfo[playerid][TimeVip] = 0;
  77. }
  78. return 1;
  79. }
  80.  
  81. public OnPlayerDisconnect(playerid, reason)
  82. {
  83. if(PlayerInfo[playerid][Vip] > 0)
  84. {
  85. new var[40];
  86. format(var, sizeof(var), "cVIP/Vips/%s.ini", PlayerInfo[playerid][vName]);
  87. if(!DOF2_FileExists(var)) DOF2_CreateFile(var);
  88.  
  89. DOF2_SetInt(var, "Level", PlayerInfo[playerid][Vip]);
  90. DOF2_SetInt(var, "Days", PlayerInfo[playerid][DaysVip]);
  91. DOF2_SetInt(var, "TimeVip", PlayerInfo[playerid][TimeVip]);
  92. DOF2_SaveFile();
  93. }
  94. return 1;
  95. }
  96.  
  97. public OnPlayerDeath(playerid, killerid, reason)
  98. {
  99. if(PlayerInfo[playerid][GotKit] == true) LiberarKit(playerid);
  100. if(PlayerInfo[playerid][GotColete] == true) LiberarColete(playerid);
  101. return 1;
  102. }
  103.  
  104. SetVip(playerid, Level, Days)
  105. {
  106. new stringV[70];
  107. if(PlayerInfo[playerid][Vip] > 0)
  108. {
  109. format(stringV, sizeof stringV, "C-VIP: Your VIP has been renewed. + %d days. Level: %d.", Days, Level);
  110. PlayerInfo[playerid][TimeVip] += Days;
  111. PlayerInfo[playerid][DaysVip] += Days;
  112. PlayerInfo[playerid][Vip] = Level;
  113.  
  114. } else {
  115.  
  116. format(stringV, sizeof stringV, "C-VIP: Your VIP has been activated. %d days. Level: %d. /CommandsVip", Days, Level);
  117. PlayerInfo[playerid][TimeVip] = Days;
  118. PlayerInfo[playerid][DaysVip] = Days;
  119. PlayerInfo[playerid][Vip] = Level;
  120. }
  121. SendClientMessage(playerid, COR_VIP, stringV);
  122. return 1;
  123. }
  124.  
  125. RemoveVip(playerid)
  126. {
  127. PlayerInfo[playerid][TimeVip] = 0;
  128. PlayerInfo[playerid][Vip] = 0;
  129. PlayerInfo[playerid][DaysVip] = 0;
  130. SendClientMessage(playerid, COR_VIP, "C-VIP: Your VIP days have come to an end. To renew acquire a new VIP key.");
  131. return 1;
  132. }
  133.  
  134. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  135. {
  136. switch(dialogid)
  137. {
  138. case DIALOG_NEW_KEY:
  139. {
  140. if(!response) return 1;
  141. if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_NEW_KEY, DIALOG_STYLE_INPUT, "KEYS VIP", "\nPlease enter a valid new key\n{FFFF00}Letters and numbers are accepted:\n\n", "Create", "Cancel");
  142. format(PlayerInfo[playerid][vKey], 50, inputtext);
  143. new Dialog[128];
  144. format(Dialog, sizeof Dialog, "{FFFFFF}Your new VIP code: {DE3A3A}%s\n\n{FFFFFF}Now let us know how many VIP days:", PlayerInfo[playerid][vKey]);
  145. ShowPlayerDialog(playerid, DIALOG_NEW_KEY_DAYS, DIALOG_STYLE_INPUT, "KEYS VIP", Dialog, "Create", "Cancel");
  146. }
  147.  
  148. case DIALOG_NEW_KEY_DAYS:
  149. {
  150. if(!IsNumeric(inputtext)) return SendClientMessage(playerid, RED, "ERROR: Enter a number of valid days.");
  151. if(strval(inputtext) <= 0) return SendClientMessage(playerid, RED, "ERROR: Can not create a Key with 0 days vips.");
  152. PlayerInfo[playerid][vDays] = strval(inputtext);
  153. new Dialog[170];
  154. format(Dialog, sizeof Dialog, "{FFFFFF}Your new VIP code: {DE3A3A}%s\n{FFFFFF}Venc: {DE3A3A}%d days\n\n{FFFFFF}Now let us know the level of the VIP key: {DE3A3A}1 a 3", PlayerInfo[playerid][vKey], PlayerInfo[playerid][vDays]);
  155. ShowPlayerDialog(playerid, DIALOG_NEW_KEY_LEVEL, DIALOG_STYLE_INPUT, "KEYS VIP", Dialog, "Create", "Cancel");
  156. }
  157.  
  158. case DIALOG_NEW_KEY_LEVEL:
  159. {
  160. if(!IsNumeric(inputtext)) return SendClientMessage(playerid, RED, "ERROR: Enter a valid amount of level 1 a 3.");
  161. if(strval(inputtext) < 1 || strval(inputtext) > 3) return SendClientMessage(playerid, RED, "ERROR: Enter a valid amount of level 1 a 3.");
  162. PlayerInfo[playerid][vLevel] = strval(inputtext);
  163. new Dialog[190];
  164. format(Dialog, sizeof Dialog, "{FFFFFF}Your new key information:\n\nCode: {DE3A3A}%s\n{FFFFFF}Venc: {DE3A3A}%d days\n{FFFFFF}Level: {DE3A3A}%d\n\n{FFFFFF}Want to create ?", PlayerInfo[playerid][vKey], PlayerInfo[playerid][vDays], PlayerInfo[playerid][vLevel]);
  165. ShowPlayerDialog(playerid, DIALOG_KEY_CONFIRM, DIALOG_STYLE_MSGBOX, "KEYS VIP", Dialog, "Yes", "No");
  166. }
  167.  
  168. case DIALOG_KEY_CONFIRM:
  169. {
  170. if(!response) return 1;
  171.  
  172. new var[40];
  173. format(var, sizeof(var), "cVIP/Keys/%s.ini", PlayerInfo[playerid][vKey]);
  174. if(DOF2_FileExists(var)) return SendClientMessage(playerid, RED, "ERROR: Existing key.");
  175.  
  176. DOF2_CreateFile(var);
  177. DOF2_SetString(var, "Key", PlayerInfo[playerid][vKey]);
  178. DOF2_SetInt(var, "Days", PlayerInfo[playerid][vDays]);
  179. DOF2_SetInt(var, "Level", PlayerInfo[playerid][vLevel]);
  180. DOF2_SaveFile();
  181.  
  182. new MsgKeyVip[70];
  183. SendClientMessage(playerid, ORANGE, "KEY: New Key VIP created.");
  184. format(MsgKeyVip, sizeof MsgKeyVip, "KEY: [%s] - DAYS: [%d] - LEVEL: [%d]", PlayerInfo[playerid][vKey], PlayerInfo[playerid][vDays], PlayerInfo[playerid][vLevel]);
  185. SendClientMessage(playerid, ORANGE, MsgKeyVip);
  186. }
  187.  
  188. case DIALOG_REMOVE_KEY:
  189. {
  190. new var[40];
  191. format(var, sizeof(var), "cVIP/Keys/%s.ini", inputtext);
  192. if(!DOF2_FileExists(var)) return SendClientMessage(playerid, RED, "ERROR: Key not existent.");
  193.  
  194. DOF2_RemoveFile(var);
  195. DOF2_SaveFile();
  196.  
  197. new MsgKeyVip[60];
  198. format(MsgKeyVip, sizeof MsgKeyVip, "ADMIN: Key %s has been successfully removed.", inputtext);
  199. SendClientMessage(playerid, ORANGE, MsgKeyVip);
  200. }
  201.  
  202. case DIALOG_ENABLE_KEY:
  203. {
  204. new var[40];
  205. format(var, sizeof(var), "cVIP/Keys/%s.ini", inputtext);
  206. if(!DOF2_FileExists(var)) return SendClientMessage(playerid, RED, "ERROR: Key not existent.");
  207.  
  208. new ValueDays = DOF2_GetInt(var, "Days");
  209. new Level = DOF2_GetInt(var, "Level");
  210.  
  211. SetVip(playerid, Level, ValueDays);
  212.  
  213. DOF2_RemoveFile(var);
  214. DOF2_SaveFile();
  215. }
  216.  
  217. case DIALOG_TOYS:
  218. {
  219. if(!response) return 1;
  220. SendClientMessage(playerid, COR_VIP, "C-VIP: Use /ttoy to remove the toy.");
  221. GameTextForPlayer(playerid, "~g~/ttoy", 2000, 3);
  222. switch(listitem)
  223. {
  224. 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);
  225. 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);
  226. 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);
  227. 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);
  228. 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);
  229. 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);
  230. 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);
  231. 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);
  232. 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);
  233. 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);
  234. 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);
  235. 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);
  236. 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);
  237. 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);
  238. 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);
  239. 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);
  240. 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);
  241. 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);
  242. 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);
  243. 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);
  244. 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);
  245. 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);
  246. 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);
  247. 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);
  248. case 24: SetPlayerAttachedObject(playerid,1, 373, 1, 0.33, -0.029, -0.15, 65, 25, 35);
  249. case 25: SetPlayerAttachedObject(playerid,1, 1240, 1, 0.15, 0.17, 0.06, 0.0, 90.0, 0.0);
  250. case 26: SetPlayerAttachedObject(playerid,1, 1252, 1, 0.1, -0.2, 0.0, 0.0, 90.0, 0.0);
  251. case 27: SetPlayerAttachedObject(playerid,1, 356, 1, -0.2, -0.15, 0.0, 0.0, 24.0, 0.0);
  252. case 28: SetPlayerAttachedObject(playerid,1 ,359, 15 ,-0.02 ,0.08 ,-0.3 ,0 ,50 ,-10);
  253. case 29: SetPlayerAttachedObject(playerid,0, 19065, 2, 0.120000, 0.040000, -0.003500, 0, 100, 100, 1.4, 1.4, 1.4);
  254. case 30: SetPlayerAttachedObject(playerid,0 ,1852 ,2 ,0.1 ,0 ,-0.01 ,0 ,15 ,0);
  255. case 31: SetPlayerAttachedObject(playerid,1, 1654, 1, 0.1,0.20,0.0,180.0,100.0,0.0);
  256. }
  257. }
  258.  
  259. case DIALOG_EFECTS:
  260. {
  261. if(!response) return 1;
  262. SendClientMessage(playerid, COR_VIP, "C-VIP: Use /teffect to remove the effects.");
  263. GameTextForPlayer(playerid, "~g~/teffect", 2000, 3);
  264. switch(listitem)
  265. {
  266. 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
  267. 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
  268. 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
  269. 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
  270. 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
  271. 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
  272. 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
  273. case 7: SetPlayerAttachedObject(playerid,1,19065,15,-0.025,-0.04,0.23,0,0,270,2,2,2); // Toca de Natal
  274.  
  275. case 8:
  276. {
  277. 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
  278. 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
  279. }
  280. case 9:
  281. {
  282. 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
  283. 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
  284.  
  285. }
  286. case 10:
  287. {
  288. 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
  289. 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
  290. }
  291. case 11:
  292. {
  293. SetPlayerAttachedObject(playerid,1,19065,15,-0.025,-0.04,0.23,0,0,270,2,2,2); // Toca de Natal
  294. 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
  295. }
  296. }
  297. }
  298. }
  299. return 1;
  300. }
  301.  
  302. forward CheckVip();
  303. public CheckVip()
  304. {
  305. for(new i = 0; i < MAX_PLAYERS; i++)
  306. {
  307. if(IsPlayerConnected(i) && PlayerInfo[i][Vip] == 1)
  308. {
  309. if(PlayerInfo[i][TimeVip] > 0)
  310. {
  311. PlayerInfo[i][TimeVip] = gettime() - ExpireVIP(i);
  312. } else {
  313. RemoveVip(i);
  314. }
  315. }
  316. }
  317. return 1;
  318. }
  319.  
  320. ExpireVIP(playerid)
  321. {
  322. new Dias = PlayerInfo[playerid][DaysVip] * 86400; // 86400 == 24horas
  323. return Dias;
  324. }
  325.  
  326. IsNumeric(const string[])
  327. {
  328. for (new i = 0, j = strlen(string); i < j; i++)
  329. {
  330. if (string[i] > '9' || string[i] < '0') return 0;
  331. }
  332. return 1;
  333. }
  334.  
  335. LiberarKit(playerid)
  336. {
  337. SendClientMessage(playerid, COR_VIP, "C-VIP: You can get your KIT-VIP again!");
  338. PlayerInfo[playerid][GotKit] = false;
  339. }
  340.  
  341. LiberarColete(playerid)
  342. {
  343. SendClientMessage(playerid, COR_VIP, "C-VIP: You can already get your VIP ARMOUR again!");
  344. PlayerInfo[playerid][GotColete] = false;
  345. }
  346.  
  347. VerificarNivelVip(playerid, lvl)
  348. {
  349. if(PlayerInfo[playerid][Vip] < lvl)
  350. {
  351. new MsgErro[50];
  352. format(MsgErro, sizeof(MsgErro), "ERROR: Command unavailable. Vip %d+", lvl);
  353. SendClientMessage(playerid, RED, MsgErro);
  354. return 0;
  355. }
  356. return 1;
  357. }
  358.  
  359. PosicaoFrentePlayer(playerid, &Float:x, &Float:y, Float:distance)
  360. {
  361. new Float:a;
  362. GetPlayerPos( playerid, x, y, a);
  363. GetPlayerFacingAngle( playerid, a);
  364. if(GetPlayerVehicleID( playerid ))
  365. {
  366. GetVehicleZAngle(GetPlayerVehicleID( playerid ), a);
  367. }
  368. x += (distance * floatsin(-a, degrees));
  369. y += (distance * floatcos(-a, degrees));
  370. }
  371.  
  372. ShowToys(playerid)
  373. {
  374. new string[1700];
  375. strcat(string, "{FFFF00}-{FFFFFF} Firefighter's Hat {0088FF}Slot 1 \n"); // 0
  376. strcat(string, "{FFFF00}-{FFFFFF} Police Hat {0088FF}Slot 1 \n"); // 1
  377. strcat(string, "{FFFF00}-{FFFFFF} Michael Jackson Hat {0088FF}Slot 1 \n"); // 2
  378. strcat(string, "{FFFF00}-{FFFFFF} Worker Hat {0088FF}Slot 1 \n"); // 3
  379. strcat(string, "{FFFF00}-{FFFFFF} Funkeiro Hat{0088FF}Slot 1 \n"); // 4
  380. strcat(string, "{FFFF00}-{FFFFFF} Old Hat {0088FF}Slot 1 \n"); // 5
  381. strcat(string, "{FFFF00}-{FFFFFF} Harry Potter Hat {0088FF}Slot 1 \n"); // 6
  382. strcat(string, "{FFFF00}-{FFFFFF} Kidnapping bag {0088FF}Slot 1 \n");// 7
  383. strcat(string, "{FFFF00}-{FFFFFF} Headphones {0088FF}Slot 1 \n");// 8
  384. strcat(string, "{FFFF00}-{FFFFFF} Big parrot {0088FF}Slot 1 \n");// 9
  385. strcat(string, "{FFFF00}-{FFFFFF} Small parrot {0088FF}Slot 2 \n");// 10
  386. strcat(string, "{FFFF00}-{FFFFFF} Pirate's eye cap {0088FF}Slot 2 \n");// 11
  387. strcat(string, "{FFFF00}-{FFFFFF} Dildo {0088FF}Slot 2\n");// 12
  388. strcat(string, "{FFFF00}-{FFFFFF} Cockerel head {0088FF}Slot 1 \n");// 13
  389. strcat(string, "{FFFF00}-{FFFFFF} Giant cock head Slot 1 \n");// 14
  390. strcat(string, "{FFFF00}-{FFFFFF} Cervo {0088FF}Slot 1 \n");// 15
  391. strcat(string, "{FFFF00}-{FFFFFF} Horn of ox 1 {0088FF}Slot 1 \n");// 16
  392. strcat(string, "{FFFF00}-{FFFFFF} Horn of ox 2 {0088FF}Slot 1 \n");// 17
  393. strcat(string, "{FFFF00}-{FFFFFF} Pumpkin {0088FF}Slot 1 \n");// 18
  394. strcat(string, "{FFFF00}-{FFFFFF} Head to CJ {0088FF}Slot 1 \n"); // 19
  395. strcat(string, "{FFFF00}-{FFFFFF} Dolphin {0088FF}Slot 1 \n"); // 20
  396. strcat(string, "{FFFF00}-{FFFFFF} Shark {0088FF}Slot 1 \n"); // 21
  397. strcat(string, "{FFFF00}-{FFFFFF} Turtle {0088FF}Slot 1 \n"); // 22
  398. strcat(string, "{FFFF00}-{FFFFFF} Cow {0088FF}Slot 1 \n"); // 23
  399. strcat(string, "{FFFF00}-{FFFFFF} Armour {0088FF}Slot 2 \n");// 24
  400. strcat(string, "{FFFF00}-{FFFFFF} Heart in the chest {0088FF}Slot 2 \n");// 25
  401. strcat(string, "{FFFF00}-{FFFFFF} C4 {0088FF}Slot 2 \n");// 26
  402. strcat(string, "{FFFF00}-{FFFFFF} M4 {0088FF}Slot 2 \n");// 27
  403. strcat(string, "{FFFF00}-{FFFFFF} Bazzuka {0088FF}Slot 2 \n");// 28
  404. strcat(string, "{FFFF00}-{FFFFFF} Santa's toque {0088FF}Slot 1 \n");// 29
  405. strcat(string, "{FFFF00}-{FFFFFF} Given in the head {0088FF}Slot 1 \n");// 30
  406. strcat(string, "{FFFF00}-{FFFFFF} C4 {0088FF}Slot 2 \n");// 31
  407. ShowPlayerDialog(playerid, DIALOG_TOYS, DIALOG_STYLE_LIST, "C-VIP: Select to add to your skin:", string, "APLIC", "EXIT");
  408. return 1;
  409. }
  410.  
  411. ShowEfects(playerid)
  412. {
  413. new string[800];
  414. strcat(string, "{FFFF00}-{FFFFFF} Fire on Skin {0088FF}Slot 1\n"); // 0
  415. strcat(string, "{FFFF00}-{FFFFFF} Aquatic Explosion {0088FF}Slot 1\n"); // 1
  416. strcat(string, "{FFFF00}-{FFFFFF} Snow {0088FF}Slot 1\n"); // 2
  417. strcat(string, "{FFFF00}-{FFFFFF} Stones {0088FF}Slot 1\n"); // 3
  418. strcat(string, "{FFFF00}-{FFFFFF} Skull {0088FF}Slot 1\n"); // 4
  419. strcat(string, "{FFFF00}-{FFFFFF} Armour {0088FF}Slot 1\n"); // 5
  420. strcat(string, "{FFFF00}-{FFFFFF} Smoke {0088FF}Slot 1\n"); // 6
  421. strcat(string, "{FFFF00}-{FFFFFF} Christmas cap {0088FF}Slot 1\n");// 7
  422. strcat(string, "{FFFF00}-{FFFFFF} Skull and Fire {0088FF}Slot 1 e 2\n");// 8
  423. strcat(string, "{FFFF00}-{FFFFFF} Armour and Smoke {0088FF}Slot 1 e 2\n");// 9
  424. strcat(string, "{FFFF00}-{FFFFFF} Stones and Aquatic Explosion {0088FF}Slot 1 e 2\n");// 10
  425. strcat(string, "{FFFF00}-{FFFFFF} Christmas and Snow Cap {0088FF}Slot 1 e 2\n");// 11
  426. ShowPlayerDialog(playerid, DIALOG_EFECTS, DIALOG_STYLE_LIST, "C-VIP: Select to add to your skin:", string, "APLIC", "EXIT");
  427. return 1;
  428. }
  429.  
  430. forward SendVipMessageToAll(playerid, const string[]);
  431. public SendVipMessageToAll(playerid, const string[])
  432. {
  433. switch(PlayerInfo[playerid][Vip])
  434. {
  435. case 1: SendClientMessageToAll(BRONZE, string);
  436. case 2: SendClientMessageToAll(SILVER, string);
  437. case 3: SendClientMessageToAll(GOLD, string);
  438. }
  439. return 1;
  440. }
  441.  
  442. forward ChatVIP(const string[]);
  443. public ChatVIP(const string[])
  444. {
  445. for(new i = 0; i < MAX_PLAYERS; i++)
  446. {
  447. if(IsPlayerConnected(i) && PlayerInfo[i][Vip] > 0)
  448. {
  449. switch(PlayerInfo[i][Vip])
  450. {
  451. case 1: SendClientMessage(i, BRONZE, string);
  452. case 2: SendClientMessage(i, SILVER, string);
  453. case 3: SendClientMessage(i, GOLD, string);
  454. }
  455. }
  456. }
  457. return 1;
  458. }
  459.  
  460. // ==================== Commands VIP level 1
  461.  
  462. CMD:commandsvip(playerid)
  463. {
  464. new String[800];
  465. strcat(String, "{FFFFFF}.: COMMANDS VIP {8B5A2B}BRONZE{FFFFFF} :.\n\n");
  466. strcat(String, "{8B5A2B} /v {FFFFFF}- Speak in VIP mode\n");
  467. strcat(String, "{8B5A2B} /cv {FFFFFF}- Speak in VIP chat\n");
  468. strcat(String, "{8B5A2B} /vip {FFFFFF}- Show your VIP\n");
  469. strcat(String, "{8B5A2B} /exp {FFFFFF}- See VIP expiration\n\n\n");
  470. strcat(String, "{FFFFFF}.: COMMANDS VIP {9C9C9C}SILVER{FFFFFF} :.\n\n");
  471. strcat(String, "{9C9C9C} /vkit {FFFFFF}- Paste KIT-VIP\n");
  472. strcat(String, "{9C9C9C} /varmour {FFFFFF}- Create one armour\n");
  473. strcat(String, "{9C9C9C} /vjetpack {FFFFFF}- Create one jetpack\n");
  474. strcat(String, "{9C9C9C} /vrepar {FFFFFF}- Repair a vehicle\n\n\n");
  475. strcat(String, "{FFFFFF}.: COMMANDS VIP {EEC900}GOLD{FFFFFF} :.\n\n");
  476. strcat(String, "{EEC900} /vcar {FFFFFF}- Create one car VIP\n");
  477. strcat(String, "{EEC900} /vbike {FFFFFF}- Create one bike VIP\n");
  478. strcat(String, "{EEC900} /effects {FFFFFF}- Opens an effects menu VIP\n");
  479. strcat(String, "{EEC900} /toys {FFFFFF}- Opens an toys menu VIP\n");
  480. ShowPlayerDialog(playerid, DIALOG_COMMANDS_VIP, DIALOG_STYLE_MSGBOX, "{EEC900}C-VIP: - Commands VIP", String, "Exit", #);
  481. return 1;
  482. }
  483.  
  484. CMD:exp(playerid)
  485. {
  486. if(!VerificarNivelVip(playerid, 1)) return 1;
  487. new String[256], Str[128];
  488. format(Str, sizeof(Str), "{ffffff}NICK: {008B00}%s{FFFFFF} [{008B00}%d{FFFFFF}] - ", PlayerInfo[playerid][vName], playerid);
  489. strcat(String, Str);
  490. format(Str, sizeof(Str), "{ffffff}EXPIRATION EM: {008B00}%d {FFFFFF}DAYS\n\n", PlayerInfo[playerid][DaysVip]);
  491. strcat(String, Str);
  492. ShowPlayerDialog(playerid, DIALOG_VENC_VIP, DIALOG_STYLE_MSGBOX, "{EEC900}C-VIP: - VIP expiration", String, "Exit", #);
  493. return 1;
  494. }
  495.  
  496. CMD:cv(playerid, params[])
  497. {
  498. if(!VerificarNivelVip(playerid, 1)) return 1;
  499. new texto[100], String[128];
  500. if(sscanf(params, "s", texto)) return SendClientMessage(playerid, GREY, "Use: /cv [texto]");
  501. if(strval(texto) > 100) return SendClientMessage(playerid, RED, "ERROR: Text too large, please decrease!");
  502. format(String, sizeof(String), "%s {FFFF00}.:CHAT-VIP:.{FFFFFF} %s", PlayerInfo[playerid][vName], texto);
  503. ChatVIP(String);
  504. return 1;
  505. }
  506.  
  507. CMD:vip(playerid)
  508. {
  509. if(!VerificarNivelVip(playerid, 1)) return 1;
  510. new String[60];
  511. format(String, sizeof(String), "-VIP » %s: I'm VIP, so suck me!", PlayerInfo[playerid][vName]);
  512. SendVipMessageToAll(playerid, String);
  513. return 1;
  514. }
  515.  
  516. CMD:v(playerid, params[])
  517. {
  518. if(!VerificarNivelVip(playerid, 1)) return 1;
  519. new texto[100], String[128];
  520. if(sscanf(params, "s", texto)) return SendClientMessage(playerid, GREY, "Use: /v [Text]");
  521.  
  522. format(String, sizeof(String), "-VIP » %s: %s", PlayerInfo[playerid][vName], texto);
  523. SendVipMessageToAll(playerid, String);
  524. return 1;
  525. }
  526.  
  527. // ======================================================
  528.  
  529.  
  530. // ==================== Commands VIP level 2
  531. CMD:vjetpack(playerid)
  532. {
  533. if(!VerificarNivelVip(playerid, 2)) return 1;
  534. if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, RED, "ERROR: You can not use this command on a vehicle!");
  535. SendClientMessage(playerid, COR_VIP, "C-VIP: Jetpack created successfully!");
  536. SetPlayerSpecialAction(playerid, 2);
  537. return 1;
  538. }
  539.  
  540. CMD:varmour(playerid)
  541. {
  542. if(!VerificarNivelVip(playerid, 3)) return 1;
  543. if(PlayerInfo[playerid][GotColete] == true) return SendClientMessage(playerid, RED, "ERROR: You've recently picked up your ARMOUR-VIP!");
  544. SendClientMessage(playerid, COR_VIP, "C-VIP: ARMOUR created successfully!");
  545. SetPlayerArmour(playerid, 100.0);
  546. PlayerInfo[playerid][GotColete] = true;
  547. return 1;
  548. }
  549.  
  550. CMD:vkit(playerid)
  551. {
  552. if(!VerificarNivelVip(playerid, 2)) return 1;
  553. if(PlayerInfo[playerid][GotKit] == true) return SendClientMessage(playerid, RED, "ERROR: You've recently picked up your KIT-VIP!");
  554. SendClientMessage(playerid, COR_VIP, "C-VIP: You successfully got your VIP-KIT!");
  555. GivePlayerWeapon(playerid, 4, 99999);
  556. GivePlayerWeapon(playerid, 24, 99999);
  557. GivePlayerWeapon(playerid, 26, 99999);
  558. GivePlayerWeapon(playerid, 31, 99999);
  559. GivePlayerWeapon(playerid, 32, 99999);
  560. GivePlayerWeapon(playerid, 34, 99999);
  561.  
  562. PlayerInfo[playerid][GotKit] = true;
  563. return 1;
  564. }
  565.  
  566. CMD:vrepar(playerid)
  567. {
  568. if(!VerificarNivelVip(playerid, 2)) return 1;
  569. if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, RED, "ERROR: You can not use this command outside of a vehicle!");
  570. SendClientMessage(playerid, COR_VIP, "C-VIP: Vehicle repaired with sucesso!");
  571. RepairVehicle(GetPlayerVehicleID(playerid));
  572. return 1;
  573. }
  574.  
  575. // ======================================================
  576.  
  577.  
  578. // ==================== Commands VIP Level 3
  579.  
  580. CMD:vcar(playerid, params[])
  581. {
  582. if(!VerificarNivelVip(playerid, 3)) return 1;
  583. new Cor1, Cor2, idcarro;
  584. if(sscanf(params, "ii", Cor1, Cor2)) return SendClientMessage(playerid, GREY, "Use: /vcar [Cor1] [Cor2]");
  585. new Float:X, Float:Y, Float:Z, Float:X1, Float:Y1, Float:A;
  586. PosicaoFrentePlayer(playerid, X, Y, 3);
  587. GetPlayerPos(playerid, X1, Y1, Z);
  588. GetPlayerFacingAngle(playerid, A);
  589. idcarro = AddStaticVehicle(411, X, Y, Z, A+90, Cor1, Cor2);
  590. CarsCreated[AllCars] = idcarro;
  591. AllCars ++;
  592. SendClientMessage(playerid, COR_VIP, "C-VIP: VIP car created successfully!");
  593. return 1;
  594. }
  595.  
  596. CMD:vbike(playerid, params[])
  597. {
  598. if(!VerificarNivelVip(playerid, 3)) return 1;
  599. new Cor1, Cor2, idcarro;
  600. if(sscanf(params, "ii", Cor1, Cor2)) return SendClientMessage(playerid, GREY, "Use: /vbike [Cor1] [Cor2]");
  601. new Float:X, Float:Y, Float:Z, Float:X1, Float:Y1, Float:A;
  602. PosicaoFrentePlayer(playerid, X, Y, 3);
  603. GetPlayerPos(playerid, X1, Y1, Z);
  604. GetPlayerFacingAngle(playerid, A);
  605. idcarro = AddStaticVehicle(522, X, Y, Z, A+90, Cor1, Cor2);
  606. CarsCreated[AllCars] = idcarro;
  607. AllCars ++;
  608. SendClientMessage(playerid, COR_VIP, "C-VIP: VIP motorcycle created successfully!");
  609. return 1;
  610. }
  611.  
  612. CMD:toys(playerid)
  613. {
  614. if(!VerificarNivelVip(playerid, 3)) return 1;
  615. if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, RED, "ERROR: You can not use this command on a vehicle!");
  616. SendClientMessage(playerid, COR_VIP, "C-VIP: List of toys.");
  617. ShowToys(playerid);
  618. return 1;
  619. }
  620.  
  621. CMD:ttoy(playerid)
  622. {
  623. if(!VerificarNivelVip(playerid, 3)) return 1;
  624. for(new i=0; i< MAX_PLAYER_ATTACHED_OBJECTS; i++)
  625. {
  626. if(IsPlayerAttachedObjectSlotUsed(playerid, i)) RemovePlayerAttachedObject(playerid, i);
  627. }
  628. SendClientMessage(playerid, COR_VIP, "C-VIP: Toys successfully removed!");
  629. return 1;
  630. }
  631.  
  632. CMD:effects(playerid)
  633. {
  634. if(!VerificarNivelVip(playerid, 3)) return 1;
  635. if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, RED, "ERROR: You can not use this command on a vehicle!");
  636. SendClientMessage(playerid, COR_VIP, "C-VIP: List of Effects.");
  637. ShowEfects(playerid);
  638. return 1;
  639. }
  640.  
  641. CMD:teffect(playerid)
  642. {
  643. if(!VerificarNivelVip(playerid, 3)) return 1;
  644. RemovePlayerAttachedObject(playerid, 1); // Remove slot 1
  645. RemovePlayerAttachedObject(playerid, 2); // Remove slot 2
  646. SendClientMessage(playerid, COR_VIP, "C-VIP: Effects removed successfully!");
  647. return 1;
  648. }
  649.  
  650. // ======================================================
  651.  
  652.  
  653. // ==================== Commands PLAYER
  654.  
  655. CMD:activevip(playerid)
  656. {
  657. SendClientMessage(playerid, COR_VIP, "C-VIP: Add a valid Key to activate VIP.");
  658. ShowPlayerDialog(playerid, DIALOG_ENABLE_KEY, DIALOG_STYLE_INPUT, "VIP", "\nInform us your key to activate your VIP benefit:\n\n", "Active", "Cancel");
  659. return 1;
  660. }
  661.  
  662. CMD:vips(playerid)
  663. {
  664. new ContVIP = 0, String[1000], Str[128];
  665. for(new i = 0; i < MAX_PLAYERS; i++)
  666. {
  667. if(IsPlayerConnected(i) && PlayerInfo[i][Vip] > 0)
  668. {
  669. format(Str, sizeof(Str), ".:: VIP ON ::. {008B00}%s {FFFFFF} [{008B00}%i{FFFFFF}]\n", PlayerInfo[i][vName], i);
  670. strcat(String, Str);
  671. ContVIP++;
  672. }
  673. }
  674. if(ContVIP == 0)
  675. {
  676. ShowPlayerDialog(playerid, DIALOG_VIPS, DIALOG_STYLE_MSGBOX, "{EEC900}C-VIP: - VIPs Online", "{FF0000}No VIPs online right now!", "Ok", #);
  677. } else {
  678. ShowPlayerDialog(playerid, DIALOG_VIPS, DIALOG_STYLE_MSGBOX, "{EEC900}C-VIP: - VIPs Online", String, "Ok", #);
  679. }
  680. return 1;
  681. }
  682. // ======================================================
  683.  
  684.  
  685. // ==================== Commands ADMIN RCON
  686.  
  687. CMD:createkey(playerid)
  688. {
  689. if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, RED,"ERROR: Unavailable command. Admin RCON");
  690. ShowPlayerDialog(playerid, DIALOG_NEW_KEY, DIALOG_STYLE_INPUT, "KEYS VIP", "\nPlease enter a valid new key\n{FFFF00}Only letters are accepted:\n\n", "Create", "Cancel");
  691. return 1;
  692. }
  693.  
  694. CMD:removekey(playerid)
  695. {
  696. if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, RED,"ERROR: Unavailable command. Admin RCON");
  697. ShowPlayerDialog(playerid, DIALOG_REMOVE_KEY, DIALOG_STYLE_INPUT, "KEYS VIP", "\nEnter the Key you want to remove:\n\n", "Remove", "Cancel");
  698. return 1;
  699. }
  700.  
  701. CMD:setvip(playerid, params[])
  702. {
  703. if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, RED,"ERROR: Unavailable command. Admin RCON");
  704. new Nivel, Dias, ID;
  705. if(sscanf(params, "udd", ID, Nivel, Dias)) return SendClientMessage(playerid, GREY, "ADMIN: Use /setvip [ID] [Level] [Days]");
  706. if(Nivel < 1 || Nivel > 3) return SendClientMessage(playerid, RED, "ERROR: Invalid Level! Available 1 a 3.");
  707. if(!IsPlayerConnected(ID)) return SendClientMessage(playerid, RED, "ERROR: Unconnected player.");
  708. SendClientMessage(playerid, ORANGE, "ADMIN: Command performed successfully !");
  709. SetVip(ID, Nivel, Dias);
  710. return 1;
  711. }
  712.  
  713. CMD:removevip(playerid, params[])
  714. {
  715. if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, RED,"ERROR: Unavailable command. Admin RCON");
  716. new Motivo[100], Msg[128], ID;
  717. if(sscanf(params, "us", ID, Motivo)) return SendClientMessage(playerid, GREY, "ADMIN: Use /removevip [ID] [Reason]");
  718. if(!IsPlayerConnected(ID)) return SendClientMessage(playerid, RED, "ERROR: Unconnected player.");
  719. format(Msg, sizeof Msg, "C-VIP: Admin %s has withdrawn his VIP. Reason: %s.", PlayerInfo[playerid][vName], Motivo);
  720. SendClientMessage(ID, COR_VIP, Msg);
  721. RemoveVip(ID);
  722. SendClientMessage(playerid, ORANGE, "ADMIN: Command performed successfully !");
  723. return 1;
  724. }
  725.  
  726. CMD:respawn(playerid)
  727. {
  728. if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, RED,"ERROR: Unavailable command. Admin RCON");
  729. new String[70];
  730. format(String, sizeof(String), "ADMIN: Admin %s respawn on all created VIP vehicles!", PlayerInfo[playerid][vName]);
  731. SendClientMessageToAll(ORANGE, String);
  732. SendClientMessage(playerid, ORANGE, "ADMIN: All created VIP vehicles were destroyed!");
  733. for(new i = 0; i < sizeof(CarsCreated); i++) DestroyVehicle(CarsCreated[i]);
  734. return 1;
  735. }
  736. // ======================================================
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement