Guest User

Untitled

a guest
Feb 10th, 2016
7,131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 106.26 KB | None | 0 0
  1. // FilterScript developed by CaioTJF (Forum SA-MP Profile:  http://forum.sa-mp.com/member.php?u=178553)
  2. // If you use this in your server, please contact me to see.
  3. // Version: 2.0
  4. // Official topic PT-BR: http://forum.sa-mp.com/showthread.php?p=3653596
  5. // Official topic EN: http://forum.sa-mp.com/showthread.php?p=3655514
  6.  
  7. //-------------------------------------------------------------------//
  8. //************************** -Includes- *****************************//
  9. //-------------------------------------------------------------------//
  10.  
  11. #include <a_samp>
  12. #include <zcmd> // This is for the command /additem
  13. #include <sscanf2> // This is for the command /additem
  14.  
  15. //-------------------------------------------------------------------//
  16. //************************** -Defines- ******************************//
  17. //-------------------------------------------------------------------//
  18.  
  19. #define MAX_INVENTORY_SLOTS     15 // Don't change
  20. #define MAX_ITENS_WORLD         500
  21. #define TIMER_ITEM_WORLD        60*10
  22.  
  23. //-------------------------------------------------------------------//
  24. //************************ -Enumerações- ****************************//
  25. //-------------------------------------------------------------------//
  26.  
  27. enum enum_Itens
  28. {
  29.     item_id,
  30.     item_tipo,
  31.     item_modelo,
  32.     item_nome[24],
  33.     item_limite,
  34.     bool:item_canbedropped,
  35.     Float:item_previewrot[4],
  36.     item_description[200]
  37. }
  38.  
  39. enum
  40. {
  41.     ITEM_TYPE_WEAPON,
  42.     ITEM_TYPE_HELMET,
  43.     ITEM_TYPE_NORMAL,
  44.     ITEM_TYPE_BODY,
  45.     ITEM_TYPE_AMMO,
  46.     ITEM_TYPE_BACKPACK,
  47.     ITEM_TYPE_MELEEWEAPON
  48. }
  49.  
  50. enum enum_pInventory
  51. {
  52.     invSlot[MAX_INVENTORY_SLOTS],
  53.     invSelectedSlot,
  54.     invSlotAmount[MAX_INVENTORY_SLOTS],
  55.     Float:invArmourStatus[MAX_INVENTORY_SLOTS]
  56. }
  57.  
  58. enum enum_pCharacter
  59. {
  60.     charSlot[7],
  61.     charSelectedSlot,
  62.     Float:charArmourStatus
  63. }
  64.  
  65. enum enum_Player
  66. {
  67.     bool:inInventory,
  68.     bool:MessageInventory,
  69.     MessageInventoryTimer,
  70.     Language
  71. }
  72.  
  73. enum enum_ItensWorld
  74. {
  75.     bool:world_active,
  76.     world_itemid,
  77.     world_model,
  78.     world_amount,
  79.     world_object,
  80.     world_timer,
  81.     Text3D:world_3dtext,
  82.     Float:world_armourstatus,
  83.     Float:world_position[3],
  84.    
  85. }
  86.  
  87. new Itens[][enum_Itens] =
  88. {
  89.     {0,     ITEM_TYPE_NORMAL,       19382,      "Nada",                 0,          false,      {0.0,0.0,0.0,0.0},                              "N/A"},
  90.     {1,     ITEM_TYPE_HELMET,       18645,      "Capacete",             1,          true,       {0.000000, 0.000000, 0.000000, 1.000000},       "Protege contra headshots."},
  91.     {2,     ITEM_TYPE_WEAPON,       348,        "Deagle",               1,          true,       {0.000000, -30.00000, 0.000000, 1.200000},      "Pistola de alto calibre.~n~~n~~g~Headshot habilitado."},
  92.     {3,     ITEM_TYPE_WEAPON,       356,        "M4",                   1,          true,       {0.000000, -30.00000, 0.000000, 2.200000},      "Fuzil de longo alcance~n~com média precisão."},
  93.     {4,     ITEM_TYPE_AMMO,         2061,       "Munição",                200,        true,       {0.000000, 0.000000, 0.000000, 2.000000},       "Munição para armas de fogo."},
  94.     {5,     ITEM_TYPE_WEAPON,       344,        "Molotov",              5,          true,       {0.000000, 0.000000, 0.000000, 1.000000},       "Arma incendiaria caseira."},
  95.     {6,     ITEM_TYPE_BODY,         19142,      "Colete",               1,          true,       {0.000000, 0.000000, 0.000000, 1.000000},       "Colete aprova de balas."},
  96.     {7,     ITEM_TYPE_BACKPACK,     3026,       "Mochila Média",       1,          true,       {0.000000, 0.000000, 0.000000, 1.000000},       "Mochila que aumenta seu~n~inventário."},
  97.     {8,     ITEM_TYPE_BACKPACK,     3026,       "Mochila Grande",       1,          true,       {0.000000, 0.000000, 0.000000, 1.000000},       "Mochila que aumenta seu~n~inventário."},
  98.     {9,     ITEM_TYPE_WEAPON,       355,        "AK-47",                1,          true,       {0.000000, -30.00000, 0.000000, 2.200000},      "Fuzil de longo alcance~n~com média precisão."},
  99.     {10,    ITEM_TYPE_WEAPON,       349,        "Shotgun",              1,          true,       {0.000000, -30.00000, 0.000000, 2.200000},      "Shotgun de curto alcance~n~com um grande poder de fogo.~n~~n~~g~Headshot habilitado."},
  100.     {11,    ITEM_TYPE_MELEEWEAPON,  335,        "Faca",                 1,          true,       {0.000000, -30.00000, 0.000000, 2.200000},      "Arma de corpo-a-corpo."},
  101.     {12,    ITEM_TYPE_MELEEWEAPON,  334,        "Cacetete",             1,          true,       {0.000000, -30.00000, 0.000000, 1.500000},      "Arma de corpo-a-corpo."},
  102.     {13,    ITEM_TYPE_WEAPON,       352,        "Uzi",                  1,          true,       {0.000000, -30.00000, 0.000000, 1.200000},      "Micro metralhadora~n~de duas mãos.."},
  103.     {14,    ITEM_TYPE_WEAPON,       347,        "Usp",                  1,          true,       {0.000000, -30.00000, 0.000000, 1.200000},      "Pistola com silenciador.~n~~n~~g~Headshot habilitado."},
  104.     {15,    ITEM_TYPE_WEAPON,       353,        "MP5",                  1,          true,       {0.000000, -30.00000, 0.000000, 2.200000},      "Micro metralhadora."},
  105.     {16,    ITEM_TYPE_WEAPON,       358,        "Sniper",               1,          true,       {0.000000, -30.00000, 0.000000, 2.200000},      "Rifle de longo alcance.~n~~n~~g~Headshot habilitado."},
  106.     {17,    ITEM_TYPE_WEAPON,       342,        "Granada",              5,          true,       {0.000000, 0.000000, 0.000000, 1.000000},       "Explosivo poderoso."},
  107.     {18,    ITEM_TYPE_NORMAL,       11738,      "Kit Médico",          5,          true,       {0.000000, 0.000000, 0.000000, 1.000000},       "Kit de primeiro socorros~n~que recupera sua vida."}
  108. };
  109.  
  110. //-------------------------------------------------------------------//
  111. //************************* -Variables- *****************************//
  112. //-------------------------------------------------------------------//
  113.  
  114. new pInventory[MAX_PLAYERS][enum_pInventory];
  115. new pCharacter[MAX_PLAYERS][enum_pCharacter];
  116. new Player[MAX_PLAYERS][enum_Player];
  117. new ItensWorld[MAX_ITENS_WORLD][enum_ItensWorld];
  118. new String[256];
  119. new LastItemID;
  120.  
  121. //-------------------------------------------------------------------//
  122. //************************* -TextDraws- *****************************//
  123. //-------------------------------------------------------------------//
  124.  
  125. new PlayerText:inventario_index[MAX_PLAYERS][15];
  126. new PlayerText:inventario_skin[MAX_PLAYERS];
  127. new PlayerText:inventario_textos[MAX_PLAYERS][11];
  128. new PlayerText:inventario_description[MAX_PLAYERS][4];
  129. new PlayerText:inventario_personagemindex[MAX_PLAYERS][7];
  130. new PlayerText:inventario_mensagem[MAX_PLAYERS];
  131.  
  132. new Text:inventario_usar;
  133. new Text:inventario_split[2];
  134. new Text:inventario_drop[2];
  135. new Text:inventario_close[2];
  136. new Text:inventario_backgrounds[5];
  137. new Text:inventario_remover;
  138.  
  139. //-------------------------------------------------------------------//
  140. //********************** -FilterScript- *****************************//
  141. //-------------------------------------------------------------------//
  142.  
  143. forward @TimerOneSecond();
  144. forward HideMessageInventory(playerid);
  145. forward Float:GetPlayerArmourEx(playerid);
  146.  
  147. public OnFilterScriptInit()
  148. {
  149.     SetTimer("@TimerOneSecond", 1000, true);
  150.    
  151.     LoadTextDraws();
  152.    
  153.     LastItemID = 0;
  154.     return 1;
  155. }
  156.  
  157. public OnPlayerConnect(playerid)
  158. {
  159.     ResetVariables(playerid);
  160.    
  161.     for(new i = 0; i < 10; i++)
  162.         RemovePlayerAttachedObject(playerid, i);
  163.  
  164.     pInventory[playerid][invSelectedSlot] = -1;
  165.     pCharacter[playerid][charSelectedSlot] = -1;
  166.     Player[playerid][Language] = 2;
  167.    
  168.     LoadPlayerTextDraws(playerid);
  169.     return 1;
  170. }
  171.  
  172. public OnPlayerDisconnect(playerid, reason)
  173. {
  174.     if(Player[playerid][MessageInventory])
  175.         KillTimer(Player[playerid][MessageInventoryTimer]);
  176.  
  177.     ResetVariables(playerid);
  178.     return true;
  179. }
  180.  
  181. public OnPlayerSpawn(playerid)
  182. {
  183.     SetPlayerSkin(playerid, 292);
  184.     return true;
  185. }
  186.  
  187. public OnPlayerClickTextDraw(playerid, Text:clickedid)
  188. {
  189.     if(clickedid == Text:INVALID_TEXT_DRAW)
  190.     {
  191.         if(Player[playerid][inInventory])
  192.             HideInventory(playerid);
  193.     }
  194.     else if(clickedid == inventario_close[0])
  195.     {
  196.         HideInventory(playerid);
  197.     }
  198.     else if(clickedid == inventario_usar)
  199.     {
  200.         if(pInventory[playerid][invSelectedSlot] == -1)
  201.             return 0;
  202.  
  203.         new slot = pInventory[playerid][invSelectedSlot];
  204.        
  205.         pInventory[playerid][invSelectedSlot] = -1;
  206.         UseItem(playerid, slot, Itens[pInventory[playerid][invSlot][slot]][item_id]);
  207.     }
  208.     else if(clickedid == inventario_split[0])
  209.     {
  210.         if(pInventory[playerid][invSelectedSlot] == -1)
  211.             return 0;
  212.            
  213.         if(IsInventoryFull(playerid))
  214.             return ShowMessageInventory(playerid, Translate(Player[playerid][Language],
  215.             "~r~ERRO: ~w~Seu inventário está cheio.",
  216.             "~r~ERROR: ~w~Your inventory is full."));
  217.            
  218.         new slot = pInventory[playerid][invSelectedSlot];
  219.  
  220.         if(pInventory[playerid][invSlotAmount][slot] == 1)
  221.             return ShowMessageInventory(playerid, Translate(Player[playerid][Language],
  222.             "~r~ERRO: ~w~Você não pode dividir esse item.",
  223.             "~r~ERROR: ~w~You can't divide this item."));
  224.  
  225.         SplitItem(playerid, pInventory[playerid][invSelectedSlot]);
  226.     }
  227.     else if(clickedid == inventario_drop[0])
  228.     {
  229.         if(pInventory[playerid][invSelectedSlot] == -1)
  230.             return 0;
  231.            
  232.         new slot = pInventory[playerid][invSelectedSlot];
  233.         new itemid = pInventory[playerid][invSlot][slot];
  234.         new amount = pInventory[playerid][invSlotAmount][slot];
  235.         new Float:armourstatus = pInventory[playerid][invArmourStatus][slot];
  236.         new Float:pos[3];
  237.        
  238.         if(!Itens[itemid][item_canbedropped])
  239.             return ShowMessageInventory(playerid, Translate(Player[playerid][Language],
  240.             "~r~ERRO: ~w~Você não pode derrubar esse item.",
  241.             "~r~ERROR: ~w~You can't drop this item."));
  242.  
  243.         GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
  244.  
  245.         if(itemid == 6)
  246.             DropItem(pos[0], pos[1], pos[2], itemid, amount, armourstatus);
  247.         else
  248.             DropItem(pos[0], pos[1], pos[2], itemid, amount);
  249.            
  250.         RemoveItemFromInventory(playerid, slot);
  251.        
  252.         for(new a = 0; a < 4; a++)
  253.             PlayerTextDrawHide(playerid, inventario_description[playerid][a]);
  254.  
  255.         TextDrawHideForPlayer(playerid, inventario_backgrounds[4]);
  256.        
  257.         pInventory[playerid][invSelectedSlot] = -1;
  258.  
  259.     }
  260.     else if(clickedid == inventario_remover)
  261.     {
  262.         if(pCharacter[playerid][charSelectedSlot] == -1)
  263.             return 0;
  264.        
  265.         if(IsInventoryFull(playerid))
  266.             return ShowMessageInventory(playerid, Translate(Player[playerid][Language],
  267.             "~r~ERRO: ~w~Seu inventário está cheio.",
  268.             "~r~ERROR: ~w~Your inventory is full."));
  269.  
  270.         new selected = pCharacter[playerid][charSelectedSlot];
  271.  
  272.         if(selected == 2)
  273.             if(GetSlotsInUse(playerid) > 5)
  274.                 return ShowMessageInventory(playerid, Translate(Player[playerid][Language],
  275.                 "~r~ERRO: ~w~Esvazie seu inventário.",
  276.                 "~r~ERROR: ~w~Clean your inventory."));
  277.  
  278.         if(selected == 2)
  279.             if(GetSlotsInUse(playerid) >= 5)
  280.                 return ShowMessageInventory(playerid, Translate(Player[playerid][Language],
  281.                 "~r~ERRO: ~w~Não tem espaço no seu inventário.",
  282.                 "~r~ERROR: ~w~You don't have space in your inventory."));
  283.  
  284.         if(selected == 1)
  285.             AddItem(playerid, pCharacter[playerid][charSlot][selected], 1, pCharacter[playerid][charArmourStatus]);
  286.         else if(Itens[pCharacter[playerid][charSlot][selected]][item_id] == 5 || Itens[pCharacter[playerid][charSlot][selected]][item_id] == 17)
  287.         {
  288.             new weapons[13][2];
  289.  
  290.             for (new s = 0; s <= 12; s++)
  291.                 GetPlayerWeaponData(playerid, s, weapons[s][0], weapons[s][1]);
  292.  
  293.             AddItem(playerid, pCharacter[playerid][charSlot][selected], weapons[8][1]);
  294.         }
  295.         else
  296.             AddItem(playerid, pCharacter[playerid][charSlot][selected], 1);
  297.            
  298.         RemoveItemFromCharacter(playerid, selected);
  299.        
  300.         pCharacter[playerid][charSelectedSlot] = -1;
  301.     }
  302.  
  303.     return 1;
  304. }
  305.  
  306. public OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid)
  307. {
  308.     for(new i = 0; i < MAX_INVENTORY_SLOTS; i++)
  309.         if(playertextid == inventario_index[playerid][i])
  310.         {
  311.             if(pInventory[playerid][invSlot][i] == 0)
  312.                 break;
  313.                
  314.             if(pInventory[playerid][invSelectedSlot] == i)
  315.             {
  316.                 PlayerTextDrawBackgroundColor(playerid, inventario_index[playerid][i], 96);
  317.                 pInventory[playerid][invSelectedSlot] = -1;
  318.                 PlayerTextDrawHide(playerid, inventario_index[playerid][i]);
  319.                 PlayerTextDrawShow(playerid, inventario_index[playerid][i]);
  320.                
  321.                 for(new a = 0; a < 4; a++)
  322.                     PlayerTextDrawHide(playerid, inventario_description[playerid][a]);
  323.                    
  324.                 TextDrawHideForPlayer(playerid, inventario_backgrounds[4]);
  325.                
  326.                 TextDrawHideForPlayer(playerid, inventario_usar);
  327.                 TextDrawHideForPlayer(playerid, inventario_split[0]);
  328.                 TextDrawHideForPlayer(playerid, inventario_split[1]);
  329.                 TextDrawHideForPlayer(playerid, inventario_drop[0]);
  330.                 TextDrawHideForPlayer(playerid, inventario_drop[1]);
  331.                
  332.                 PlayerTextDrawHide(playerid, inventario_textos[playerid][9]);
  333.                    
  334.                 break;
  335.             }
  336.             else if(pInventory[playerid][invSelectedSlot] != -1)
  337.             {
  338.                 PlayerTextDrawBackgroundColor(playerid, inventario_index[playerid][pInventory[playerid][invSelectedSlot]], 96);
  339.                 PlayerTextDrawHide(playerid, inventario_index[playerid][pInventory[playerid][invSelectedSlot]]);
  340.                 PlayerTextDrawShow(playerid, inventario_index[playerid][pInventory[playerid][invSelectedSlot]]);
  341.             }
  342.            
  343.             PlayerTextDrawBackgroundColor(playerid, inventario_index[playerid][i], 0xFFFFFF50);
  344.  
  345.             PlayerTextDrawHide(playerid, inventario_index[playerid][i]);
  346.             PlayerTextDrawShow(playerid, inventario_index[playerid][i]);
  347.            
  348.             // Descrição do Item
  349.            
  350.             PlayerTextDrawSetPreviewModel(playerid, inventario_description[playerid][0], Itens[pInventory[playerid][invSlot][i]][item_modelo]);
  351.             PlayerTextDrawSetPreviewRot(playerid, inventario_description[playerid][0], Itens[pInventory[playerid][invSlot][i]][item_previewrot][0], Itens[pInventory[playerid][invSlot][i]][item_previewrot][1], Itens[pInventory[playerid][invSlot][i]][item_previewrot][2], Itens[pInventory[playerid][invSlot][i]][item_previewrot][3]);
  352.             PlayerTextDrawShow(playerid, inventario_description[playerid][0]);
  353.  
  354.             PlayerTextDrawSetString(playerid, inventario_description[playerid][1], ConvertToGameText(Itens[pInventory[playerid][invSlot][i]][item_nome]));
  355.             PlayerTextDrawSetString(playerid, inventario_description[playerid][2], ConvertToGameText(Itens[pInventory[playerid][invSlot][i]][item_description]));
  356.            
  357.             if(Itens[pInventory[playerid][invSlot][i]][item_tipo] == ITEM_TYPE_BODY)
  358.                 format(String, sizeof(String), "%s: %.1f", Translate(Player[playerid][Language], "Durabilidade", "Durability"), pInventory[playerid][invArmourStatus][i]);
  359.             else if(pInventory[playerid][invSlotAmount][i] > 1)
  360.                 format(String, sizeof(String), "%s: %d", Translate(Player[playerid][Language], "Quantidade", "Amount"), pInventory[playerid][invSlotAmount][i]);
  361.             else
  362.                 String = " ";
  363.                
  364.             PlayerTextDrawSetString(playerid, inventario_description[playerid][3], String);
  365.  
  366.             if(pInventory[playerid][invSelectedSlot] == -1)
  367.             {
  368.                 TextDrawShowForPlayer(playerid, inventario_usar);
  369.                 TextDrawShowForPlayer(playerid, inventario_split[0]);
  370.                 TextDrawShowForPlayer(playerid, inventario_split[1]);
  371.                 TextDrawShowForPlayer(playerid, inventario_drop[0]);
  372.                 TextDrawShowForPlayer(playerid, inventario_drop[1]);
  373.                 PlayerTextDrawShow(playerid, inventario_textos[playerid][9]);
  374.                
  375.                 for(new a = 0; a < 4; a++)
  376.                     PlayerTextDrawShow(playerid, inventario_description[playerid][a]);
  377.  
  378.                 TextDrawShowForPlayer(playerid, inventario_backgrounds[4]);
  379.             }
  380.            
  381.             pInventory[playerid][invSelectedSlot] = i;
  382.             break;
  383.         }
  384.  
  385.     for(new i = 0; i < 7; i++)
  386.         if(playertextid == inventario_personagemindex[playerid][i])
  387.         {
  388.             if(pCharacter[playerid][charSlot][i] == 0)
  389.                 break;
  390.                
  391.             if(pCharacter[playerid][charSelectedSlot] == i)
  392.             {
  393.                 PlayerTextDrawBackgroundColor(playerid, inventario_personagemindex[playerid][i], 96);
  394.                 PlayerTextDrawHide(playerid, inventario_personagemindex[playerid][i]);
  395.                 PlayerTextDrawShow(playerid, inventario_personagemindex[playerid][i]);
  396.                 pCharacter[playerid][charSelectedSlot] = -1;
  397.  
  398.                 PlayerTextDrawHide(playerid, inventario_textos[playerid][10]);
  399.                 TextDrawHideForPlayer(playerid, inventario_remover);
  400.                 break;
  401.             }
  402.             else if(pCharacter[playerid][charSelectedSlot] != -1)
  403.             {
  404.                 new char_slot = pCharacter[playerid][charSelectedSlot];
  405.                 PlayerTextDrawBackgroundColor(playerid, inventario_personagemindex[playerid][char_slot], 96);
  406.                 PlayerTextDrawHide(playerid, inventario_personagemindex[playerid][char_slot]);
  407.                 PlayerTextDrawShow(playerid, inventario_personagemindex[playerid][char_slot]);
  408.             }
  409.            
  410.             PlayerTextDrawBackgroundColor(playerid, inventario_personagemindex[playerid][i], 0xFFFFFF50);
  411.             PlayerTextDrawHide(playerid, inventario_personagemindex[playerid][i]);
  412.             PlayerTextDrawShow(playerid, inventario_personagemindex[playerid][i]);
  413.  
  414.             if(pCharacter[playerid][charSelectedSlot] == -1)
  415.             {
  416.                 PlayerTextDrawShow(playerid, inventario_textos[playerid][10]);
  417.                 TextDrawShowForPlayer(playerid, inventario_remover);
  418.             }
  419.            
  420.             pCharacter[playerid][charSelectedSlot] = i;
  421.             break;
  422.         }
  423.        
  424.     return 1;
  425. }
  426.  
  427. public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
  428. {
  429.     new bool:valid_shot = true;
  430.    
  431.     new ammu_slot = GetAmmunationSlot(playerid);
  432.        
  433.     if(ammu_slot == -1)
  434.     {
  435.         for(new s = 3; s < 7; s ++)
  436.             if(Itens[pCharacter[playerid][charSlot][s]][item_tipo] != ITEM_TYPE_MELEEWEAPON)
  437.                 if(pCharacter[playerid][charSlot][s] != 0)
  438.                 {
  439.                     AddItem(playerid, pCharacter[playerid][charSlot][s], 1);
  440.                     RemoveItemFromCharacter(playerid, s);
  441.                 }
  442.                
  443.         return false;
  444.     }
  445.  
  446.     pInventory[playerid][invSlotAmount][GetAmmunationSlot(playerid)] --;
  447.     SetPlayerAmmo(playerid, weaponid, GetAmmunation(playerid));
  448.  
  449.     if(GetAmmunation(playerid) <= 0)
  450.         for(new s = 3; s < 7; s ++)
  451.             if(Itens[pCharacter[playerid][charSlot][s]][item_tipo] != ITEM_TYPE_MELEEWEAPON)
  452.                 if(pCharacter[playerid][charSlot][s] != 0)
  453.                 {
  454.                     AddItem(playerid, pCharacter[playerid][charSlot][s], 1);
  455.                     RemoveItemFromCharacter(playerid, s);
  456.                     valid_shot = false;
  457.                 }
  458.  
  459.     if(pInventory[playerid][invSlotAmount][ammu_slot] <= 0)
  460.         RemoveItemFromInventory(playerid, ammu_slot);
  461.        
  462.     if(valid_shot == false)
  463.         return false;
  464.  
  465.     return true;
  466. }
  467.  
  468. public OnPlayerKeyStateChange(playerid,newkeys,oldkeys)
  469. {
  470.     if(newkeys == KEY_NO)
  471.         if(!Player[playerid][inInventory])
  472.             ShowInventory(playerid);
  473.            
  474.     if(newkeys == KEY_WALK)
  475.         for(new i = 0; i < MAX_ITENS_WORLD; i++)
  476.         {
  477.             if(ItensWorld[i][world_active])
  478.             {
  479.                 if(IsPlayerInRangeOfPoint(playerid, 2.0, ItensWorld[i][world_position][0], ItensWorld[i][world_position][1], ItensWorld[i][world_position][2]))
  480.                 {
  481.                     new bool:sucess = false;
  482.  
  483.                     if(!IsInventoryFull(playerid))
  484.                     {
  485.                         AddItem(playerid, ItensWorld[i][world_itemid], ItensWorld[i][world_amount], ItensWorld[i][world_armourstatus]);
  486.                         DeleteItemWorld(i);
  487.                         sucess = true;
  488.                     }
  489.  
  490.                     if(!sucess)
  491.                         for(new a = 0; a < GetSlotsInventory(playerid); a ++)
  492.                             if(pInventory[playerid][invSlot][a] == ItensWorld[i][world_itemid])
  493.                                 if(Itens[ItensWorld[i][world_itemid]][item_limite] >= ItensWorld[i][world_amount]+pInventory[playerid][invSlotAmount][a])
  494.                                 {
  495.                                     AddItem(playerid, ItensWorld[i][world_itemid], ItensWorld[i][world_amount], ItensWorld[i][world_armourstatus]);
  496.                                     DeleteItemWorld(i);
  497.                                     sucess = true;
  498.                                     break;
  499.                                 }
  500.  
  501.                     if(!sucess)
  502.                         ShowMessageInventory(playerid, Translate(Player[playerid][Language],
  503.                         "~r~ERRO: ~w~Seu inventário está cheio.",
  504.                         "~r~ERROR: ~w~Your inventory is full."));
  505.                        
  506.                     break;
  507.                 }
  508.             }
  509.         }
  510.  
  511.     return true;
  512. }
  513.  
  514. public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart)
  515. {
  516.     if(issuerid != INVALID_PLAYER_ID )
  517.         if(bodypart == 9)
  518.             if(weaponid == 23 || weaponid == 24 || weaponid == 25 || weaponid == 34)
  519.                 if(pCharacter[playerid][charSlot][0] != 0)
  520.                     RemoveItemFromCharacter(playerid, 0);
  521.                 else
  522.                     SetPlayerHealth(playerid, 0.0);
  523.                
  524.     return true;
  525. }
  526.  
  527. public OnPlayerUpdate(playerid)
  528. {
  529.     new weapons[13][2];
  530.     new bool:have_fuzil = false;
  531.  
  532.     for (new s = 0; s <= 12; s++)
  533.         GetPlayerWeaponData(playerid, s, weapons[s][0], weapons[s][1]);
  534.  
  535.     for(new s = 3; s < 7; s ++)
  536.     {
  537.         if(weapons[8][0] == 18 && weapons[8][1] == 0)
  538.             if(pCharacter[playerid][charSlot][s] == 5)
  539.                 RemoveItemFromCharacter(playerid, s);
  540.  
  541.         if(weapons[8][0] == 16 && weapons[8][1] == 0)
  542.             if(pCharacter[playerid][charSlot][s] == 17)
  543.                 RemoveItemFromCharacter(playerid, s);
  544.                
  545.         if(pCharacter[playerid][charSlot][s] == 3 || pCharacter[playerid][charSlot][s] == 9)
  546.         {
  547.             new weaponid = GetWeaponIDFromModel(Itens[pCharacter[playerid][charSlot][s]][item_modelo]);
  548.  
  549.             if(GetPlayerWeapon(playerid) != weaponid)
  550.                 SetPlayerAttachedObject(playerid, 3, Itens[pCharacter[playerid][charSlot][s]][item_modelo], 1, 0.015999,-0.125999,-0.153000,0.000000,-22.700004,0.400000,1.000000,1.000000,1.000000);
  551.             else
  552.                 RemovePlayerAttachedObject(playerid, 3);
  553.                
  554.             have_fuzil = true;
  555.         }
  556.        
  557.         if(!have_fuzil && pCharacter[playerid][charSlot][s] == 16)
  558.         {
  559.             new weaponid = GetWeaponIDFromModel(Itens[pCharacter[playerid][charSlot][s]][item_modelo]);
  560.  
  561.             if(GetPlayerWeapon(playerid) != weaponid)
  562.                 SetPlayerAttachedObject(playerid, 3, Itens[pCharacter[playerid][charSlot][s]][item_modelo], 1, 0.015999,-0.125999,-0.153000,0.000000,-22.700004,0.400000,1.000000,1.000000,1.000000);
  563.             else
  564.                 RemovePlayerAttachedObject(playerid, 3);
  565.         }
  566.        
  567.         if(pCharacter[playerid][charSlot][s] == 10)
  568.         {
  569.             new weaponid = GetWeaponIDFromModel(Itens[pCharacter[playerid][charSlot][s]][item_modelo]);
  570.            
  571.             if(GetPlayerWeapon(playerid) != weaponid)
  572.                 SetPlayerAttachedObject(playerid, 4, Itens[pCharacter[playerid][charSlot][s]][item_modelo],1,-0.032000,-0.127000,0.000999,20.600004,29.900007,-2.599998,1.000000,1.000000,1.000000);
  573.             else
  574.                 RemovePlayerAttachedObject(playerid, 4);
  575.         }
  576.        
  577.         if(pCharacter[playerid][charSlot][s] == 2)
  578.         {
  579.             new weaponid = GetWeaponIDFromModel(Itens[pCharacter[playerid][charSlot][s]][item_modelo]);
  580.            
  581.             if(GetPlayerWeapon(playerid) != weaponid)
  582.                 SetPlayerAttachedObject(playerid, 5, Itens[pCharacter[playerid][charSlot][s]][item_modelo],1,-0.053999,0.005999,-0.207000,67.899978,-177.600006,-0.400004,1.000000,1.000000,1.000000);
  583.             else
  584.                 RemovePlayerAttachedObject(playerid, 5);
  585.         }
  586.        
  587.         new itemid = pCharacter[playerid][charSlot][s];
  588.         if(Itens[itemid][item_tipo] == ITEM_TYPE_MELEEWEAPON)
  589.         {
  590.             new weaponid = GetWeaponIDFromModel(Itens[pCharacter[playerid][charSlot][s]][item_modelo]);
  591.  
  592.             if(GetPlayerWeapon(playerid) != weaponid)
  593.                 SetPlayerAttachedObject(playerid,6,Itens[pCharacter[playerid][charSlot][s]][item_modelo],1,-0.226999,-0.034999,0.211999,-97.999916,-88.000083,3.600018,1.000000,1.000000,1.000000);
  594.             else
  595.                 RemovePlayerAttachedObject(playerid, 6);
  596.         }
  597.     }
  598.    
  599.     return true;
  600. }
  601.  
  602. //----------------------------------------------------------
  603.  
  604. @TimerOneSecond()
  605. {
  606.     for(new i = 0; i < MAX_ITENS_WORLD; i++)
  607.         if(ItensWorld[i][world_active])
  608.         {
  609.             ItensWorld[i][world_timer]--;
  610.                
  611.             if(ItensWorld[i][world_timer] == 0)
  612.                 DeleteItemWorld(i);
  613.         }
  614.  
  615.     for(new playerid=0; playerid < MAX_PLAYERS; playerid++)
  616.     {
  617.         if(pCharacter[playerid][charSlot][1] != 0)
  618.             if(GetPlayerArmourEx(playerid) > 0.0)
  619.                 pCharacter[playerid][charArmourStatus] = GetPlayerArmourEx(playerid);
  620.             else
  621.                 RemoveItemFromCharacter(playerid, 1);
  622.     }
  623. }
  624.  
  625. //----------------------------------------------------------
  626.  
  627. stock AddItem(playerid, itemid, amount, Float:armorstatus = 100.0)
  628. {
  629.     new bool:sucess = false;
  630.    
  631.     for(new i = 0; i < MAX_INVENTORY_SLOTS; i ++)
  632.     {
  633.         if(pInventory[playerid][invSlot][i] == itemid && Itens[pInventory[playerid][invSlot][i]][item_limite] > 1 && pInventory[playerid][invSlotAmount][i] != Itens[pInventory[playerid][invSlot][i]][item_limite])
  634.         {
  635.             new check = amount + pInventory[playerid][invSlotAmount][i];
  636.  
  637.             if(check > Itens[pInventory[playerid][invSlot][i]][item_limite])
  638.             {
  639.                 pInventory[playerid][invSlotAmount][i] = Itens[itemid][item_limite];
  640.  
  641.                 for(new a = 0; a < MAX_INVENTORY_SLOTS; a ++)
  642.                 {
  643.                     if(pInventory[playerid][invSlot][a] == 0)
  644.                     {
  645.                         pInventory[playerid][invSlot][a] = itemid;
  646.                         new resto = Itens[itemid][item_limite] - check;
  647.                         pInventory[playerid][invSlotAmount][a] = resto*-1;
  648.                        
  649.                         if(Player[playerid][inInventory])
  650.                         {
  651.                             PlayerTextDrawSetPreviewModel(playerid, inventario_index[playerid][a], Itens[itemid][item_modelo]);
  652.                             PlayerTextDrawSetPreviewRot(playerid, inventario_index[playerid][a], Itens[itemid][item_previewrot][0], Itens[itemid][item_previewrot][1], Itens[itemid][item_previewrot][2], Itens[itemid][item_previewrot][3]);
  653.  
  654.                             PlayerTextDrawHide(playerid, inventario_index[playerid][a]);
  655.                             PlayerTextDrawShow(playerid, inventario_index[playerid][a]);
  656.                         }
  657.                        
  658.                         break;
  659.                     }
  660.                 }
  661.             }
  662.             else
  663.             {
  664.                 pInventory[playerid][invSlotAmount][i] += amount;
  665.                
  666.                 if(Player[playerid][inInventory])
  667.                 {
  668.                     if(pInventory[playerid][invSelectedSlot] == i)
  669.                     {
  670.                         if(pInventory[playerid][invSlotAmount][i] > 1)
  671.                             format(String, sizeof(String), "%s: %d", Translate(Player[playerid][Language], "Quantidade", "Amount"), pInventory[playerid][invSlotAmount][i]);
  672.                         else
  673.                             String = " ";
  674.  
  675.                         PlayerTextDrawSetString(playerid, inventario_description[playerid][3], String);
  676.  
  677.                         PlayerTextDrawHide(playerid, inventario_description[playerid][3]);
  678.                         PlayerTextDrawShow(playerid, inventario_description[playerid][3]);
  679.                     }
  680.                 }
  681.             }
  682.  
  683.             sucess = true;
  684.             break;
  685.         }
  686.     }
  687.    
  688.     if(sucess)
  689.         return true;
  690.        
  691.     for(new i = 0; i < MAX_INVENTORY_SLOTS; i ++)
  692.     {
  693.         if(pInventory[playerid][invSlot][i] == 0)
  694.         {
  695.             pInventory[playerid][invSlot][i] = itemid;
  696.             pInventory[playerid][invSlotAmount][i] = amount;
  697.  
  698.             if(itemid == 6)
  699.                 pInventory[playerid][invArmourStatus][i] = armorstatus;
  700.  
  701.             if(Player[playerid][inInventory])
  702.             {
  703.                 PlayerTextDrawSetPreviewModel(playerid, inventario_index[playerid][i], Itens[itemid][item_modelo]);
  704.                 PlayerTextDrawSetPreviewRot(playerid, inventario_index[playerid][i], Itens[itemid][item_previewrot][0], Itens[itemid][item_previewrot][1], Itens[itemid][item_previewrot][2], Itens[itemid][item_previewrot][3]);
  705.  
  706.                 PlayerTextDrawHide(playerid, inventario_index[playerid][i]);
  707.                 PlayerTextDrawShow(playerid, inventario_index[playerid][i]);
  708.             }
  709.            
  710.             break;
  711.         }
  712.     }
  713.    
  714.     return true;
  715. }
  716.  
  717. //----------------------------------------------------------
  718.  
  719. stock SplitItem(playerid, slot)
  720. {
  721.     new result = pInventory[playerid][invSlotAmount][slot]/2;
  722.  
  723.     for(new i = 0; i < MAX_INVENTORY_SLOTS; i ++)
  724.         if(pInventory[playerid][invSlot][i] == 0)
  725.         {
  726.             pInventory[playerid][invSlotAmount][slot] = pInventory[playerid][invSlotAmount][slot]/2;
  727.            
  728.             pInventory[playerid][invSlot][i] = pInventory[playerid][invSlot][slot];
  729.             pInventory[playerid][invSlotAmount][i] = result;
  730.            
  731.             PlayerTextDrawHide(playerid, inventario_index[playerid][i]);
  732.             PlayerTextDrawSetPreviewModel(playerid, inventario_index[playerid][i], Itens[pInventory[playerid][invSlot][i]][item_modelo]);
  733.             PlayerTextDrawSetPreviewRot(playerid, inventario_index[playerid][i], Itens[pInventory[playerid][invSlot][i]][item_previewrot][0], Itens[pInventory[playerid][invSlot][i]][item_previewrot][1], Itens[pInventory[playerid][invSlot][i]][item_previewrot][2], Itens[pInventory[playerid][invSlot][i]][item_previewrot][3]);
  734.             PlayerTextDrawShow(playerid, inventario_index[playerid][i]);
  735.            
  736.             if(pInventory[playerid][invSlotAmount][slot] > 1)
  737.                 format(String, sizeof(String), "%s: %d", Translate(Player[playerid][Language], "Quantidade", "Amount"), pInventory[playerid][invSlotAmount][slot]);
  738.             else
  739.                 String = " ";
  740.  
  741.             PlayerTextDrawSetString(playerid, inventario_description[playerid][3], String);
  742.            
  743.             PlayerTextDrawHide(playerid, inventario_description[playerid][3]);
  744.             PlayerTextDrawShow(playerid, inventario_description[playerid][3]);
  745.             break;
  746.         }
  747. }
  748.  
  749. //----------------------------------------------------------
  750.  
  751. stock UseItem(playerid, slot, item)
  752. {
  753.     if(Itens[item][item_tipo] == ITEM_TYPE_HELMET)
  754.     {
  755.         if(pCharacter[playerid][charSlot][0] == 0)
  756.         {
  757.             AddItemCharacter(playerid, 0, item);
  758.             RemoveItemFromInventory(playerid, slot);
  759.         }
  760.         else
  761.         {
  762.             RemoveItemFromInventory(playerid, slot);
  763.             AddItem(playerid, pCharacter[playerid][charSlot][0], 1);
  764.             RemoveItemFromCharacter(playerid, 0);
  765.             AddItemCharacter(playerid, 0, item);
  766.         }
  767.     }
  768.     else if(Itens[item][item_tipo] == ITEM_TYPE_WEAPON || Itens[item][item_tipo] == ITEM_TYPE_MELEEWEAPON)
  769.     {
  770.         if(GetAmmunation(playerid) <= 0 && Itens[item][item_tipo] == ITEM_TYPE_WEAPON)
  771.         {
  772.             if(item != 4 && item != 17)
  773.             {
  774.                 pInventory[playerid][invSelectedSlot] = slot;
  775.                 return ShowMessageInventory(playerid, Translate(Player[playerid][Language],
  776.                 "~r~ERRO: ~w~Você não tem munição.", "~r~ERROR: ~w~You don't have ammunation."));
  777.             }
  778.         }
  779.        
  780.         new weapons[13][2];
  781.  
  782.         for (new i = 0; i <= 12; i++)
  783.             GetPlayerWeaponData(playerid, i, weapons[i][0], weapons[i][1]);
  784.  
  785.         new weaponid = GetWeaponIDFromModel(Itens[item][item_modelo]);
  786.         new weaponslot = GetWeaponSlot(weaponid);
  787.        
  788.         if(weapons[weaponslot][0] != 0 && weapons[weaponslot][1] > 0)
  789.         {
  790.             pInventory[playerid][invSelectedSlot] = slot;
  791.             return ShowMessageInventory(playerid, Translate(Player[playerid][Language],
  792.             "~r~ERRO: ~w~Não é possivel equipar duas armas do mesmo tipo.",
  793.             "~r~ERROR: ~w~It's not possible to equip two weapons of the same kind."));
  794.         }
  795.  
  796.         new bool:have_slot;
  797.        
  798.         for(new i = 3; i < 7; i ++)
  799.         {
  800.             if(pCharacter[playerid][charSlot][i] == item)
  801.             {
  802.                 pInventory[playerid][invSelectedSlot] = slot;
  803.                 ShowMessageInventory(playerid, Translate(Player[playerid][Language],
  804.                 "~r~ERRO: ~w~Não é possivel equipar duas armas iguais.",
  805.                 "~r~ERROR: ~w~It's not possible to equip two identical weapons."));
  806.                 have_slot = true;
  807.                 break;
  808.             }
  809.            
  810.             if(pCharacter[playerid][charSlot][i] == 0)
  811.             {
  812.                 AddItemCharacter(playerid, i, item, pInventory[playerid][invSlotAmount][slot]);
  813.                 RemoveItemFromInventory(playerid, slot);
  814.                 have_slot = true;
  815.                 break;
  816.             }
  817.         }
  818.        
  819.         if(!have_slot)
  820.         {
  821.             pInventory[playerid][invSelectedSlot] = slot;
  822.             ShowMessageInventory(playerid, Translate(Player[playerid][Language],
  823.             "~r~ERRO: ~w~Não é possivel equipar mais armas.",
  824.             "~r~ERROR: ~w~It's not possible to equip more weapons."));
  825.             return true;
  826.         }
  827.     }
  828.     else if(Itens[item][item_tipo] == ITEM_TYPE_BODY)
  829.     {
  830.         if(pCharacter[playerid][charSlot][1] == 0)
  831.         {
  832.             AddItemCharacter(playerid, 1, item, 0, pInventory[playerid][invArmourStatus][slot]);
  833.             RemoveItemFromInventory(playerid, slot);
  834.         }
  835.         else
  836.         {
  837.             RemoveItemFromInventory(playerid, slot);
  838.             AddItem(playerid, pCharacter[playerid][charSlot][1], 1);
  839.             RemoveItemFromCharacter(playerid, 1);
  840.             AddItemCharacter(playerid, 1, item);
  841.         }
  842.     }
  843.     else if(Itens[item][item_tipo] == ITEM_TYPE_BACKPACK)
  844.     {
  845.         if(pCharacter[playerid][charSlot][2] == 0)
  846.         {
  847.             AddItemCharacter(playerid, 2, item);
  848.             RemoveItemFromInventory(playerid, slot);
  849.         }
  850.         else
  851.         {
  852.             RemoveItemFromInventory(playerid, slot);
  853.             AddItem(playerid, pCharacter[playerid][charSlot][2], 1);
  854.             RemoveItemFromCharacter(playerid, 2);
  855.             AddItemCharacter(playerid, 2, item);
  856.         }
  857.        
  858.         OrganizeInventory(playerid);
  859.        
  860.         for(new i = 0; i < MAX_INVENTORY_SLOTS; i++)
  861.             PlayerTextDrawHide(playerid, inventario_index[playerid][i]);
  862.            
  863.         for(new i = 0; i < GetSlotsInventory(playerid); i++)
  864.         {
  865.             PlayerTextDrawSetPreviewModel(playerid, inventario_index[playerid][i], Itens[pInventory[playerid][invSlot][i]][item_modelo]);
  866.             PlayerTextDrawSetPreviewRot(playerid, inventario_index[playerid][i], Itens[pInventory[playerid][invSlot][i]][item_previewrot][0], Itens[pInventory[playerid][invSlot][i]][item_previewrot][1], Itens[pInventory[playerid][invSlot][i]][item_previewrot][2], Itens[pInventory[playerid][invSlot][i]][item_previewrot][3]);
  867.             PlayerTextDrawBackgroundColor(playerid, inventario_index[playerid][i], 96);
  868.  
  869.             PlayerTextDrawShow(playerid, inventario_index[playerid][i]);
  870.         }
  871.     }
  872.     else if(Itens[item][item_tipo] == ITEM_TYPE_AMMO)
  873.     {
  874.         pInventory[playerid][invSelectedSlot] = slot;
  875.         return true;
  876.     }
  877.     else if(Itens[item][item_tipo] == ITEM_TYPE_NORMAL)
  878.     {
  879.         if(item == 18) // Medic Kit
  880.         {
  881.             SetPlayerHealth(playerid, 100.0);
  882.             RemoveItemFromInventory(playerid, slot, 1);
  883.         }
  884.     }
  885.  
  886.     if(Player[playerid][inInventory])
  887.     {
  888.         for(new a = 0; a < 4; a++)
  889.             PlayerTextDrawHide(playerid, inventario_description[playerid][a]);
  890.  
  891.         TextDrawHideForPlayer(playerid, inventario_backgrounds[4]);
  892.  
  893.         TextDrawHideForPlayer(playerid, inventario_usar);
  894.         TextDrawHideForPlayer(playerid, inventario_split[0]);
  895.         TextDrawHideForPlayer(playerid, inventario_split[1]);
  896.         TextDrawHideForPlayer(playerid, inventario_drop[0]);
  897.         TextDrawHideForPlayer(playerid, inventario_drop[1]);
  898.         PlayerTextDrawHide(playerid, inventario_textos[playerid][9]);
  899.     }
  900.    
  901.     return true;
  902. }
  903.  
  904. //----------------------------------------------------------
  905.  
  906. stock AddItemCharacter(playerid, slot, itemid, quantidade = 0, Float:armourstatus = 0.0)
  907. {
  908.     if(itemid == 1)
  909.     {
  910.         switch(GetPlayerSkin(playerid))
  911.         {
  912.             #define HelmetAttach{%0,%1,%2,%3,%4,%5} SetPlayerAttachedObject(playerid, 0, 18645, 2, (%0), (%1), (%2), (%3), (%4), (%5));
  913.             case 0, 65, 74, 149, 208, 273:  HelmetAttach{0.070000, 0.000000, 0.000000, 88.000000, 75.000000, 0.000000}
  914.             case 1..6, 8, 14, 16, 22, 27, 29, 33, 41..49, 82..84, 86, 87, 119, 289: HelmetAttach{0.070000, 0.000000, 0.000000, 88.000000, 77.000000, 0.000000}
  915.             case 7, 10: HelmetAttach{0.090000, 0.019999, 0.000000, 88.000000, 90.000000, 0.000000}
  916.             case 9: HelmetAttach{0.059999, 0.019999, 0.000000, 88.000000, 90.000000, 0.000000}
  917.             case 11..13: HelmetAttach{0.070000, 0.019999, 0.000000, 88.000000, 90.000000, 0.000000}
  918.             case 15: HelmetAttach{0.059999, 0.000000, 0.000000, 88.000000, 82.000000, 0.000000}
  919.             case 17..21: HelmetAttach{0.059999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000}
  920.             case 23..26, 28, 30..32, 34..39, 57, 58, 98, 99, 104..118, 120..131: HelmetAttach{0.079999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000}
  921.             case 40: HelmetAttach{0.050000, 0.009999, 0.000000, 88.000000, 82.000000, 0.000000}
  922.             case 50, 100..103, 148, 150..189, 222: HelmetAttach{0.070000, 0.009999, 0.000000, 88.000000, 82.000000, 0.000000}
  923.             case 51..54: HelmetAttach{0.100000, 0.009999, 0.000000, 88.000000, 82.000000, 0.000000}
  924.             case 55, 56, 63, 64, 66..73, 75, 76, 78..81, 133..143, 147, 190..207, 209..219, 221, 247..272, 274..288, 290..293: HelmetAttach{0.070000, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000}
  925.             case 59..62: HelmetAttach{0.079999, 0.029999, 0.000000, 88.000000, 82.000000, 0.000000}
  926.             case 77: HelmetAttach{0.059999, 0.019999, 0.000000, 87.000000, 82.000000, 0.000000}
  927.             case 85, 88, 89: HelmetAttach{0.070000, 0.039999, 0.000000, 88.000000, 82.000000, 0.000000}
  928.             case 90..97: HelmetAttach{0.050000, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000}
  929.             case 132: HelmetAttach{0.000000, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000}
  930.             case 144..146: HelmetAttach{0.090000, 0.000000, 0.000000, 88.000000, 82.000000, 0.000000}
  931.             case 220: HelmetAttach{0.029999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000}
  932.             case 223, 246: HelmetAttach{0.070000, 0.050000, 0.000000, 88.000000, 82.000000, 0.000000}
  933.             case 224..245: HelmetAttach{0.070000, 0.029999, 0.000000, 88.000000, 82.000000, 0.000000}
  934.             case 294: HelmetAttach{0.070000, 0.019999, 0.000000, 91.000000, 84.000000, 0.000000}
  935.             case 295: HelmetAttach{0.050000, 0.019998, 0.000000, 86.000000, 82.000000, 0.000000}
  936.             case 296..298: HelmetAttach{0.064999, 0.009999, 0.000000, 88.000000, 82.000000, 0.000000}
  937.             case 299..306: HelmetAttach{0.064998, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000}
  938.         }
  939.     }
  940.     else if(Itens[itemid][item_tipo] == ITEM_TYPE_WEAPON || Itens[itemid][item_tipo] == ITEM_TYPE_MELEEWEAPON)
  941.     {
  942.         new modelid = Itens[itemid][item_modelo];
  943.        
  944.         if(itemid == 5 || itemid == 17)
  945.             GivePlayerWeapon(playerid, GetWeaponIDFromModel(modelid), quantidade);
  946.         else
  947.             GivePlayerWeapon(playerid, GetWeaponIDFromModel(modelid), GetAmmunation(playerid));
  948.     }
  949.     else if(itemid == 6)
  950.     {
  951.         SetPlayerArmour(playerid, armourstatus);
  952.         pCharacter[playerid][charArmourStatus] = armourstatus;
  953.  
  954.         switch(GetPlayerSkin(playerid))
  955.         {
  956.             case 292:
  957.                 SetPlayerAttachedObject(playerid, 1, 19142, 1, 0.103999,0.034999,0.001000,0.000000,0.000000,0.000000,1.000000,1.000000,1.000000);
  958.         }
  959.     }
  960.     else if(Itens[itemid][item_tipo] == ITEM_TYPE_BACKPACK)
  961.     {
  962.         switch(GetPlayerSkin(playerid))
  963.         {
  964.             case 292:
  965.                 SetPlayerAttachedObject(playerid, 2, 3026,1,-0.129000,-0.078999,-0.003999,0.000000,0.000000,0.000000,1.000000,1.000000,1.000000);
  966.         }
  967.     }
  968.    
  969.     pCharacter[playerid][charSlot][slot] = itemid;
  970.    
  971.     PlayerPlaySound(playerid,1052,0.0,0.0,0.0);
  972.  
  973.     if(Player[playerid][inInventory])
  974.     {
  975.         PlayerTextDrawSetPreviewModel(playerid, inventario_personagemindex[playerid][slot], Itens[itemid][item_modelo]);
  976.         PlayerTextDrawSetPreviewRot(playerid, inventario_personagemindex[playerid][slot], Itens[itemid][item_previewrot][0], Itens[itemid][item_previewrot][1], Itens[itemid][item_previewrot][2], Itens[itemid][item_previewrot][3]);
  977.  
  978.         PlayerTextDrawHide(playerid, inventario_personagemindex[playerid][slot]);
  979.         PlayerTextDrawShow(playerid, inventario_personagemindex[playerid][slot]);
  980.     }
  981. }
  982. //----------------------------------------------------------
  983.  
  984. stock RemoveItemFromInventory(playerid, slot, amount = 0)
  985. {
  986.  
  987.     if(amount == 0)
  988.     {
  989.         pInventory[playerid][invSlot][slot] = 0;
  990.         pInventory[playerid][invSlotAmount][slot] = 0;
  991.     }
  992.     else
  993.     {
  994.         pInventory[playerid][invSlotAmount][slot] -= amount;
  995.        
  996.         if(pInventory[playerid][invSlotAmount][slot] == 0)
  997.             pInventory[playerid][invSlot][slot] = 0;
  998.  
  999.     }
  1000.    
  1001.     if(Player[playerid][inInventory])
  1002.     {
  1003.         PlayerTextDrawSetPreviewModel(playerid, inventario_index[playerid][slot], Itens[pInventory[playerid][invSlot][slot]][item_modelo]);
  1004.         PlayerTextDrawSetPreviewRot(playerid, inventario_index[playerid][slot], Itens[pInventory[playerid][invSlot][slot]][item_previewrot][0], Itens[pInventory[playerid][invSlot][slot]][item_previewrot][1], Itens[pInventory[playerid][invSlot][slot]][item_previewrot][2], Itens[pInventory[playerid][invSlot][slot]][item_previewrot][3]);
  1005.         PlayerTextDrawBackgroundColor(playerid, inventario_index[playerid][slot], 96);
  1006.    
  1007.         PlayerTextDrawHide(playerid, inventario_index[playerid][slot]);
  1008.         PlayerTextDrawShow(playerid, inventario_index[playerid][slot]);
  1009.     }
  1010. }
  1011.  
  1012. //----------------------------------------------------------
  1013.  
  1014. stock RemoveItemFromCharacter(playerid, slot)
  1015. {
  1016.     if(Itens[pCharacter[playerid][charSlot][slot]][item_tipo] == ITEM_TYPE_WEAPON)
  1017.     {
  1018.         new modelid = Itens[pCharacter[playerid][charSlot][slot]][item_modelo];
  1019.         SetPlayerAmmo(playerid, GetWeaponIDFromModel(modelid), 0);
  1020.        
  1021.         new itemid = Itens[pCharacter[playerid][charSlot][slot]][item_id];
  1022.  
  1023.         pCharacter[playerid][charSlot][slot] = 0;
  1024.        
  1025.         if(itemid == 3 || itemid == 9)
  1026.             if(IsPlayerAttachedObjectSlotUsed(playerid, 3))
  1027.                 RemovePlayerAttachedObject(playerid, 3);
  1028.                    
  1029.         if(itemid == 10)
  1030.             if(IsPlayerAttachedObjectSlotUsed(playerid, 4))
  1031.                 RemovePlayerAttachedObject(playerid, 4);
  1032.                
  1033.         if(itemid == 2)
  1034.             if(IsPlayerAttachedObjectSlotUsed(playerid, 5))
  1035.                 RemovePlayerAttachedObject(playerid, 5);
  1036.        
  1037.     }
  1038.     else if(Itens[pCharacter[playerid][charSlot][slot]][item_tipo] == ITEM_TYPE_MELEEWEAPON)
  1039.     {
  1040.         new modelid = Itens[pCharacter[playerid][charSlot][slot]][item_modelo];
  1041.         RemovePlayerWeapon(playerid, GetWeaponIDFromModel(modelid));
  1042.        
  1043.         if(IsPlayerAttachedObjectSlotUsed(playerid, 6))
  1044.             RemovePlayerAttachedObject(playerid, 6);
  1045.     }
  1046.  
  1047.     if(slot == 0) // Helmet
  1048.     {
  1049.         RemovePlayerAttachedObject(playerid, 0);
  1050.     }
  1051.     else if(slot == 1) // Armour
  1052.     {
  1053.         RemovePlayerAttachedObject(playerid, 1);
  1054.         SetPlayerArmour(playerid, 0);
  1055.         pCharacter[playerid][charArmourStatus] = 0.0;
  1056.     }
  1057.     else if(slot == 2) // Backpack
  1058.     {
  1059.         RemovePlayerAttachedObject(playerid, 2);
  1060.         pCharacter[playerid][charSlot][slot] = 0;
  1061.        
  1062.         for(new i = 0; i < MAX_INVENTORY_SLOTS; i++)
  1063.             PlayerTextDrawHide(playerid, inventario_index[playerid][i]);
  1064.  
  1065.         for(new i = 0; i < GetSlotsInventory(playerid); i++)
  1066.         {
  1067.             PlayerTextDrawSetPreviewModel(playerid, inventario_index[playerid][i], Itens[pInventory[playerid][invSlot][i]][item_modelo]);
  1068.             PlayerTextDrawSetPreviewRot(playerid, inventario_index[playerid][i], Itens[pInventory[playerid][invSlot][i]][item_previewrot][0], Itens[pInventory[playerid][invSlot][i]][item_previewrot][1], Itens[pInventory[playerid][invSlot][i]][item_previewrot][2], Itens[pInventory[playerid][invSlot][i]][item_previewrot][3]);
  1069.             PlayerTextDrawBackgroundColor(playerid, inventario_index[playerid][i], 96);
  1070.  
  1071.             PlayerTextDrawShow(playerid, inventario_index[playerid][i]);
  1072.         }
  1073.     }
  1074.    
  1075.     pCharacter[playerid][charSlot][slot] = 0;
  1076.     PlayerPlaySound(playerid,1053,0.0,0.0,0.0);
  1077.  
  1078.     if(Player[playerid][inInventory])
  1079.     {
  1080.         PlayerTextDrawSetPreviewModel(playerid, inventario_personagemindex[playerid][slot], Itens[0][item_modelo]);
  1081.         PlayerTextDrawSetPreviewRot(playerid, inventario_personagemindex[playerid][slot], Itens[0][item_previewrot][0], Itens[0][item_previewrot][1], Itens[0][item_previewrot][2], Itens[0][item_previewrot][3]);
  1082.         PlayerTextDrawBackgroundColor(playerid, inventario_personagemindex[playerid][slot], 96);
  1083.  
  1084.         PlayerTextDrawHide(playerid, inventario_personagemindex[playerid][slot]);
  1085.         PlayerTextDrawShow(playerid, inventario_personagemindex[playerid][slot]);
  1086.  
  1087.         PlayerTextDrawHide(playerid, inventario_textos[playerid][10]);
  1088.         TextDrawHideForPlayer(playerid, inventario_remover);
  1089.     }
  1090. }
  1091. //----------------------------------------------------------
  1092.  
  1093. stock DropItem(Float:x, Float:y, Float:z, itemid, amount, Float:armourstatus = 0.0)
  1094. {
  1095.     ItensWorld[LastItemID][world_timer] = TIMER_ITEM_WORLD;
  1096.     ItensWorld[LastItemID][world_itemid] = itemid;
  1097.     ItensWorld[LastItemID][world_model] = Itens[itemid][item_modelo];
  1098.     ItensWorld[LastItemID][world_amount] = amount;
  1099.     ItensWorld[LastItemID][world_position][0] = x;
  1100.     ItensWorld[LastItemID][world_position][1] = y;
  1101.     ItensWorld[LastItemID][world_position][2] = z;
  1102.  
  1103.     if(itemid == 6)
  1104.         ItensWorld[LastItemID][world_armourstatus] = armourstatus;
  1105.    
  1106.     ItensWorld[LastItemID][world_object] = CreateObject(ItensWorld[LastItemID][world_model], x, y, z-0.90, -90,0,0);
  1107.  
  1108.     if(amount > 1)
  1109.         format(String, sizeof(String), "%s (%d)", Itens[itemid][item_nome], amount);
  1110.     else
  1111.         format(String, sizeof(String), "%s", Itens[itemid][item_nome]);
  1112.        
  1113.     ItensWorld[LastItemID][world_3dtext] = Create3DTextLabel(String, -1, x, y,z-0.90, 5.0, 0, 0);
  1114.    
  1115.     ItensWorld[LastItemID][world_active] = true;
  1116.  
  1117.     if(LastItemID == MAX_ITENS_WORLD-1)
  1118.         LastItemID = 0;
  1119.     else
  1120.         LastItemID++;
  1121. }
  1122.  
  1123. //----------------------------------------------------------
  1124.  
  1125. stock DeleteItemWorld(worlditemid)
  1126. {
  1127.     ItensWorld[worlditemid][world_active] = false;
  1128.     DestroyObject(ItensWorld[worlditemid][world_object]);
  1129.     Delete3DTextLabel(ItensWorld[worlditemid][world_3dtext]);
  1130. }
  1131.  
  1132. //----------------------------------------------------------
  1133.  
  1134. stock IsItemInInventory(playerid, itemid, amount)
  1135. {
  1136.     new bool:sucess = false;
  1137.    
  1138.     for(new i = 0; i < GetSlotsInventory(playerid); i ++)
  1139.          if(pInventory[playerid][invSlot][i] == itemid)
  1140.             if(pInventory[playerid][invSlotAmount][i] >= amount)
  1141.                 sucess = true;
  1142.                
  1143.     if(!sucess)
  1144.         return false;
  1145.     else
  1146.         return true;
  1147. }
  1148.  
  1149. //----------------------------------------------------------
  1150.  
  1151. stock GetSlotsFree(playerid)
  1152. {
  1153.     new count = 0;
  1154.    
  1155.     for(new i = 0; i < GetSlotsInventory(playerid); i ++)
  1156.         if(pInventory[playerid][invSlot][i] == 0)
  1157.             count++;
  1158.            
  1159.     return count;
  1160. }
  1161.  
  1162. //----------------------------------------------------------
  1163.  
  1164. stock GetSlotsInUse(playerid)
  1165. {
  1166.     new count = 0;
  1167.    
  1168.     for(new i = 0; i < GetSlotsInventory(playerid); i ++)
  1169.         if(pInventory[playerid][invSlot][i] != 0)
  1170.             count++;
  1171.            
  1172.     return count;
  1173. }
  1174.  
  1175. //----------------------------------------------------------
  1176.  
  1177. stock IsInventoryFull(playerid)
  1178. {
  1179.     for(new i = 0; i < GetSlotsInventory(playerid); i ++)
  1180.         if(pInventory[playerid][invSlot][i] == 0)
  1181.             return false;
  1182.  
  1183.     return true;
  1184. }
  1185.  
  1186. //----------------------------------------------------------
  1187.  
  1188. stock GetSlotsInventory(playerid)
  1189. {
  1190.     new slots;
  1191.  
  1192.     if(pCharacter[playerid][charSlot][2] == 0)
  1193.         slots = 5;
  1194.     else if(pCharacter[playerid][charSlot][2] == 7)
  1195.         slots = 10;
  1196.     else if(pCharacter[playerid][charSlot][2] == 8)
  1197.         slots = 15;
  1198.        
  1199.     return slots;
  1200. }
  1201.  
  1202. //----------------------------------------------------------
  1203.  
  1204. stock GetAmmunation(playerid)
  1205. {
  1206.     new total;
  1207.  
  1208.     for(new i = 0; i < GetSlotsInventory(playerid); i ++)
  1209.         if(pInventory[playerid][invSlot][i] == 4)
  1210.             total += pInventory[playerid][invSlotAmount][i];
  1211.  
  1212.     return total;
  1213. }
  1214.  
  1215. //----------------------------------------------------------
  1216.  
  1217. stock GetAmmunationSlot(playerid)
  1218. {
  1219.     new slot = -1;
  1220.    
  1221.     for(new i = 0; i < GetSlotsInventory(playerid); i ++)
  1222.         if(pInventory[playerid][invSlot][i] == 4)
  1223.         {
  1224.             slot = i;
  1225.             break;
  1226.         }
  1227.        
  1228.     return slot;
  1229. }
  1230.  
  1231. //----------------------------------------------------------
  1232.  
  1233. stock OrganizeInventory(playerid)
  1234. {
  1235.     for(new i = 0; i < MAX_INVENTORY_SLOTS; i++)
  1236.         if(pInventory[playerid][invSlot][i] != 0)
  1237.             for(new a = 0; a < MAX_INVENTORY_SLOTS; a++)
  1238.                 if(pInventory[playerid][invSlot][a] == 0)
  1239.                 {
  1240.                     pInventory[playerid][invSlot][a] = pInventory[playerid][invSlot][i];
  1241.                     pInventory[playerid][invSlotAmount][a] = pInventory[playerid][invSlotAmount][i];
  1242.                     pInventory[playerid][invArmourStatus][a] = pInventory[playerid][invArmourStatus][i];
  1243.                     pInventory[playerid][invSlot][i] = 0;
  1244.                     pInventory[playerid][invSlotAmount][i] = 0;
  1245.                     pInventory[playerid][invArmourStatus][i] = 0;
  1246.                 }
  1247. }
  1248.  
  1249. //----------------------------------------------------------
  1250.  
  1251. stock GetWeaponSlot(weaponid)
  1252. {
  1253.     new slot;
  1254.    
  1255.     switch(weaponid)
  1256.     {
  1257.         case 0,1: slot = 0;
  1258.         case 2 .. 9: slot = 1;
  1259.         case 10 .. 15: slot = 10;
  1260.         case 16 .. 18, 39: slot = 8;
  1261.         case 22 .. 24: slot =2;
  1262.         case 25 .. 27: slot = 3;
  1263.         case 28, 29, 32: slot = 4;
  1264.         case 30, 31: slot = 5;
  1265.         case 33, 34: slot = 6;
  1266.         case 35 .. 38: slot = 7;
  1267.         case 40: slot = 12;
  1268.         case 41 .. 43: slot = 9;
  1269.         case 44 .. 46: slot = 11;
  1270.     }
  1271.    
  1272.     return slot;
  1273. }
  1274.  
  1275. //----------------------------------------------------------
  1276.  
  1277. stock ShowInventory(playerid)
  1278. {
  1279.     Player[playerid][inInventory] = true;
  1280.     SelectTextDraw(playerid, 0xFFFFFFFF);
  1281.  
  1282.     // Globais
  1283.  
  1284.     TextDrawShowForPlayer(playerid, inventario_close[0]);
  1285.     TextDrawShowForPlayer(playerid, inventario_close[1]);
  1286.    
  1287.     for(new i = 0; i < 5; i++)
  1288.         if(i != 4)
  1289.             TextDrawShowForPlayer(playerid, inventario_backgrounds[i]);
  1290.  
  1291.     // Player
  1292.  
  1293.     for(new i = 0; i < GetSlotsInventory(playerid); i++)
  1294.     {
  1295.         PlayerTextDrawSetPreviewModel(playerid, inventario_index[playerid][i], Itens[pInventory[playerid][invSlot][i]][item_modelo]);
  1296.         PlayerTextDrawSetPreviewRot(playerid, inventario_index[playerid][i], Itens[pInventory[playerid][invSlot][i]][item_previewrot][0], Itens[pInventory[playerid][invSlot][i]][item_previewrot][1], Itens[pInventory[playerid][invSlot][i]][item_previewrot][2], Itens[pInventory[playerid][invSlot][i]][item_previewrot][3]);
  1297.         PlayerTextDrawBackgroundColor(playerid, inventario_index[playerid][i], 96);
  1298.        
  1299.         PlayerTextDrawShow(playerid, inventario_index[playerid][i]);
  1300.     }
  1301.  
  1302.     PlayerTextDrawSetString(playerid, inventario_textos[playerid][0], Translate(Player[playerid][Language], "Personagem", "Character"));
  1303.     PlayerTextDrawSetString(playerid, inventario_textos[playerid][1], Translate(Player[playerid][Language], ConvertToGameText("Seu Inventário"), "Your Inventory"));
  1304.     PlayerTextDrawSetString(playerid, inventario_textos[playerid][2], Translate(Player[playerid][Language], ConvertToGameText("Cabeça"), "Head"));
  1305.     PlayerTextDrawSetString(playerid, inventario_textos[playerid][3], Translate(Player[playerid][Language], "Mochila", "Backpack"));
  1306.     PlayerTextDrawSetString(playerid, inventario_textos[playerid][4], Translate(Player[playerid][Language], "Corpo", "Body"));
  1307.     PlayerTextDrawSetString(playerid, inventario_textos[playerid][5], Translate(Player[playerid][Language], "Arma", "Weapon"));
  1308.     PlayerTextDrawSetString(playerid, inventario_textos[playerid][6], Translate(Player[playerid][Language], "Arma", "Weapon"));
  1309.     PlayerTextDrawSetString(playerid, inventario_textos[playerid][7], Translate(Player[playerid][Language], "Arma", "Weapon"));
  1310.     PlayerTextDrawSetString(playerid, inventario_textos[playerid][8], Translate(Player[playerid][Language], "Arma", "Weapon"));
  1311.     PlayerTextDrawSetString(playerid, inventario_textos[playerid][9], Translate(Player[playerid][Language], "Usar", "Use"));
  1312.  
  1313.     for(new i = 0; i < 11; i++)
  1314.         if(i != 10 && i != 9)
  1315.             PlayerTextDrawShow(playerid, inventario_textos[playerid][i]);
  1316.  
  1317.     for(new i = 0; i < 7; i++)
  1318.     {
  1319.         new char_slot = pCharacter[playerid][charSlot][i];
  1320.  
  1321.         PlayerTextDrawSetPreviewModel(playerid, inventario_personagemindex[playerid][i], Itens[char_slot][item_modelo]);
  1322.         PlayerTextDrawSetPreviewRot(playerid, inventario_personagemindex[playerid][i], Itens[char_slot][item_previewrot][0], Itens[char_slot][item_previewrot][1], Itens[char_slot][item_previewrot][2], Itens[char_slot][item_previewrot][3]);
  1323.         PlayerTextDrawBackgroundColor(playerid, inventario_personagemindex[playerid][i], 96);
  1324.        
  1325.         PlayerTextDrawShow(playerid, inventario_personagemindex[playerid][i]);
  1326.     }
  1327.  
  1328.     PlayerTextDrawSetPreviewModel(playerid, inventario_skin[playerid], GetPlayerSkin(playerid));
  1329.     PlayerTextDrawShow(playerid, inventario_skin[playerid]);
  1330. }
  1331.  
  1332. //----------------------------------------------------------
  1333.  
  1334. stock HideInventory(playerid)
  1335. {
  1336.     TextDrawHideForPlayer(playerid, inventario_usar);
  1337.     TextDrawHideForPlayer(playerid, inventario_split[0]);
  1338.     TextDrawHideForPlayer(playerid, inventario_split[1]);
  1339.     TextDrawHideForPlayer(playerid, inventario_drop[0]);
  1340.     TextDrawHideForPlayer(playerid, inventario_drop[1]);
  1341.     TextDrawHideForPlayer(playerid, inventario_close[0]);
  1342.     TextDrawHideForPlayer(playerid, inventario_close[1]);
  1343.    
  1344.     for(new i = 0; i < 5; i++)
  1345.         if(i != 4)
  1346.             TextDrawHideForPlayer(playerid, inventario_backgrounds[i]);
  1347.            
  1348.     for(new i = 0; i < MAX_INVENTORY_SLOTS; i++)
  1349.         PlayerTextDrawHide(playerid, inventario_index[playerid][i]);
  1350.  
  1351.     for(new i = 0; i < 11; i++)
  1352.         PlayerTextDrawHide(playerid, inventario_textos[playerid][i]);
  1353.  
  1354.     for(new i = 0; i < 7; i++)
  1355.         PlayerTextDrawHide(playerid, inventario_personagemindex[playerid][i]);
  1356.  
  1357.     PlayerTextDrawHide(playerid, inventario_skin[playerid]);
  1358.     TextDrawHideForPlayer(playerid, inventario_remover);
  1359.    
  1360.     TextDrawHideForPlayer(playerid, inventario_backgrounds[4]);
  1361.  
  1362.     for(new a = 0; a < 4; a++)
  1363.         PlayerTextDrawHide(playerid, inventario_description[playerid][a]);
  1364.        
  1365.     pInventory[playerid][invSelectedSlot] = -1;
  1366.     pCharacter[playerid][charSelectedSlot] = -1;
  1367.     Player[playerid][inInventory] = false;
  1368.     CancelSelectTextDraw(playerid);
  1369. }
  1370.  
  1371. //----------------------------------------------------------
  1372.  
  1373. stock GetWeaponIDFromModel(modelid)
  1374. {
  1375.     new idweapon;
  1376.    
  1377.     switch(modelid)
  1378.     {
  1379.         case 331: idweapon = 1; // Brass Knuckles
  1380.         case 333: idweapon = 2; // Golf Club
  1381.         case 334: idweapon = 3; // Nightstick
  1382.         case 335: idweapon = 4; // Knife
  1383.         case 336: idweapon = 5; // Baseball Bat
  1384.         case 337: idweapon = 6; // Shovel
  1385.         case 338: idweapon = 7; // Pool Cue
  1386.         case 339: idweapon = 8; // Katana
  1387.         case 341: idweapon = 9; // Chainsaw
  1388.         case 321: idweapon = 10; // Double-ended Dildo
  1389.         case 325: idweapon = 14; // Flowers
  1390.         case 326: idweapon = 15; // Cane
  1391.         case 342: idweapon = 16; // Grenade
  1392.         case 343: idweapon = 17; // Tear Gas
  1393.         case 344: idweapon = 18; // Molotov Cocktail
  1394.         case 346: idweapon = 22; // 9mm
  1395.         case 347: idweapon = 23; // Silenced 9mm
  1396.         case 348: idweapon = 24; // Desert Eagle
  1397.         case 349: idweapon = 25; // Shotgun
  1398.         case 350: idweapon = 26; // Sawnoff
  1399.         case 351: idweapon = 27; // Combat Shotgun
  1400.         case 352: idweapon = 28; // Micro SMG/Uzi
  1401.         case 353: idweapon = 29; // MP5
  1402.         case 355: idweapon = 30; // AK-47
  1403.         case 356: idweapon = 31; // M4
  1404.         case 372: idweapon = 32; // Tec-9
  1405.         case 357: idweapon = 33; // Country Rifle
  1406.         case 358: idweapon = 34; // Sniper Rifle
  1407.         case 359: idweapon = 35; // RPG
  1408.         case 360: idweapon = 36; // HS Rocket
  1409.         case 361: idweapon = 37; // Flamethrower
  1410.         case 362: idweapon = 38; // Minigun
  1411.         case 363: idweapon = 39;// Satchel Charge + Detonator
  1412.         case 365: idweapon = 41; // Spraycan
  1413.         case 366: idweapon = 42; // Fire Extinguisher
  1414.     }
  1415.    
  1416.     return idweapon;
  1417. }
  1418.  
  1419. //----------------------------------------------------------
  1420.  
  1421. stock RemovePlayerWeapon(playerid, weaponid)
  1422. {
  1423.     new plyWeapons[12];
  1424.     new plyAmmo[12];
  1425.  
  1426.     for(new slot = 0; slot != 12; slot++)
  1427.     {
  1428.         new wep, ammo;
  1429.         GetPlayerWeaponData(playerid, slot, wep, ammo);
  1430.  
  1431.         if(wep != weaponid)
  1432.         {
  1433.             GetPlayerWeaponData(playerid, slot, plyWeapons[slot], plyAmmo[slot]);
  1434.         }
  1435.     }
  1436.  
  1437.     ResetPlayerWeapons(playerid);
  1438.     for(new slot = 0; slot != 12; slot++)
  1439.     {
  1440.         GivePlayerWeapon(playerid, plyWeapons[slot], plyAmmo[slot]);
  1441.     }
  1442. }
  1443.  
  1444. //----------------------------------------------------------
  1445.  
  1446. public Float:GetPlayerArmourEx(playerid)
  1447. {
  1448.     new Float:pColete;
  1449.     GetPlayerArmour(playerid, pColete);
  1450.     return Float:pColete;
  1451. }
  1452. //----------------------------------------------------------
  1453.  
  1454. stock ShowMessageInventory(playerid, string[], time = 5000)
  1455. {
  1456.     if (Player[playerid][MessageInventory])
  1457.     {
  1458.         PlayerTextDrawHide(playerid, inventario_mensagem[playerid]);
  1459.         KillTimer(Player[playerid][MessageInventoryTimer]);
  1460.     }
  1461.  
  1462.     PlayerTextDrawSetString(playerid, inventario_mensagem[playerid], ConvertToGameText(string));
  1463.     PlayerTextDrawShow(playerid, inventario_mensagem[playerid]);
  1464.  
  1465.     Player[playerid][MessageInventory] = true;
  1466.     Player[playerid][MessageInventoryTimer] = SetTimerEx("HideMessageInventory", time, false, "d", playerid);
  1467.     return true;
  1468. }
  1469.  
  1470. //----------------------------------------------------------
  1471.  
  1472. public HideMessageInventory(playerid)
  1473. {
  1474.     if (!Player[playerid][MessageInventory])
  1475.         return 0;
  1476.  
  1477.     Player[playerid][MessageInventory] = false;
  1478.     return PlayerTextDrawHide(playerid, inventario_mensagem[playerid]);
  1479. }
  1480.  
  1481. //----------------------------------------------------------
  1482.  
  1483. stock ConvertToGameText(in[])
  1484. {
  1485.     new string[256];
  1486.     for(new i = 0; in[i]; ++i)
  1487.     {
  1488.         string[i] = in[i];
  1489.         switch(string[i])
  1490.         {
  1491.             case 0xC0 .. 0xC3: string[i] -= 0x40;
  1492.             case 0xC7 .. 0xC9: string[i] -= 0x42;
  1493.             case 0xD2 .. 0xD5: string[i] -= 0x44;
  1494.             case 0xD9 .. 0xDC: string[i] -= 0x47;
  1495.             case 0xE0 .. 0xE3: string[i] -= 0x49;
  1496.             case 0xE7 .. 0xEF: string[i] -= 0x4B;
  1497.             case 0xF2 .. 0xF5: string[i] -= 0x4D;
  1498.             case 0xF9 .. 0xFC: string[i] -= 0x50;
  1499.             case 0xC4, 0xE4: string[i] = 0x83;
  1500.             case 0xC6, 0xE6: string[i] = 0x84;
  1501.             case 0xD6, 0xF6: string[i] = 0x91;
  1502.             case 0xD1, 0xF1: string[i] = 0xEC;
  1503.             case 0xDF: string[i] = 0x96;
  1504.             case 0xBF: string[i] = 0xAF;
  1505.         }
  1506.     }
  1507.     return string;
  1508. }
  1509.  
  1510. //----------------------------------------------------------
  1511.  
  1512. stock ResetVariables(playerid)
  1513. {
  1514.     // Inventory
  1515.  
  1516.     for(new i = 0; i < MAX_INVENTORY_SLOTS; i ++)
  1517.     {
  1518.         pInventory[playerid][invSlot][i] = 0;
  1519.         pInventory[playerid][invSlotAmount][i] = 0;
  1520.         pInventory[playerid][invArmourStatus][i] = 0;
  1521.     }
  1522.  
  1523.     pInventory[playerid][invSelectedSlot] = 0;
  1524.  
  1525.     // Character
  1526.  
  1527.     for(new i = 0; i < 7; i ++)
  1528.         pCharacter[playerid][charSlot][i] = 0;
  1529.  
  1530.     pCharacter[playerid][charArmourStatus] = 0;
  1531.     pCharacter[playerid][charSelectedSlot] = 0;
  1532.  
  1533.  
  1534.     // Player
  1535.  
  1536.     for(new enum_Player:i; i < enum_Player; ++i)
  1537.         Player[playerid][i] = 0;
  1538. }
  1539.  
  1540. //----------------------------------------------------------
  1541.  
  1542. stock Translate(language, text_PT[], text_EN[])
  1543. {
  1544.     new string[256];
  1545.  
  1546.     if(language == 1)
  1547.         format(string, sizeof(string), text_PT);
  1548.     else if(language == 2)
  1549.         format(string, sizeof(string), text_EN);
  1550.  
  1551.     return string;
  1552. }
  1553.  
  1554. //----------------------------------------------------------
  1555.  
  1556.  
  1557. CMD:additem(playerid, params[])
  1558. {
  1559.     new
  1560.         id, item, amount;
  1561.  
  1562.     if(sscanf(params, "uii", id, item, amount))
  1563.         return SendClientMessage(playerid, -1, "/additem <id/nick> <id do item> <quantidade>");
  1564.  
  1565.     AddItem(id, item, amount);
  1566.    
  1567.     if(IsItemInInventory(playerid, item, amount))
  1568.         return false;
  1569.        
  1570.     format(String, sizeof(String), "additem (%d) (%d) (%d)", id, item, amount);
  1571.     SendClientMessage(playerid, -1, String);
  1572.     return true;
  1573. }
  1574.  
  1575. //----------------------------------------------------------
  1576.  
  1577. stock LoadTextDraws()
  1578. {
  1579.     inventario_backgrounds[0] = TextDrawCreate(63.900207, 120.000030, "box");
  1580.     TextDrawLetterSize(inventario_backgrounds[0], 0.000000, 28.450004);
  1581.     TextDrawTextSize(inventario_backgrounds[0], 308.250335, 0.000000);
  1582.     TextDrawAlignment(inventario_backgrounds[0], 1);
  1583.     TextDrawColor(inventario_backgrounds[0], -1);
  1584.     TextDrawUseBox(inventario_backgrounds[0], 1);
  1585.     TextDrawBoxColor(inventario_backgrounds[0], 128);
  1586.     TextDrawSetShadow(inventario_backgrounds[0], 0);
  1587.     TextDrawSetOutline(inventario_backgrounds[0], 0);
  1588.     TextDrawBackgroundColor(inventario_backgrounds[0], 255);
  1589.     TextDrawFont(inventario_backgrounds[0], 2);
  1590.     TextDrawSetProportional(inventario_backgrounds[0], 1);
  1591.     TextDrawSetShadow(inventario_backgrounds[0], 0);
  1592.  
  1593.     inventario_backgrounds[1] = TextDrawCreate(313.099792, 120.000030, "box");
  1594.     TextDrawLetterSize(inventario_backgrounds[1], 0.000000, 28.450004);
  1595.     TextDrawTextSize(inventario_backgrounds[1], 578.247741, 0.000000);
  1596.     TextDrawAlignment(inventario_backgrounds[1], 1);
  1597.     TextDrawColor(inventario_backgrounds[1], -1);
  1598.     TextDrawUseBox(inventario_backgrounds[1], 1);
  1599.     TextDrawBoxColor(inventario_backgrounds[1], 128);
  1600.     TextDrawSetShadow(inventario_backgrounds[1], 0);
  1601.     TextDrawSetOutline(inventario_backgrounds[1], 0);
  1602.     TextDrawBackgroundColor(inventario_backgrounds[1], 255);
  1603.     TextDrawFont(inventario_backgrounds[1], 1);
  1604.     TextDrawSetProportional(inventario_backgrounds[1], 1);
  1605.     TextDrawSetShadow(inventario_backgrounds[1], 0);
  1606.  
  1607.     inventario_backgrounds[2] = TextDrawCreate(66.100158, 122.233367, "box");
  1608.     TextDrawLetterSize(inventario_backgrounds[2], 0.000000, 1.200001);
  1609.     TextDrawTextSize(inventario_backgrounds[2], 306.499542, 0.000000);
  1610.     TextDrawAlignment(inventario_backgrounds[2], 1);
  1611.     TextDrawColor(inventario_backgrounds[2], -1);
  1612.     TextDrawUseBox(inventario_backgrounds[2], 1);
  1613.     TextDrawBoxColor(inventario_backgrounds[2], 128);
  1614.     TextDrawSetShadow(inventario_backgrounds[2], 0);
  1615.     TextDrawSetOutline(inventario_backgrounds[2], 0);
  1616.     TextDrawBackgroundColor(inventario_backgrounds[2], 255);
  1617.     TextDrawFont(inventario_backgrounds[2], 1);
  1618.     TextDrawSetProportional(inventario_backgrounds[2], 1);
  1619.     TextDrawSetShadow(inventario_backgrounds[2], 0);
  1620.  
  1621.     inventario_backgrounds[3] = TextDrawCreate(314.599426, 122.233375, "box");
  1622.     TextDrawLetterSize(inventario_backgrounds[3], 0.000000, 1.200001);
  1623.     TextDrawTextSize(inventario_backgrounds[3], 576.602294, 0.000000);
  1624.     TextDrawAlignment(inventario_backgrounds[3], 1);
  1625.     TextDrawColor(inventario_backgrounds[3], -1);
  1626.     TextDrawUseBox(inventario_backgrounds[3], 1);
  1627.     TextDrawBoxColor(inventario_backgrounds[3], 128);
  1628.     TextDrawSetShadow(inventario_backgrounds[3], 0);
  1629.     TextDrawSetOutline(inventario_backgrounds[3], 0);
  1630.     TextDrawBackgroundColor(inventario_backgrounds[3], 255);
  1631.     TextDrawFont(inventario_backgrounds[3], 1);
  1632.     TextDrawSetProportional(inventario_backgrounds[3], 1);
  1633.     TextDrawSetShadow(inventario_backgrounds[3], 0);
  1634.  
  1635.     inventario_backgrounds[4] = TextDrawCreate(317.000000, 314.434112, "box");
  1636.     TextDrawLetterSize(inventario_backgrounds[4], 0.000000, 6.285005);
  1637.     TextDrawTextSize(inventario_backgrounds[4], 499.247772, 0.000000);
  1638.     TextDrawAlignment(inventario_backgrounds[4], 1);
  1639.     TextDrawColor(inventario_backgrounds[4], -1);
  1640.     TextDrawUseBox(inventario_backgrounds[4], 1);
  1641.     TextDrawBoxColor(inventario_backgrounds[4], 128);
  1642.     TextDrawSetShadow(inventario_backgrounds[4], 0);
  1643.     TextDrawSetOutline(inventario_backgrounds[4], 0);
  1644.     TextDrawBackgroundColor(inventario_backgrounds[4], 255);
  1645.     TextDrawFont(inventario_backgrounds[4], 1);
  1646.     TextDrawSetProportional(inventario_backgrounds[4], 1);
  1647.     TextDrawSetShadow(inventario_backgrounds[4], 0);
  1648.  
  1649.     inventario_usar = TextDrawCreate(504.388427, 312.249938, "");
  1650.     TextDrawLetterSize(inventario_usar, 0.000000, 0.000000);
  1651.     TextDrawTextSize(inventario_usar, 71.019790, 18.579967);
  1652.     TextDrawAlignment(inventario_usar, 1);
  1653.     TextDrawColor(inventario_usar, -1);
  1654.     TextDrawSetShadow(inventario_usar, 0);
  1655.     TextDrawSetOutline(inventario_usar, 0);
  1656.     TextDrawBackgroundColor(inventario_usar, 866792304);
  1657.     TextDrawFont(inventario_usar, 5);
  1658.     TextDrawSetProportional(inventario_usar, 0);
  1659.     TextDrawSetShadow(inventario_usar, 0);
  1660.     TextDrawSetPreviewModel(inventario_usar, 19382);
  1661.     TextDrawSetPreviewRot(inventario_usar, 0.000000, 0.000000, 0.000000, 1.000000);
  1662.     TextDrawSetSelectable(inventario_usar, true);
  1663.  
  1664.     inventario_split[0] = TextDrawCreate(504.593688, 333.316314, "");
  1665.     TextDrawLetterSize(inventario_split[0], 0.000000, 0.000000);
  1666.     TextDrawTextSize(inventario_split[0], 71.019790, 18.579967);
  1667.     TextDrawAlignment(inventario_split[0], 1);
  1668.     TextDrawColor(inventario_split[0], -1);
  1669.     TextDrawSetShadow(inventario_split[0], 0);
  1670.     TextDrawSetOutline(inventario_split[0], 0);
  1671.     TextDrawBackgroundColor(inventario_split[0], -65472);
  1672.     TextDrawFont(inventario_split[0], 5);
  1673.     TextDrawSetProportional(inventario_split[0], 0);
  1674.     TextDrawSetShadow(inventario_split[0], 0);
  1675.     TextDrawSetSelectable(inventario_split[0], true);
  1676.     TextDrawSetPreviewModel(inventario_split[0], 19382);
  1677.     TextDrawSetPreviewRot(inventario_split[0], 0.000000, 0.000000, 0.000000, 1.000000);
  1678.  
  1679.     inventario_drop[0] = TextDrawCreate(504.793701, 354.617614, "");
  1680.     TextDrawLetterSize(inventario_drop[0], 0.000000, 0.000000);
  1681.     TextDrawTextSize(inventario_drop[0], 71.019790, 18.579967);
  1682.     TextDrawAlignment(inventario_drop[0], 1);
  1683.     TextDrawColor(inventario_drop[0], -1);
  1684.     TextDrawSetShadow(inventario_drop[0], 0);
  1685.     TextDrawSetOutline(inventario_drop[0], 0);
  1686.     TextDrawBackgroundColor(inventario_drop[0], 0xAA333370);
  1687.     TextDrawFont(inventario_drop[0], 5);
  1688.     TextDrawSetProportional(inventario_drop[0], 0);
  1689.     TextDrawSetShadow(inventario_drop[0], 0);
  1690.     TextDrawSetSelectable(inventario_drop[0], true);
  1691.     TextDrawSetPreviewModel(inventario_drop[0], 19382);
  1692.     TextDrawSetPreviewRot(inventario_drop[0], 0.000000, 0.000000, 0.000000, 1.000000);
  1693.  
  1694.     inventario_remover = TextDrawCreate(149.847900, 344.867553, "");
  1695.     TextDrawLetterSize(inventario_remover, 0.000000, 0.000000);
  1696.     TextDrawTextSize(inventario_remover, 76.040008, 19.899997);
  1697.     TextDrawAlignment(inventario_remover, 1);
  1698.     TextDrawColor(inventario_remover, -1);
  1699.     TextDrawSetShadow(inventario_remover, 0);
  1700.     TextDrawSetOutline(inventario_remover, 0);
  1701.     TextDrawBackgroundColor(inventario_remover, 0xAA333370);
  1702.     TextDrawFont(inventario_remover, 5);
  1703.     TextDrawSetProportional(inventario_remover, 0);
  1704.     TextDrawSetShadow(inventario_remover, 0);
  1705.     TextDrawSetSelectable(inventario_remover, true);
  1706.     TextDrawSetPreviewModel(inventario_remover, 19382);
  1707.     TextDrawSetPreviewRot(inventario_remover, 0.000000, 0.000000, 0.000000, 1.000000);
  1708.  
  1709.     inventario_split[1] = TextDrawCreate(540.294372, 334.449981, "split");
  1710.     TextDrawLetterSize(inventario_split[1], 0.400000, 1.600000);
  1711.     TextDrawAlignment(inventario_split[1], 2);
  1712.     TextDrawColor(inventario_split[1], -1);
  1713.     TextDrawSetShadow(inventario_split[1], 0);
  1714.     TextDrawSetOutline(inventario_split[1], 0);
  1715.     TextDrawBackgroundColor(inventario_split[1], 255);
  1716.     TextDrawFont(inventario_split[1], 2);
  1717.     TextDrawSetProportional(inventario_split[1], 1);
  1718.     TextDrawSetShadow(inventario_split[1], 0);
  1719.     TextDrawSetSelectable(inventario_split[1], false);
  1720.  
  1721.     inventario_drop[1] = TextDrawCreate(540.762878, 355.451263, "drop");
  1722.     TextDrawLetterSize(inventario_drop[1], 0.400000, 1.600000);
  1723.     TextDrawAlignment(inventario_drop[1], 2);
  1724.     TextDrawColor(inventario_drop[1], -1);
  1725.     TextDrawSetShadow(inventario_drop[1], 0);
  1726.     TextDrawSetOutline(inventario_drop[1], 0);
  1727.     TextDrawBackgroundColor(inventario_drop[1], 255);
  1728.     TextDrawFont(inventario_drop[1], 2);
  1729.     TextDrawSetProportional(inventario_drop[1], 1);
  1730.     TextDrawSetShadow(inventario_drop[1], 0);
  1731.     TextDrawSetSelectable(inventario_drop[1], false);
  1732.  
  1733.     inventario_close[1] = TextDrawCreate(565.100341, 119.433311, "X");
  1734.     TextDrawTextSize(inventario_close[1], 574.999511, 0.000000);
  1735.     TextDrawLetterSize(inventario_close[1], 0.400000, 1.600000);
  1736.     TextDrawAlignment(inventario_close[1], 1);
  1737.     TextDrawColor(inventario_close[1], -1);
  1738.     TextDrawSetShadow(inventario_close[1], 0);
  1739.     TextDrawSetOutline(inventario_close[1], 0);
  1740.     TextDrawBackgroundColor(inventario_close[1], 255);
  1741.     TextDrawFont(inventario_close[1], 2);
  1742.     TextDrawSetProportional(inventario_close[1], 1);
  1743.     TextDrawSetShadow(inventario_close[1], 0);
  1744.     TextDrawSetSelectable(inventario_close[1], true);
  1745.    
  1746.     inventario_close[0] = TextDrawCreate(564.079284, 120.583320, "");
  1747.     TextDrawLetterSize(inventario_close[0], 0.000000, 0.000000);
  1748.     TextDrawTextSize(inventario_close[0], 14.000000, 14.000000);
  1749.     TextDrawAlignment(inventario_close[0], 1);
  1750.     TextDrawColor(inventario_close[0], -1);
  1751.     TextDrawSetShadow(inventario_close[0], 0);
  1752.     TextDrawSetOutline(inventario_close[0], 0);
  1753.     TextDrawBackgroundColor(inventario_close[0], 80);
  1754.     TextDrawFont(inventario_close[0], 5);
  1755.     TextDrawSetProportional(inventario_close[0], 0);
  1756.     TextDrawSetShadow(inventario_close[0], 0);
  1757.     TextDrawSetSelectable(inventario_close[0], true);
  1758.     TextDrawSetPreviewModel(inventario_close[0], 19382);
  1759.     TextDrawSetPreviewRot(inventario_close[0], 0.000000, 0.000000, 0.000000, 1.000000);
  1760.    
  1761. }
  1762.  
  1763. //----------------------------------------------------------
  1764.  
  1765. LoadPlayerTextDraws(playerid)
  1766. {
  1767.     inventario_index[playerid][0] = CreatePlayerTextDraw(playerid, 315.500152, 150.692352, "");
  1768.     PlayerTextDrawLetterSize(playerid, inventario_index[playerid][0], 0.000000, 0.000000);
  1769.     PlayerTextDrawTextSize(playerid, inventario_index[playerid][0], 46.000000, 45.000000);
  1770.     PlayerTextDrawAlignment(playerid, inventario_index[playerid][0], 1);
  1771.     PlayerTextDrawColor(playerid, inventario_index[playerid][0], -1);
  1772.     PlayerTextDrawSetShadow(playerid, inventario_index[playerid][0], 0);
  1773.     PlayerTextDrawSetOutline(playerid, inventario_index[playerid][0], 0);
  1774.     PlayerTextDrawBackgroundColor(playerid, inventario_index[playerid][0], 96);
  1775.     PlayerTextDrawFont(playerid, inventario_index[playerid][0], 5);
  1776.     PlayerTextDrawSetProportional(playerid, inventario_index[playerid][0], 0);
  1777.     PlayerTextDrawSetShadow(playerid, inventario_index[playerid][0], 0);
  1778.     PlayerTextDrawSetSelectable(playerid, inventario_index[playerid][0], true);
  1779.     PlayerTextDrawSetPreviewModel(playerid, inventario_index[playerid][0], 19382);
  1780.     PlayerTextDrawSetPreviewRot(playerid, inventario_index[playerid][0], 0.000000, -30, 0.000000, 2.2);
  1781.  
  1782.     inventario_index[playerid][1] = CreatePlayerTextDraw(playerid, 368.803405, 150.692352, "");
  1783.     PlayerTextDrawLetterSize(playerid, inventario_index[playerid][1], 0.000000, 0.000000);
  1784.     PlayerTextDrawTextSize(playerid, inventario_index[playerid][1], 46.000000, 45.000000);
  1785.     PlayerTextDrawAlignment(playerid, inventario_index[playerid][1], 1);
  1786.     PlayerTextDrawColor(playerid, inventario_index[playerid][1], -1);
  1787.     PlayerTextDrawSetShadow(playerid, inventario_index[playerid][1], 0);
  1788.     PlayerTextDrawSetOutline(playerid, inventario_index[playerid][1], 0);
  1789.     PlayerTextDrawBackgroundColor(playerid, inventario_index[playerid][1], 96);
  1790.     PlayerTextDrawFont(playerid, inventario_index[playerid][1], 5);
  1791.     PlayerTextDrawSetProportional(playerid, inventario_index[playerid][1], 0);
  1792.     PlayerTextDrawSetShadow(playerid, inventario_index[playerid][1], 0);
  1793.     PlayerTextDrawSetSelectable(playerid, inventario_index[playerid][1], true);
  1794.     PlayerTextDrawSetPreviewModel(playerid, inventario_index[playerid][1], 19382);
  1795.     PlayerTextDrawSetPreviewRot(playerid, inventario_index[playerid][1], 0.000000, -30, 0.000000, 2.2);
  1796.  
  1797.     inventario_index[playerid][10] = CreatePlayerTextDraw(playerid, 315.500152, 253.698638, "");
  1798.     PlayerTextDrawLetterSize(playerid, inventario_index[playerid][10], 0.000000, 0.000000);
  1799.     PlayerTextDrawTextSize(playerid, inventario_index[playerid][10], 46.000000, 45.000000);
  1800.     PlayerTextDrawAlignment(playerid, inventario_index[playerid][10], 1);
  1801.     PlayerTextDrawColor(playerid, inventario_index[playerid][10], -1);
  1802.     PlayerTextDrawSetShadow(playerid, inventario_index[playerid][10], 0);
  1803.     PlayerTextDrawSetOutline(playerid, inventario_index[playerid][10], 0);
  1804.     PlayerTextDrawBackgroundColor(playerid, inventario_index[playerid][10], 96);
  1805.     PlayerTextDrawFont(playerid, inventario_index[playerid][10], 5);
  1806.     PlayerTextDrawSetProportional(playerid, inventario_index[playerid][10], 0);
  1807.     PlayerTextDrawSetShadow(playerid, inventario_index[playerid][10], 0);
  1808.     PlayerTextDrawSetSelectable(playerid, inventario_index[playerid][10], true);
  1809.     PlayerTextDrawSetPreviewModel(playerid, inventario_index[playerid][10], 19382);
  1810.     PlayerTextDrawSetPreviewRot(playerid, inventario_index[playerid][10], 0.000000, 0.000000, 0.000000, 1.000000);
  1811.  
  1812.     inventario_index[playerid][5] = CreatePlayerTextDraw(playerid, 315.500152, 201.795471, "");
  1813.     PlayerTextDrawLetterSize(playerid, inventario_index[playerid][5], 0.000000, 0.000000);
  1814.     PlayerTextDrawTextSize(playerid, inventario_index[playerid][5], 46.000000, 45.000000);
  1815.     PlayerTextDrawAlignment(playerid, inventario_index[playerid][5], 1);
  1816.     PlayerTextDrawColor(playerid, inventario_index[playerid][5], -1);
  1817.     PlayerTextDrawSetShadow(playerid, inventario_index[playerid][5], 0);
  1818.     PlayerTextDrawSetOutline(playerid, inventario_index[playerid][5], 0);
  1819.     PlayerTextDrawBackgroundColor(playerid, inventario_index[playerid][5], 96);
  1820.     PlayerTextDrawFont(playerid, inventario_index[playerid][5], 5);
  1821.     PlayerTextDrawSetProportional(playerid, inventario_index[playerid][5], 0);
  1822.     PlayerTextDrawSetShadow(playerid, inventario_index[playerid][5], 0);
  1823.     PlayerTextDrawSetSelectable(playerid, inventario_index[playerid][5], true);
  1824.     PlayerTextDrawSetPreviewModel(playerid, inventario_index[playerid][5], 19382);
  1825.     PlayerTextDrawSetPreviewRot(playerid, inventario_index[playerid][5], 0.000000, 0.000000, 0.000000, 1.000000);
  1826.  
  1827.     inventario_index[playerid][2] = CreatePlayerTextDraw(playerid, 422.506683, 150.692352, "");
  1828.     PlayerTextDrawLetterSize(playerid, inventario_index[playerid][2], 0.000000, 0.000000);
  1829.     PlayerTextDrawTextSize(playerid, inventario_index[playerid][2], 46.000000, 45.000000);
  1830.     PlayerTextDrawAlignment(playerid, inventario_index[playerid][2], 1);
  1831.     PlayerTextDrawColor(playerid, inventario_index[playerid][2], -1);
  1832.     PlayerTextDrawSetShadow(playerid, inventario_index[playerid][2], 0);
  1833.     PlayerTextDrawSetOutline(playerid, inventario_index[playerid][2], 0);
  1834.     PlayerTextDrawBackgroundColor(playerid, inventario_index[playerid][2], 96);
  1835.     PlayerTextDrawFont(playerid, inventario_index[playerid][2], 5);
  1836.     PlayerTextDrawSetProportional(playerid, inventario_index[playerid][2], 0);
  1837.     PlayerTextDrawSetShadow(playerid, inventario_index[playerid][2], 0);
  1838.     PlayerTextDrawSetSelectable(playerid, inventario_index[playerid][2], true);
  1839.     PlayerTextDrawSetPreviewModel(playerid, inventario_index[playerid][2], 19382);
  1840.     PlayerTextDrawSetPreviewRot(playerid, inventario_index[playerid][2], 0.000000, 0.000000, 0.000000, 1.000000);
  1841.  
  1842.     inventario_index[playerid][3] = CreatePlayerTextDraw(playerid, 475.509918, 150.692352, "");
  1843.     PlayerTextDrawLetterSize(playerid, inventario_index[playerid][3], 0.000000, 0.000000);
  1844.     PlayerTextDrawTextSize(playerid, inventario_index[playerid][3], 46.000000, 45.000000);
  1845.     PlayerTextDrawAlignment(playerid, inventario_index[playerid][3], 1);
  1846.     PlayerTextDrawColor(playerid, inventario_index[playerid][3], -1);
  1847.     PlayerTextDrawSetShadow(playerid, inventario_index[playerid][3], 0);
  1848.     PlayerTextDrawSetOutline(playerid, inventario_index[playerid][3], 0);
  1849.     PlayerTextDrawBackgroundColor(playerid, inventario_index[playerid][3], 96);
  1850.     PlayerTextDrawFont(playerid, inventario_index[playerid][3], 5);
  1851.     PlayerTextDrawSetProportional(playerid, inventario_index[playerid][3], 0);
  1852.     PlayerTextDrawSetShadow(playerid, inventario_index[playerid][3], 0);
  1853.     PlayerTextDrawSetSelectable(playerid, inventario_index[playerid][3], true);
  1854.     PlayerTextDrawSetPreviewModel(playerid, inventario_index[playerid][3], 19382);
  1855.     PlayerTextDrawSetPreviewRot(playerid, inventario_index[playerid][3], 0.000000, 0.000000, 0.000000, 1.000000);
  1856.  
  1857.     inventario_index[playerid][4] = CreatePlayerTextDraw(playerid, 528.508117, 150.692352, "");
  1858.     PlayerTextDrawLetterSize(playerid, inventario_index[playerid][4], 0.000000, 0.000000);
  1859.     PlayerTextDrawTextSize(playerid, inventario_index[playerid][4], 46.000000, 45.000000);
  1860.     PlayerTextDrawAlignment(playerid, inventario_index[playerid][4], 1);
  1861.     PlayerTextDrawColor(playerid, inventario_index[playerid][4], -1);
  1862.     PlayerTextDrawSetShadow(playerid, inventario_index[playerid][4], 0);
  1863.     PlayerTextDrawSetOutline(playerid, inventario_index[playerid][4], 0);
  1864.     PlayerTextDrawBackgroundColor(playerid, inventario_index[playerid][4], 96);
  1865.     PlayerTextDrawFont(playerid, inventario_index[playerid][4], 5);
  1866.     PlayerTextDrawSetProportional(playerid, inventario_index[playerid][4], 0);
  1867.     PlayerTextDrawSetShadow(playerid, inventario_index[playerid][4], 0);
  1868.     PlayerTextDrawSetSelectable(playerid, inventario_index[playerid][4], true);
  1869.     PlayerTextDrawSetPreviewModel(playerid, inventario_index[playerid][4], 19382);
  1870.     PlayerTextDrawSetPreviewRot(playerid, inventario_index[playerid][4], 0.000000, 0.000000, 0.000000, 1.000000);
  1871.  
  1872.     inventario_index[playerid][6] = CreatePlayerTextDraw(playerid, 368.903411, 201.795471, "");
  1873.     PlayerTextDrawLetterSize(playerid, inventario_index[playerid][6], 0.000000, 0.000000);
  1874.     PlayerTextDrawTextSize(playerid, inventario_index[playerid][6], 46.000000, 45.000000);
  1875.     PlayerTextDrawAlignment(playerid, inventario_index[playerid][6], 1);
  1876.     PlayerTextDrawColor(playerid, inventario_index[playerid][6], -1);
  1877.     PlayerTextDrawSetShadow(playerid, inventario_index[playerid][6], 0);
  1878.     PlayerTextDrawSetOutline(playerid, inventario_index[playerid][6], 0);
  1879.     PlayerTextDrawBackgroundColor(playerid, inventario_index[playerid][6], 96);
  1880.     PlayerTextDrawFont(playerid, inventario_index[playerid][6], 5);
  1881.     PlayerTextDrawSetProportional(playerid, inventario_index[playerid][6], 0);
  1882.     PlayerTextDrawSetShadow(playerid, inventario_index[playerid][6], 0);
  1883.     PlayerTextDrawSetSelectable(playerid, inventario_index[playerid][6], true);
  1884.     PlayerTextDrawSetPreviewModel(playerid, inventario_index[playerid][6], 19382);
  1885.     PlayerTextDrawSetPreviewRot(playerid, inventario_index[playerid][6], 0.000000, 0.000000, 0.000000, 1.000000);
  1886.  
  1887.     inventario_index[playerid][7] = CreatePlayerTextDraw(playerid, 422.406677, 201.795471, "");
  1888.     PlayerTextDrawLetterSize(playerid, inventario_index[playerid][7], 0.000000, 0.000000);
  1889.     PlayerTextDrawTextSize(playerid, inventario_index[playerid][7], 46.000000, 45.000000);
  1890.     PlayerTextDrawAlignment(playerid, inventario_index[playerid][7], 1);
  1891.     PlayerTextDrawColor(playerid, inventario_index[playerid][7], -1);
  1892.     PlayerTextDrawSetShadow(playerid, inventario_index[playerid][7], 0);
  1893.     PlayerTextDrawSetOutline(playerid, inventario_index[playerid][7], 0);
  1894.     PlayerTextDrawBackgroundColor(playerid, inventario_index[playerid][7], 96);
  1895.     PlayerTextDrawFont(playerid, inventario_index[playerid][7], 5);
  1896.     PlayerTextDrawSetProportional(playerid, inventario_index[playerid][7], 0);
  1897.     PlayerTextDrawSetShadow(playerid, inventario_index[playerid][7], 0);
  1898.     PlayerTextDrawSetSelectable(playerid, inventario_index[playerid][7], true);
  1899.     PlayerTextDrawSetPreviewModel(playerid, inventario_index[playerid][7], 19382);
  1900.     PlayerTextDrawSetPreviewRot(playerid, inventario_index[playerid][7], 0.000000, 0.000000, 0.000000, 1.000000);
  1901.  
  1902.     inventario_index[playerid][8] = CreatePlayerTextDraw(playerid, 476.009948, 201.795471, "");
  1903.     PlayerTextDrawLetterSize(playerid, inventario_index[playerid][8], 0.000000, 0.000000);
  1904.     PlayerTextDrawTextSize(playerid, inventario_index[playerid][8], 46.000000, 45.000000);
  1905.     PlayerTextDrawAlignment(playerid, inventario_index[playerid][8], 1);
  1906.     PlayerTextDrawColor(playerid, inventario_index[playerid][8], -1);
  1907.     PlayerTextDrawSetShadow(playerid, inventario_index[playerid][8], 0);
  1908.     PlayerTextDrawSetOutline(playerid, inventario_index[playerid][8], 0);
  1909.     PlayerTextDrawBackgroundColor(playerid, inventario_index[playerid][8], 96);
  1910.     PlayerTextDrawFont(playerid, inventario_index[playerid][8], 5);
  1911.     PlayerTextDrawSetProportional(playerid, inventario_index[playerid][8], 0);
  1912.     PlayerTextDrawSetShadow(playerid, inventario_index[playerid][8], 0);
  1913.     PlayerTextDrawSetSelectable(playerid, inventario_index[playerid][8], true);
  1914.     PlayerTextDrawSetPreviewModel(playerid, inventario_index[playerid][8], 19382);
  1915.     PlayerTextDrawSetPreviewRot(playerid, inventario_index[playerid][8], 0.000000, 0.000000, 0.000000, 1.000000);
  1916.  
  1917.     inventario_index[playerid][9] = CreatePlayerTextDraw(playerid, 528.908020, 201.795471, "");
  1918.     PlayerTextDrawLetterSize(playerid, inventario_index[playerid][9], 0.000000, 0.000000);
  1919.     PlayerTextDrawTextSize(playerid, inventario_index[playerid][9], 46.000000, 45.000000);
  1920.     PlayerTextDrawAlignment(playerid, inventario_index[playerid][9], 1);
  1921.     PlayerTextDrawColor(playerid, inventario_index[playerid][9], -1);
  1922.     PlayerTextDrawSetShadow(playerid, inventario_index[playerid][9], 0);
  1923.     PlayerTextDrawSetOutline(playerid, inventario_index[playerid][9], 0);
  1924.     PlayerTextDrawBackgroundColor(playerid, inventario_index[playerid][9], 96);
  1925.     PlayerTextDrawFont(playerid, inventario_index[playerid][9], 5);
  1926.     PlayerTextDrawSetProportional(playerid, inventario_index[playerid][9], 0);
  1927.     PlayerTextDrawSetShadow(playerid, inventario_index[playerid][9], 0);
  1928.     PlayerTextDrawSetSelectable(playerid, inventario_index[playerid][9], true);
  1929.     PlayerTextDrawSetPreviewModel(playerid, inventario_index[playerid][9], 19382);
  1930.     PlayerTextDrawSetPreviewRot(playerid, inventario_index[playerid][9], 0.000000, 0.000000, 0.000000, 1.000000);
  1931.  
  1932.     inventario_index[playerid][11] = CreatePlayerTextDraw(playerid, 369.203430, 253.698638, "");
  1933.     PlayerTextDrawLetterSize(playerid, inventario_index[playerid][11], 0.000000, 0.000000);
  1934.     PlayerTextDrawTextSize(playerid, inventario_index[playerid][11], 46.000000, 45.000000);
  1935.     PlayerTextDrawAlignment(playerid, inventario_index[playerid][11], 1);
  1936.     PlayerTextDrawColor(playerid, inventario_index[playerid][11], -1);
  1937.     PlayerTextDrawSetShadow(playerid, inventario_index[playerid][11], 0);
  1938.     PlayerTextDrawSetOutline(playerid, inventario_index[playerid][11], 0);
  1939.     PlayerTextDrawBackgroundColor(playerid, inventario_index[playerid][11], 96);
  1940.     PlayerTextDrawFont(playerid, inventario_index[playerid][11], 5);
  1941.     PlayerTextDrawSetProportional(playerid, inventario_index[playerid][11], 0);
  1942.     PlayerTextDrawSetShadow(playerid, inventario_index[playerid][11], 0);
  1943.     PlayerTextDrawSetSelectable(playerid, inventario_index[playerid][11], true);
  1944.     PlayerTextDrawSetPreviewModel(playerid, inventario_index[playerid][11], 19382);
  1945.     PlayerTextDrawSetPreviewRot(playerid, inventario_index[playerid][11], 0.000000, 0.000000, 0.000000, 1.000000);
  1946.  
  1947.     inventario_index[playerid][12] = CreatePlayerTextDraw(playerid, 422.806701, 253.698638, "");
  1948.     PlayerTextDrawLetterSize(playerid, inventario_index[playerid][12] , 0.000000, 0.000000);
  1949.     PlayerTextDrawTextSize(playerid, inventario_index[playerid][12] , 46.000000, 45.000000);
  1950.     PlayerTextDrawAlignment(playerid, inventario_index[playerid][12] , 1);
  1951.     PlayerTextDrawColor(playerid, inventario_index[playerid][12] , -1);
  1952.     PlayerTextDrawSetShadow(playerid, inventario_index[playerid][12] , 0);
  1953.     PlayerTextDrawSetOutline(playerid, inventario_index[playerid][12] , 0);
  1954.     PlayerTextDrawBackgroundColor(playerid, inventario_index[playerid][12], 96);
  1955.     PlayerTextDrawFont(playerid, inventario_index[playerid][12], 5);
  1956.     PlayerTextDrawSetProportional(playerid, inventario_index[playerid][12], 0);
  1957.     PlayerTextDrawSetShadow(playerid, inventario_index[playerid][12], 0);
  1958.     PlayerTextDrawSetSelectable(playerid, inventario_index[playerid][12], true);
  1959.     PlayerTextDrawSetPreviewModel(playerid, inventario_index[playerid][12], 19382);
  1960.     PlayerTextDrawSetPreviewRot(playerid, inventario_index[playerid][12], 0.000000, 0.000000, 0.000000, 1.000000);
  1961.  
  1962.     inventario_index[playerid][13] = CreatePlayerTextDraw(playerid, 476.209960, 253.698638, "");
  1963.     PlayerTextDrawLetterSize(playerid, inventario_index[playerid][13], 0.000000, 0.000000);
  1964.     PlayerTextDrawTextSize(playerid, inventario_index[playerid][13], 46.000000, 45.000000);
  1965.     PlayerTextDrawAlignment(playerid, inventario_index[playerid][13], 1);
  1966.     PlayerTextDrawColor(playerid, inventario_index[playerid][13], -1);
  1967.     PlayerTextDrawSetShadow(playerid, inventario_index[playerid][13], 0);
  1968.     PlayerTextDrawSetOutline(playerid, inventario_index[playerid][13], 0);
  1969.     PlayerTextDrawBackgroundColor(playerid, inventario_index[playerid][13], 96);
  1970.     PlayerTextDrawFont(playerid, inventario_index[playerid][13], 5);
  1971.     PlayerTextDrawSetProportional(playerid, inventario_index[playerid][13], 0);
  1972.     PlayerTextDrawSetShadow(playerid, inventario_index[playerid][13], 0);
  1973.     PlayerTextDrawSetSelectable(playerid, inventario_index[playerid][13], true);
  1974.     PlayerTextDrawSetPreviewModel(playerid, inventario_index[playerid][13], 19382);
  1975.     PlayerTextDrawSetPreviewRot(playerid, inventario_index[playerid][13], 0.000000, 0.000000, 0.000000, 1.000000);
  1976.  
  1977.     inventario_index[playerid][14] = CreatePlayerTextDraw(playerid, 529.507873, 253.698638, "");
  1978.     PlayerTextDrawLetterSize(playerid, inventario_index[playerid][14], 0.000000, 0.000000);
  1979.     PlayerTextDrawTextSize(playerid, inventario_index[playerid][14], 46.000000, 45.000000);
  1980.     PlayerTextDrawAlignment(playerid, inventario_index[playerid][14], 1);
  1981.     PlayerTextDrawColor(playerid, inventario_index[playerid][14], -1);
  1982.     PlayerTextDrawSetShadow(playerid, inventario_index[playerid][14], 0);
  1983.     PlayerTextDrawSetOutline(playerid, inventario_index[playerid][14], 0);
  1984.     PlayerTextDrawBackgroundColor(playerid, inventario_index[playerid][14], 96);
  1985.     PlayerTextDrawFont(playerid, inventario_index[playerid][14], 5);
  1986.     PlayerTextDrawSetProportional(playerid, inventario_index[playerid][14], 0);
  1987.     PlayerTextDrawSetShadow(playerid,inventario_index[playerid][14], 0);
  1988.     PlayerTextDrawSetSelectable(playerid, inventario_index[playerid][14], true);
  1989.     PlayerTextDrawSetPreviewModel(playerid, inventario_index[playerid][14], 19382);
  1990.     PlayerTextDrawSetPreviewRot(playerid, inventario_index[playerid][14], 0.000000, 0.000000, 0.000000, 1.000000);
  1991.  
  1992.     inventario_skin[playerid] = CreatePlayerTextDraw(playerid, 73.300109, 138.366668, "");
  1993.     PlayerTextDrawLetterSize(playerid, inventario_skin[playerid], 0.000000, 0.000000);
  1994.     PlayerTextDrawTextSize(playerid, inventario_skin[playerid], 227.000000, 202.000000);
  1995.     PlayerTextDrawAlignment(playerid, inventario_skin[playerid], 1);
  1996.     PlayerTextDrawColor(playerid, inventario_skin[playerid], -1);
  1997.     PlayerTextDrawSetShadow(playerid, inventario_skin[playerid], 0);
  1998.     PlayerTextDrawSetOutline(playerid, inventario_skin[playerid], 0);
  1999.     PlayerTextDrawBackgroundColor(playerid, inventario_skin[playerid], 43520);
  2000.     PlayerTextDrawFont(playerid, inventario_skin[playerid], 5);
  2001.     PlayerTextDrawSetProportional(playerid, inventario_skin[playerid], 0);
  2002.     PlayerTextDrawSetShadow(playerid, inventario_skin[playerid], 0);
  2003.     PlayerTextDrawSetPreviewModel(playerid, inventario_skin[playerid], 0);
  2004.     PlayerTextDrawSetPreviewRot(playerid, inventario_skin[playerid], 0.000000, 0.000000, 0.000000, 1.000000);
  2005.  
  2006.     inventario_textos[playerid][0] = CreatePlayerTextDraw(playerid, 68.199996, 120.716636, "personagem");
  2007.     PlayerTextDrawLetterSize(playerid, inventario_textos[playerid][0], 0.326999, 1.284999);
  2008.     PlayerTextDrawAlignment(playerid, inventario_textos[playerid][0], 1);
  2009.     PlayerTextDrawColor(playerid, inventario_textos[playerid][0], -1);
  2010.     PlayerTextDrawSetShadow(playerid, inventario_textos[playerid][0], 0);
  2011.     PlayerTextDrawSetOutline(playerid, inventario_textos[playerid][0], 0);
  2012.     PlayerTextDrawBackgroundColor(playerid, inventario_textos[playerid][0], 255);
  2013.     PlayerTextDrawFont(playerid, inventario_textos[playerid][0], 2);
  2014.     PlayerTextDrawSetProportional(playerid, inventario_textos[playerid][0], 1);
  2015.     PlayerTextDrawSetShadow(playerid, inventario_textos[playerid][0], 0);
  2016.  
  2017.     inventario_textos[playerid][1] = CreatePlayerTextDraw(playerid, 315.710540, 120.716636, ConvertToGameText("Seu inventário"));
  2018.     PlayerTextDrawLetterSize(playerid, inventario_textos[playerid][1], 0.326999, 1.284999);
  2019.     PlayerTextDrawAlignment(playerid, inventario_textos[playerid][1], 1);
  2020.     PlayerTextDrawColor(playerid, inventario_textos[playerid][1], -1);
  2021.     PlayerTextDrawSetShadow(playerid, inventario_textos[playerid][1], 0);
  2022.     PlayerTextDrawSetOutline(playerid, inventario_textos[playerid][1], 0);
  2023.     PlayerTextDrawBackgroundColor(playerid, inventario_textos[playerid][1], 255);
  2024.     PlayerTextDrawFont(playerid, inventario_textos[playerid][1], 2);
  2025.     PlayerTextDrawSetProportional(playerid, inventario_textos[playerid][1], 1);
  2026.     PlayerTextDrawSetShadow(playerid, inventario_textos[playerid][1], 0);
  2027.  
  2028.     inventario_textos[playerid][2] = CreatePlayerTextDraw(playerid, 248.200164, 144.800033, ConvertToGameText("Cabeça"));
  2029.     PlayerTextDrawLetterSize(playerid, inventario_textos[playerid][2], 0.172995, 0.870832);
  2030.     PlayerTextDrawAlignment(playerid, inventario_textos[playerid][2], 2);
  2031.     PlayerTextDrawColor(playerid, inventario_textos[playerid][2], -1);
  2032.     PlayerTextDrawSetShadow(playerid, inventario_textos[playerid][2], 0);
  2033.     PlayerTextDrawSetOutline(playerid, inventario_textos[playerid][2], 0);
  2034.     PlayerTextDrawBackgroundColor(playerid, inventario_textos[playerid][2], 255);
  2035.     PlayerTextDrawFont(playerid, inventario_textos[playerid][2], 2);
  2036.     PlayerTextDrawSetProportional(playerid, inventario_textos[playerid][2], 1);
  2037.     PlayerTextDrawSetShadow(playerid, inventario_textos[playerid][2], 0);
  2038.  
  2039.     inventario_textos[playerid][3] = CreatePlayerTextDraw(playerid, 247.399932, 189.833389, "mochila");
  2040.     PlayerTextDrawLetterSize(playerid, inventario_textos[playerid][3], 0.172995, 0.870832);
  2041.     PlayerTextDrawAlignment(playerid, inventario_textos[playerid][3], 2);
  2042.     PlayerTextDrawColor(playerid, inventario_textos[playerid][3], -1);
  2043.     PlayerTextDrawSetShadow(playerid, inventario_textos[playerid][3], 0);
  2044.     PlayerTextDrawSetOutline(playerid, inventario_textos[playerid][3], 0);
  2045.     PlayerTextDrawBackgroundColor(playerid, inventario_textos[playerid][3], 255);
  2046.     PlayerTextDrawFont(playerid, inventario_textos[playerid][3], 2);
  2047.     PlayerTextDrawSetProportional(playerid, inventario_textos[playerid][3], 1);
  2048.     PlayerTextDrawSetShadow(playerid, inventario_textos[playerid][3], 0);
  2049.  
  2050.     inventario_textos[playerid][4] = CreatePlayerTextDraw(playerid, 128.199707, 180.250152, "corpo");
  2051.     PlayerTextDrawLetterSize(playerid, inventario_textos[playerid][4], 0.172995, 0.870832);
  2052.     PlayerTextDrawAlignment(playerid, inventario_textos[playerid][4], 2);
  2053.     PlayerTextDrawColor(playerid, inventario_textos[playerid][4], -1);
  2054.     PlayerTextDrawSetShadow(playerid, inventario_textos[playerid][4], 0);
  2055.     PlayerTextDrawSetOutline(playerid, inventario_textos[playerid][4], 0);
  2056.     PlayerTextDrawBackgroundColor(playerid, inventario_textos[playerid][4], 255);
  2057.     PlayerTextDrawFont(playerid, inventario_textos[playerid][4], 2);
  2058.     PlayerTextDrawSetProportional(playerid, inventario_textos[playerid][4], 1);
  2059.     PlayerTextDrawSetShadow(playerid, inventario_textos[playerid][4], 0);
  2060.  
  2061.     inventario_textos[playerid][5] = CreatePlayerTextDraw(playerid, 127.499824, 232.683532, "arma");
  2062.     PlayerTextDrawLetterSize(playerid, inventario_textos[playerid][5], 0.172995, 0.870832);
  2063.     PlayerTextDrawAlignment(playerid, inventario_textos[playerid][5], 2);
  2064.     PlayerTextDrawColor(playerid, inventario_textos[playerid][5], -1);
  2065.     PlayerTextDrawSetShadow(playerid, inventario_textos[playerid][5], 0);
  2066.     PlayerTextDrawSetOutline(playerid, inventario_textos[playerid][5], 0);
  2067.     PlayerTextDrawBackgroundColor(playerid, inventario_textos[playerid][5], 255);
  2068.     PlayerTextDrawFont(playerid, inventario_textos[playerid][5], 2);
  2069.     PlayerTextDrawSetProportional(playerid, inventario_textos[playerid][5], 1);
  2070.     PlayerTextDrawSetShadow(playerid, inventario_textos[playerid][5], 0);
  2071.  
  2072.     inventario_textos[playerid][6] = CreatePlayerTextDraw(playerid, 247.099945, 236.100448, "arma");
  2073.     PlayerTextDrawLetterSize(playerid, inventario_textos[playerid][6], 0.172995, 0.870832);
  2074.     PlayerTextDrawAlignment(playerid, inventario_textos[playerid][6], 2);
  2075.     PlayerTextDrawColor(playerid, inventario_textos[playerid][6], -1);
  2076.     PlayerTextDrawSetShadow(playerid, inventario_textos[playerid][6], 0);
  2077.     PlayerTextDrawSetOutline(playerid, inventario_textos[playerid][6], 0);
  2078.     PlayerTextDrawBackgroundColor(playerid, inventario_textos[playerid][6], 255);
  2079.     PlayerTextDrawFont(playerid, inventario_textos[playerid][6], 2);
  2080.     PlayerTextDrawSetProportional(playerid, inventario_textos[playerid][6], 1);
  2081.     PlayerTextDrawSetShadow(playerid, inventario_textos[playerid][6], 0);
  2082.  
  2083.     inventario_textos[playerid][7] = CreatePlayerTextDraw(playerid, 246.600036, 285.667083, "arma");
  2084.     PlayerTextDrawLetterSize(playerid, inventario_textos[playerid][7], 0.172995, 0.870832);
  2085.     PlayerTextDrawAlignment(playerid, inventario_textos[playerid][7], 2);
  2086.     PlayerTextDrawColor(playerid, inventario_textos[playerid][7], -1);
  2087.     PlayerTextDrawSetShadow(playerid, inventario_textos[playerid][7], 0);
  2088.     PlayerTextDrawSetOutline(playerid, inventario_textos[playerid][7], 0);
  2089.     PlayerTextDrawBackgroundColor(playerid, inventario_textos[playerid][7], 255);
  2090.     PlayerTextDrawFont(playerid, inventario_textos[playerid][7], 2);
  2091.     PlayerTextDrawSetProportional(playerid, inventario_textos[playerid][7], 1);
  2092.     PlayerTextDrawSetShadow(playerid, inventario_textos[playerid][7], 0);
  2093.  
  2094.     inventario_textos[playerid][8] = CreatePlayerTextDraw(playerid, 127.800155, 284.950317, "arma");
  2095.     PlayerTextDrawLetterSize(playerid, inventario_textos[playerid][8], 0.172995, 0.870832);
  2096.     PlayerTextDrawAlignment(playerid, inventario_textos[playerid][8], 2);
  2097.     PlayerTextDrawColor(playerid, inventario_textos[playerid][8], -1);
  2098.     PlayerTextDrawSetShadow(playerid, inventario_textos[playerid][8], 0);
  2099.     PlayerTextDrawSetOutline(playerid, inventario_textos[playerid][8], 0);
  2100.     PlayerTextDrawBackgroundColor(playerid, inventario_textos[playerid][8], 255);
  2101.     PlayerTextDrawFont(playerid, inventario_textos[playerid][8], 2);
  2102.     PlayerTextDrawSetProportional(playerid, inventario_textos[playerid][8], 1);
  2103.     PlayerTextDrawSetShadow(playerid, inventario_textos[playerid][8], 0);
  2104.  
  2105.     inventario_description[playerid][0] = CreatePlayerTextDraw(playerid, 317.699981, 314.833312, "");
  2106.     PlayerTextDrawLetterSize(playerid, inventario_description[playerid][0], 0.000000, 0.000000);
  2107.     PlayerTextDrawTextSize(playerid, inventario_description[playerid][0], 65.000000, 56.000000);
  2108.     PlayerTextDrawAlignment(playerid, inventario_description[playerid][0], 1);
  2109.     PlayerTextDrawColor(playerid, inventario_description[playerid][0], -1);
  2110.     PlayerTextDrawSetShadow(playerid, inventario_description[playerid][0], 0);
  2111.     PlayerTextDrawSetOutline(playerid, inventario_description[playerid][0], 0);
  2112.     PlayerTextDrawBackgroundColor(playerid, inventario_description[playerid][0], -208);
  2113.     PlayerTextDrawFont(playerid, inventario_description[playerid][0], 5);
  2114.     PlayerTextDrawSetProportional(playerid, inventario_description[playerid][0], 0);
  2115.     PlayerTextDrawSetShadow(playerid, inventario_description[playerid][0], 0);
  2116.     PlayerTextDrawSetPreviewModel(playerid, inventario_description[playerid][0], 18645);
  2117.     PlayerTextDrawSetPreviewRot(playerid, inventario_description[playerid][0], 0.000000, 0.000000, 0.000000, 1.000000);
  2118.     PlayerTextDrawSetSelectable(playerid, inventario_description[playerid][0], true);
  2119.  
  2120.     inventario_description[playerid][1] = CreatePlayerTextDraw(playerid, 388.099884, 314.099884, "CAPACETE");
  2121.     PlayerTextDrawLetterSize(playerid, inventario_description[playerid][1], 0.290499, 1.226665);
  2122.     PlayerTextDrawAlignment(playerid, inventario_description[playerid][1], 1);
  2123.     PlayerTextDrawColor(playerid, inventario_description[playerid][1], -1);
  2124.     PlayerTextDrawSetShadow(playerid, inventario_description[playerid][1], 0);
  2125.     PlayerTextDrawSetOutline(playerid, inventario_description[playerid][1], 0);
  2126.     PlayerTextDrawBackgroundColor(playerid, inventario_description[playerid][1], 255);
  2127.     PlayerTextDrawFont(playerid, inventario_description[playerid][1], 2);
  2128.     PlayerTextDrawSetProportional(playerid, inventario_description[playerid][1], 1);
  2129.     PlayerTextDrawSetShadow(playerid, inventario_description[playerid][1], 0);
  2130.  
  2131.     inventario_description[playerid][2] = CreatePlayerTextDraw(playerid, 388.699920, 330.400878, "PROTEGE_CONTRA_HEADSHOTS");
  2132.     PlayerTextDrawLetterSize(playerid, inventario_description[playerid][2], 0.157499, 0.882498);
  2133.     PlayerTextDrawAlignment(playerid, inventario_description[playerid][2], 1);
  2134.     PlayerTextDrawColor(playerid, inventario_description[playerid][2], -168430192);
  2135.     PlayerTextDrawSetShadow(playerid, inventario_description[playerid][2], 0);
  2136.     PlayerTextDrawSetOutline(playerid, inventario_description[playerid][2], 0);
  2137.     PlayerTextDrawBackgroundColor(playerid, inventario_description[playerid][2], 255);
  2138.     PlayerTextDrawFont(playerid, inventario_description[playerid][2], 2);
  2139.     PlayerTextDrawSetProportional(playerid, inventario_description[playerid][2], 1);
  2140.     PlayerTextDrawSetShadow(playerid, inventario_description[playerid][2], 0);
  2141.  
  2142.     inventario_description[playerid][3] = CreatePlayerTextDraw(playerid, 499.401489, 363.984985, "QUANTIDADE:_1");
  2143.     PlayerTextDrawLetterSize(playerid, inventario_description[playerid][3], 0.157499, 0.882498);
  2144.     PlayerTextDrawAlignment(playerid, inventario_description[playerid][3], 3);
  2145.     PlayerTextDrawColor(playerid, inventario_description[playerid][3], -168430208);
  2146.     PlayerTextDrawSetShadow(playerid, inventario_description[playerid][3], 0);
  2147.     PlayerTextDrawSetOutline(playerid, inventario_description[playerid][3], 0);
  2148.     PlayerTextDrawBackgroundColor(playerid, inventario_description[playerid][3], 255);
  2149.     PlayerTextDrawFont(playerid, inventario_description[playerid][3], 2);
  2150.     PlayerTextDrawSetProportional(playerid, inventario_description[playerid][3], 1);
  2151.     PlayerTextDrawSetShadow(playerid, inventario_description[playerid][3], 0);
  2152.  
  2153.     inventario_textos[playerid][9] = CreatePlayerTextDraw(playerid, 540.294372, 313.548706, "usar");
  2154.     PlayerTextDrawLetterSize(playerid, inventario_textos[playerid][9], 0.400000, 1.600000);
  2155.     PlayerTextDrawAlignment(playerid, inventario_textos[playerid][9], 2);
  2156.     PlayerTextDrawColor(playerid, inventario_textos[playerid][9], -1);
  2157.     PlayerTextDrawSetShadow(playerid, inventario_textos[playerid][9], 0);
  2158.     PlayerTextDrawSetOutline(playerid, inventario_textos[playerid][9], 0);
  2159.     PlayerTextDrawBackgroundColor(playerid, inventario_textos[playerid][9], 255);
  2160.     PlayerTextDrawFont(playerid, inventario_textos[playerid][9], 2);
  2161.     PlayerTextDrawSetProportional(playerid, inventario_textos[playerid][9], 1);
  2162.     PlayerTextDrawSetShadow(playerid, inventario_textos[playerid][9], 0);
  2163.     PlayerTextDrawSetSelectable(playerid, inventario_textos[playerid][9], false);
  2164.  
  2165.     inventario_personagemindex[playerid][0] = CreatePlayerTextDraw(playerid, 231.000305, 153.250015, "");
  2166.     PlayerTextDrawLetterSize(playerid, inventario_personagemindex[playerid][0], 0.000000, 0.000000);
  2167.     PlayerTextDrawTextSize(playerid, inventario_personagemindex[playerid][0], 33.000000, 32.000000);
  2168.     PlayerTextDrawAlignment(playerid, inventario_personagemindex[playerid][0], 1);
  2169.     PlayerTextDrawColor(playerid, inventario_personagemindex[playerid][0], -1);
  2170.     PlayerTextDrawSetShadow(playerid, inventario_personagemindex[playerid][0], 0);
  2171.     PlayerTextDrawSetOutline(playerid, inventario_personagemindex[playerid][0], 0);
  2172.     PlayerTextDrawBackgroundColor(playerid, inventario_personagemindex[playerid][0], 112);
  2173.     PlayerTextDrawFont(playerid, inventario_personagemindex[playerid][0], 5);
  2174.     PlayerTextDrawSetProportional(playerid, inventario_personagemindex[playerid][0], 0);
  2175.     PlayerTextDrawSetShadow(playerid, inventario_personagemindex[playerid][0], 0);
  2176.     PlayerTextDrawSetPreviewModel(playerid, inventario_personagemindex[playerid][0], 18645);
  2177.     PlayerTextDrawSetPreviewRot(playerid, inventario_personagemindex[playerid][0], 0.000000, 0.000000, 0.000000, 1.000000);
  2178.     PlayerTextDrawSetSelectable(playerid, inventario_personagemindex[playerid][0], true);
  2179.  
  2180.     inventario_personagemindex[playerid][1] = CreatePlayerTextDraw(playerid, 110.600074, 189.283264, "");
  2181.     PlayerTextDrawLetterSize(playerid, inventario_personagemindex[playerid][1], 0.000000, 0.000000);
  2182.     PlayerTextDrawTextSize(playerid, inventario_personagemindex[playerid][1], 33.000000, 32.000000);
  2183.     PlayerTextDrawAlignment(playerid, inventario_personagemindex[playerid][1], 1);
  2184.     PlayerTextDrawColor(playerid, inventario_personagemindex[playerid][1], -1);
  2185.     PlayerTextDrawSetShadow(playerid, inventario_personagemindex[playerid][1], 0);
  2186.     PlayerTextDrawSetOutline(playerid, inventario_personagemindex[playerid][1], 0);
  2187.     PlayerTextDrawBackgroundColor(playerid, inventario_personagemindex[playerid][1], 112);
  2188.     PlayerTextDrawFont(playerid, inventario_personagemindex[playerid][1], 5);
  2189.     PlayerTextDrawSetProportional(playerid, inventario_personagemindex[playerid][1], 0);
  2190.     PlayerTextDrawSetShadow(playerid, inventario_personagemindex[playerid][1], 0);
  2191.     PlayerTextDrawSetSelectable(playerid, inventario_personagemindex[playerid][1], true);
  2192.     PlayerTextDrawSetPreviewModel(playerid, inventario_personagemindex[playerid][1], 18645);
  2193.     PlayerTextDrawSetPreviewRot(playerid, inventario_personagemindex[playerid][1], 0.000000, 0.000000, 0.000000, 1.000000);
  2194.  
  2195.     inventario_personagemindex[playerid][2] = CreatePlayerTextDraw(playerid, 230.500000, 198.749984, "");
  2196.     PlayerTextDrawLetterSize(playerid, inventario_personagemindex[playerid][2], 0.000000, 0.000000);
  2197.     PlayerTextDrawTextSize(playerid, inventario_personagemindex[playerid][2], 33.000000, 36.000000);
  2198.     PlayerTextDrawAlignment(playerid, inventario_personagemindex[playerid][2], 1);
  2199.     PlayerTextDrawColor(playerid, inventario_personagemindex[playerid][2], -1);
  2200.     PlayerTextDrawSetShadow(playerid, inventario_personagemindex[playerid][2], 0);
  2201.     PlayerTextDrawSetOutline(playerid, inventario_personagemindex[playerid][2], 0);
  2202.     PlayerTextDrawBackgroundColor(playerid, inventario_personagemindex[playerid][2], 112);
  2203.     PlayerTextDrawFont(playerid, inventario_personagemindex[playerid][2], 5);
  2204.     PlayerTextDrawSetProportional(playerid, inventario_personagemindex[playerid][2], 0);
  2205.     PlayerTextDrawSetShadow(playerid, inventario_personagemindex[playerid][2], 0);
  2206.     PlayerTextDrawSetSelectable(playerid, inventario_personagemindex[playerid][2], true);
  2207.     PlayerTextDrawSetPreviewModel(playerid, inventario_personagemindex[playerid][2], 18645);
  2208.     PlayerTextDrawSetPreviewRot(playerid, inventario_personagemindex[playerid][2], 0.000000, 0.000000, 0.000000, 1.000000);
  2209.  
  2210.     inventario_personagemindex[playerid][3] = CreatePlayerTextDraw(playerid, 110.400032, 242.366851, "");
  2211.     PlayerTextDrawLetterSize(playerid, inventario_personagemindex[playerid][3], 0.000000, 0.000000);
  2212.     PlayerTextDrawTextSize(playerid, inventario_personagemindex[playerid][3], 33.000000, 36.000000);
  2213.     PlayerTextDrawAlignment(playerid, inventario_personagemindex[playerid][3], 1);
  2214.     PlayerTextDrawColor(playerid, inventario_personagemindex[playerid][3], -1);
  2215.     PlayerTextDrawSetShadow(playerid, inventario_personagemindex[playerid][3], 0);
  2216.     PlayerTextDrawSetOutline(playerid, inventario_personagemindex[playerid][3], 0);
  2217.     PlayerTextDrawBackgroundColor(playerid, inventario_personagemindex[playerid][3], 112);
  2218.     PlayerTextDrawFont(playerid, inventario_personagemindex[playerid][3], 5);
  2219.     PlayerTextDrawSetProportional(playerid, inventario_personagemindex[playerid][3], 0);
  2220.     PlayerTextDrawSetShadow(playerid, inventario_personagemindex[playerid][3], 0);
  2221.     PlayerTextDrawSetSelectable(playerid, inventario_personagemindex[playerid][3], true);
  2222.     PlayerTextDrawSetPreviewModel(playerid, inventario_personagemindex[playerid][3], 18645);
  2223.     PlayerTextDrawSetPreviewRot(playerid, inventario_personagemindex[playerid][3], 0.000000, 0.000000, 0.000000, 1.000000);
  2224.  
  2225.     inventario_personagemindex[playerid][4] = CreatePlayerTextDraw(playerid, 230.405273, 244.750305, "");
  2226.     PlayerTextDrawLetterSize(playerid, inventario_personagemindex[playerid][4], 0.000000, 0.000000);
  2227.     PlayerTextDrawTextSize(playerid, inventario_personagemindex[playerid][4], 33.000000, 36.000000);
  2228.     PlayerTextDrawAlignment(playerid, inventario_personagemindex[playerid][4], 1);
  2229.     PlayerTextDrawColor(playerid, inventario_personagemindex[playerid][4], -1);
  2230.     PlayerTextDrawSetShadow(playerid, inventario_personagemindex[playerid][4], 0);
  2231.     PlayerTextDrawSetOutline(playerid, inventario_personagemindex[playerid][4], 0);
  2232.     PlayerTextDrawBackgroundColor(playerid, inventario_personagemindex[playerid][4], 112);
  2233.     PlayerTextDrawFont(playerid, inventario_personagemindex[playerid][4], 5);
  2234.     PlayerTextDrawSetProportional(playerid, inventario_personagemindex[playerid][4], 0);
  2235.     PlayerTextDrawSetShadow(playerid, inventario_personagemindex[playerid][4], 0);
  2236.     PlayerTextDrawSetSelectable(playerid, inventario_personagemindex[playerid][4], true);
  2237.     PlayerTextDrawSetPreviewModel(playerid, inventario_personagemindex[playerid][4], 18645);
  2238.     PlayerTextDrawSetPreviewRot(playerid, inventario_personagemindex[playerid][4], 0.000000, 0.000000, 0.000000, 1.000000);
  2239.  
  2240.     inventario_personagemindex[playerid][5] = CreatePlayerTextDraw(playerid, 230.505279, 294.150360, "");
  2241.     PlayerTextDrawLetterSize(playerid, inventario_personagemindex[playerid][5], 0.000000, 0.000000);
  2242.     PlayerTextDrawTextSize(playerid, inventario_personagemindex[playerid][5], 33.000000, 36.000000);
  2243.     PlayerTextDrawAlignment(playerid, inventario_personagemindex[playerid][5], 1);
  2244.     PlayerTextDrawColor(playerid, inventario_personagemindex[playerid][5], -1);
  2245.     PlayerTextDrawSetShadow(playerid, inventario_personagemindex[playerid][5], 0);
  2246.     PlayerTextDrawSetOutline(playerid, inventario_personagemindex[playerid][5], 0);
  2247.     PlayerTextDrawBackgroundColor(playerid, inventario_personagemindex[playerid][5], 112);
  2248.     PlayerTextDrawFont(playerid, inventario_personagemindex[playerid][5], 5);
  2249.     PlayerTextDrawSetProportional(playerid, inventario_personagemindex[playerid][5], 0);
  2250.     PlayerTextDrawSetShadow(playerid, inventario_personagemindex[playerid][5], 0);
  2251.     PlayerTextDrawSetSelectable(playerid, inventario_personagemindex[playerid][5], true);
  2252.     PlayerTextDrawSetPreviewModel(playerid, inventario_personagemindex[playerid][5], 18645);
  2253.     PlayerTextDrawSetPreviewRot(playerid, inventario_personagemindex[playerid][5], 0.000000, 0.000000, 0.000000, 1.000000);
  2254.  
  2255.     inventario_personagemindex[playerid][6] = CreatePlayerTextDraw(playerid, 110.400032, 294.070007, "");
  2256.     PlayerTextDrawLetterSize(playerid, inventario_personagemindex[playerid][6], 0.000000, 0.000000);
  2257.     PlayerTextDrawTextSize(playerid, inventario_personagemindex[playerid][6], 33.000000, 36.000000);
  2258.     PlayerTextDrawAlignment(playerid, inventario_personagemindex[playerid][6], 1);
  2259.     PlayerTextDrawColor(playerid, inventario_personagemindex[playerid][6], -1);
  2260.     PlayerTextDrawSetShadow(playerid, inventario_personagemindex[playerid][6], 0);
  2261.     PlayerTextDrawSetOutline(playerid, inventario_personagemindex[playerid][6], 0);
  2262.     PlayerTextDrawBackgroundColor(playerid, inventario_personagemindex[playerid][6], 112);
  2263.     PlayerTextDrawFont(playerid, inventario_personagemindex[playerid][6], 5);
  2264.     PlayerTextDrawSetProportional(playerid, inventario_personagemindex[playerid][6], 0);
  2265.     PlayerTextDrawSetShadow(playerid, inventario_personagemindex[playerid][6], 0);
  2266.     PlayerTextDrawSetSelectable(playerid, inventario_personagemindex[playerid][6], true);
  2267.     PlayerTextDrawSetPreviewModel(playerid, inventario_personagemindex[playerid][6], 18645);
  2268.     PlayerTextDrawSetPreviewRot(playerid, inventario_personagemindex[playerid][6], 0.000000, 0.000000, 0.000000, 1.000000);
  2269.  
  2270.     inventario_textos[playerid][10] = CreatePlayerTextDraw(playerid, 187.721237, 347.616729, "remover");
  2271.     PlayerTextDrawLetterSize(playerid, inventario_textos[playerid][10], 0.325504, 1.407498);
  2272.     PlayerTextDrawAlignment(playerid, inventario_textos[playerid][10], 2);
  2273.     PlayerTextDrawColor(playerid, inventario_textos[playerid][10], -1);
  2274.     PlayerTextDrawSetShadow(playerid, inventario_textos[playerid][10], 0);
  2275.     PlayerTextDrawSetOutline(playerid, inventario_textos[playerid][10], 0);
  2276.     PlayerTextDrawBackgroundColor(playerid, inventario_textos[playerid][10], 255);
  2277.     PlayerTextDrawFont(playerid, inventario_textos[playerid][10], 2);
  2278.     PlayerTextDrawSetProportional(playerid, inventario_textos[playerid][10], 1);
  2279.     PlayerTextDrawSetShadow(playerid, inventario_textos[playerid][10], 0);
  2280.    
  2281.     inventario_mensagem[playerid] = CreatePlayerTextDraw(playerid, 321.224029, 381.983398, "error_msg");
  2282.     PlayerTextDrawLetterSize(playerid, inventario_mensagem[playerid], 0.400000, 1.600000);
  2283.     PlayerTextDrawAlignment(playerid, inventario_mensagem[playerid], 2);
  2284.     PlayerTextDrawColor(playerid, inventario_mensagem[playerid], -2147483393);
  2285.     PlayerTextDrawSetShadow(playerid, inventario_mensagem[playerid], 0);
  2286.     PlayerTextDrawSetOutline(playerid, inventario_mensagem[playerid], 1);
  2287.     PlayerTextDrawBackgroundColor(playerid, inventario_mensagem[playerid], 255);
  2288.     PlayerTextDrawFont(playerid, inventario_mensagem[playerid], 2);
  2289.     PlayerTextDrawSetProportional(playerid, inventario_mensagem[playerid], 1);
  2290.     PlayerTextDrawSetShadow(playerid, inventario_mensagem[playerid], 0);
  2291.    
  2292. }
  2293.  
  2294. //----------------------------------------------------------
Add Comment
Please, Sign In to add comment