Advertisement
Guest User

Untitled

a guest
May 8th, 2018
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.62 KB | None | 0 0
  1. dialogGuardar(playerid){
  2.  
  3. ShowPlayerDialog(playerid, 305, DIALOG_STYLE_MSGBOX, " ",
  4. "{00CCFF} Você quer guardar uma arma neste slot?\n\
  5. {00CCFF} OBS: Você precisa ter uma arma com você!",
  6. "Sim", "Voltar");
  7.  
  8. SetPVarInt(playerid, "guardando", 1);
  9.  
  10. CancelSelectTextDraw(playerid);
  11. }
  12.  
  13. //-------------------------------------------------------
  14.  
  15. dialogGuardarPM(playerid){
  16.  
  17. ShowPlayerDialog(playerid, 307, DIALOG_STYLE_MSGBOX, " ",
  18. "{00CCFF} Você quer guardar uma arma neste slot?\n\
  19. {00CCFF} OBS: Você precisa ter uma arma com você!",
  20. "Sim", "Voltar");
  21.  
  22. SetPVarInt(playerid, "guardando", 1);
  23.  
  24. CancelSelectTextDraw(playerid);
  25. }
  26.  
  27. //-------------------------------------------------------
  28.  
  29. dialogHelp(playerid){
  30.  
  31. MEGAString[0]=EOS;
  32.  
  33. strcat(MEGAString, "{FFFFFF} Sistema de Inventário onde você pode\n");
  34. strcat(MEGAString, "{FFFFFF} guardar, pegar ou descartar suas armas ou itens\n\n");
  35.  
  36. strcat(MEGAString, "{FFFFFF}x{A0A0A0} Para usar/guardar uma arma/item, selecione ela e vá em ''usar'' e coloque usar/guardar\n");
  37. strcat(MEGAString, "{FFFFFF}x{A0A0A0} Para descartar uma arma, selecione ela e vá em ''usar'' e coloque dropar\n");
  38.  
  39. ShowPlayerDialog(playerid, 8724, DIALOG_STYLE_MSGBOX, "Ajuda Inventario", MEGAString, "Informado","");
  40. }
  41.  
  42. //------------------------------------------------------
  43.  
  44. countWeapons(playerid){
  45.  
  46. new count, weap, ammo;
  47. for(new x = 1; x != 13; x++){
  48.  
  49. GetPlayerWeaponData(playerid, x, weap, ammo);
  50.  
  51. if(weap && ammo){
  52.  
  53. count++;
  54. }
  55. }
  56. return count;
  57. }
  58.  
  59. //------------------------------------------------------
  60.  
  61. dialogArmas(playerid){
  62.  
  63. if(!countWeapons(playerid))
  64. return SendClientMessage(playerid, COLOR_YELLOW, "*Você não tem uma arma com você."), CancelSelectTextDraw(playerid),SelectTextDraw(playerid, 0xAAAAAAFF);
  65.  
  66. new Str[95],
  67. weap,
  68. ammo;
  69.  
  70. MEGAString[0] = EOS;
  71.  
  72. for(new x = 1; x != 13; x++){
  73.  
  74. GetPlayerWeaponData(playerid, x, weap, ammo);
  75.  
  76. if(weap && ammo){
  77.  
  78. format(Str, 95, "{FFFFFF}Arma: {A0A0A0}%s {FFFFFF}Balas: {A0A0A0}%03d\n", GunNames[weap], ammo);
  79. strcat(MEGAString, Str);
  80. }else{
  81.  
  82. strcat(MEGAString, "{FFFFFF}Arma: {A0A0A0}-------- {FFFFFF}Balas: {A0A0A0}---\n");
  83. }
  84. }
  85. ShowPlayerDialog(playerid, 306, DIALOG_STYLE_LIST, "Escolha a arma para guardar", MEGAString, "Guardar", "Sair");
  86.  
  87. return 1;
  88. }
  89.  
  90. dialogArmasPM(playerid){
  91.  
  92. if(!countWeapons(playerid))
  93. return SendClientMessage(playerid, COLOR_YELLOW, "*Você não tem uma arma com você."), SelectTextDraw(playerid, 0xAAAAAAFF);
  94.  
  95. new Str[95],
  96. weap,
  97. ammo;
  98.  
  99. MEGAString[0] = EOS;
  100.  
  101. for(new x = 1; x != 13; x++){
  102.  
  103. GetPlayerWeaponData(playerid, x, weap, ammo);
  104.  
  105. if(weap && ammo){
  106.  
  107. format(Str, 95, "{FFFFFF}Arma: {A0A0A0}%s {FFFFFF}Balas: {A0A0A0}%03d\n", GunNames[weap], ammo);
  108. strcat(MEGAString, Str);
  109. }else{
  110.  
  111. strcat(MEGAString, "{FFFFFF}Arma: {A0A0A0}-------- {FFFFFF}Balas: {A0A0A0}---\n");
  112. }
  113. }
  114. ShowPlayerDialog(playerid, 308, DIALOG_STYLE_LIST, "Escolha a arma para guardar", MEGAString, "Guardar", "Sair");
  115.  
  116. return 1;
  117. }
  118. stock RemoveVendingMachines(playerid)
  119. {
  120. // Remove 24/7 machines
  121. RemoveBuildingForPlayer(playerid, 1776, -33.8750, -186.7656, 1003.6328, 0.25);
  122. RemoveBuildingForPlayer(playerid, 1775, -32.4453, -186.6953, 1003.6328, 0.25);
  123.  
  124. // Remove all other machines
  125. for(new i = 0; i < 43; i++)
  126. {
  127. RemoveBuildingForPlayer(playerid, 955, VMachines[i][0], VMachines[i][1], VMachines[i][2], 0.50);
  128. RemoveBuildingForPlayer(playerid, 956, VMachines[i][0], VMachines[i][1], VMachines[i][2], 0.50);
  129. }
  130. return 1;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement