Inv
Inv
sa-
mp.com/member.php?u=178553)
// If you use this in your server, please contact me to see.
// Version: 2.0
// Official topic PT-BR: http://forum.sa-mp.com/showthread.php?p=3653596
// Official topic EN: http://forum.sa-mp.com/showthread.php?p=3655514
//-------------------------------------------------------------------//
//************************** -Includes- *****************************//
//-------------------------------------------------------------------//
#include <a_samp>
#include <zcmd> // This is for the command /additem
#include <sscanf2> // This is for the command /additem
//-------------------------------------------------------------------//
//************************** -Defines- ******************************//
//-------------------------------------------------------------------//
//-------------------------------------------------------------------//
//************************ -Enumerações- ****************************//
//-------------------------------------------------------------------//
enum enum_Itens
{
item_id,
item_tipo,
item_modelo,
item_nome[24],
item_limite,
bool:item_canbedropped,
Float:item_previewrot[4],
item_description[200]
}
enum
{
ITEM_TYPE_WEAPON,
ITEM_TYPE_HELMET,
ITEM_TYPE_NORMAL,
ITEM_TYPE_BODY,
ITEM_TYPE_AMMO,
ITEM_TYPE_BACKPACK,
ITEM_TYPE_MELEEWEAPON
}
enum enum_pInventory
{
invSlot[MAX_INVENTORY_SLOTS],
invSelectedSlot,
invSlotAmount[MAX_INVENTORY_SLOTS],
Float:invArmourStatus[MAX_INVENTORY_SLOTS]
}
enum enum_pCharacter
{
charSlot[7],
charSelectedSlot,
Float:charArmourStatus
}
enum enum_Player
{
bool:inInventory,
bool:MessageInventory,
MessageInventoryTimer,
Language
}
enum enum_ItensWorld
{
bool:world_active,
world_itemid,
world_model,
world_amount,
world_object,
world_timer,
Text3D:world_3dtext,
Float:world_armourstatus,
Float:world_position[3],
new Itens[][enum_Itens] =
{
{0, ITEM_TYPE_NORMAL, 19382, "Nada",
0, false, {0.0,0.0,0.0,0.0},
"N/A"},
{1, ITEM_TYPE_HELMET, 18645, "Capacete",
1, true, {0.000000, 0.000000, 0.000000, 1.000000},
"Protege contra headshots."},
{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."},
{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."},
{4, ITEM_TYPE_AMMO, 2061, "Munição",
200, true, {0.000000, 0.000000, 0.000000, 2.000000},
"Munição para armas de fogo."},
{5, ITEM_TYPE_WEAPON, 344, "Molotov",
5, true, {0.000000, 0.000000, 0.000000, 1.000000},
"Arma incendiaria caseira."},
{6, ITEM_TYPE_BODY, 19142, "Colete",
1, true, {0.000000, 0.000000, 0.000000, 1.000000},
"Colete aprova de balas."},
{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."},
{8, ITEM_TYPE_BACKPACK, 3026, "Mochila Grande", 1,
true, {0.000000, 0.000000, 0.000000, 1.000000},
"Mochila que aumenta seu~n~inventário."},
{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."},
{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."},
{11, ITEM_TYPE_MELEEWEAPON, 335, "Faca", 1,
true, {0.000000, -30.00000, 0.000000, 2.200000}, "Arma
de corpo-a-corpo."},
{12, ITEM_TYPE_MELEEWEAPON, 334, "Cacetete", 1,
true, {0.000000, -30.00000, 0.000000, 1.500000}, "Arma
de corpo-a-corpo."},
{13, ITEM_TYPE_WEAPON, 352, "Uzi",
1, true, {0.000000, -30.00000, 0.000000, 1.200000},
"Micro metralhadora~n~de duas mãos.."},
{14, ITEM_TYPE_WEAPON, 347, "Usp",
1, true, {0.000000, -30.00000, 0.000000, 1.200000},
"Pistola com silenciador.~n~~n~~g~Headshot habilitado."},
{15, ITEM_TYPE_WEAPON, 353, "MP5",
1, true, {0.000000, -30.00000, 0.000000, 2.200000},
"Micro metralhadora."},
{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."},
{17, ITEM_TYPE_WEAPON, 342, "Granada",
5, true, {0.000000, 0.000000, 0.000000, 1.000000},
"Explosivo poderoso."},
{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."}
};
//-------------------------------------------------------------------//
//************************* -Variables- *****************************//
//-------------------------------------------------------------------//
new pInventory[MAX_PLAYERS][enum_pInventory];
new pCharacter[MAX_PLAYERS][enum_pCharacter];
new Player[MAX_PLAYERS][enum_Player];
new ItensWorld[MAX_ITENS_WORLD][enum_ItensWorld];
new String[256];
new LastItemID;
//-------------------------------------------------------------------//
//************************* -TextDraws- *****************************//
//-------------------------------------------------------------------//
new PlayerText:inventario_index[MAX_PLAYERS][15];
new PlayerText:inventario_skin[MAX_PLAYERS];
new PlayerText:inventario_textos[MAX_PLAYERS][11];
new PlayerText:inventario_description[MAX_PLAYERS][4];
new PlayerText:inventario_personagemindex[MAX_PLAYERS][7];
new PlayerText:inventario_mensagem[MAX_PLAYERS];
new Text:inventario_usar;
new Text:inventario_split[2];
new Text:inventario_drop[2];
new Text:inventario_close[2];
new Text:inventario_backgrounds[5];
new Text:inventario_remover;
//-------------------------------------------------------------------//
//********************** -FilterScript- *****************************//
//-------------------------------------------------------------------//
forward @TimerOneSecond();
forward HideMessageInventory(playerid);
forward Float:GetPlayerArmourEx(playerid);
public OnFilterScriptInit()
{
SetTimer("@TimerOneSecond", 1000, true);
LoadTextDraws();
LastItemID = 0;
return 1;
}
public OnPlayerConnect(playerid)
{
ResetVariables(playerid);
pInventory[playerid][invSelectedSlot] = -1;
pCharacter[playerid][charSelectedSlot] = -1;
Player[playerid][Language] = 2;
LoadPlayerTextDraws(playerid);
return 1;
}
ResetVariables(playerid);
return true;
}
public OnPlayerSpawn(playerid)
{
SetPlayerSkin(playerid, 292);
return true;
}
pInventory[playerid][invSelectedSlot] = -1;
UseItem(playerid, slot, Itens[pInventory[playerid][invSlot][slot]]
[item_id]);
}
else if(clickedid == inventario_split[0])
{
if(pInventory[playerid][invSelectedSlot] == -1)
return 0;
if(IsInventoryFull(playerid))
return ShowMessageInventory(playerid, Translate(Player[playerid]
[Language],
"~r~ERRO: ~w~Seu inventário está cheio.",
"~r~ERROR: ~w~Your inventory is full."));
if(pInventory[playerid][invSlotAmount][slot] == 1)
return ShowMessageInventory(playerid, Translate(Player[playerid]
[Language],
"~r~ERRO: ~w~Você não pode dividir esse item.",
"~r~ERROR: ~w~You can't divide this item."));
SplitItem(playerid, pInventory[playerid][invSelectedSlot]);
}
else if(clickedid == inventario_drop[0])
{
if(pInventory[playerid][invSelectedSlot] == -1)
return 0;
if(!Itens[itemid][item_canbedropped])
return ShowMessageInventory(playerid, Translate(Player[playerid]
[Language],
"~r~ERRO: ~w~Você não pode derrubar esse item.",
"~r~ERROR: ~w~You can't drop this item."));
if(itemid == 6)
DropItem(pos[0], pos[1], pos[2], itemid, amount, armourstatus);
else
DropItem(pos[0], pos[1], pos[2], itemid, amount);
RemoveItemFromInventory(playerid, slot);
for(new a = 0; a < 4; a++)
PlayerTextDrawHide(playerid, inventario_description[playerid]
[a]);
TextDrawHideForPlayer(playerid, inventario_backgrounds[4]);
pInventory[playerid][invSelectedSlot] = -1;
}
else if(clickedid == inventario_remover)
{
if(pCharacter[playerid][charSelectedSlot] == -1)
return 0;
if(IsInventoryFull(playerid))
return ShowMessageInventory(playerid, Translate(Player[playerid]
[Language],
"~r~ERRO: ~w~Seu inventário está cheio.",
"~r~ERROR: ~w~Your inventory is full."));
if(selected == 2)
if(GetSlotsInUse(playerid) > 5)
return ShowMessageInventory(playerid, Translate(Player[playerid]
[Language],
"~r~ERRO: ~w~Esvazie seu inventário.",
"~r~ERROR: ~w~Clean your inventory."));
if(selected == 2)
if(GetSlotsInUse(playerid) >= 5)
return ShowMessageInventory(playerid, Translate(Player[playerid]
[Language],
"~r~ERRO: ~w~Não tem espaço no seu inventário.",
"~r~ERROR: ~w~You don't have space in your inventory."));
if(selected == 1)
AddItem(playerid, pCharacter[playerid][charSlot][selected], 1,
pCharacter[playerid][charArmourStatus]);
else if(Itens[pCharacter[playerid][charSlot][selected]][item_id] == 5 ||
Itens[pCharacter[playerid][charSlot][selected]][item_id] == 17)
{
new weapons[13][2];
RemoveItemFromCharacter(playerid, selected);
pCharacter[playerid][charSelectedSlot] = -1;
}
return 1;
}
if(pInventory[playerid][invSelectedSlot] == i)
{
PlayerTextDrawBackgroundColor(playerid, inventario_index[playerid]
[i], 96);
pInventory[playerid][invSelectedSlot] = -1;
PlayerTextDrawHide(playerid, inventario_index[playerid][i]);
PlayerTextDrawShow(playerid, inventario_index[playerid]
[i]);
TextDrawHideForPlayer(playerid, inventario_backgrounds[4]);
TextDrawHideForPlayer(playerid, inventario_usar);
TextDrawHideForPlayer(playerid, inventario_split[0]);
TextDrawHideForPlayer(playerid, inventario_split[1]);
TextDrawHideForPlayer(playerid, inventario_drop[0]);
TextDrawHideForPlayer(playerid, inventario_drop[1]);
PlayerTextDrawHide(playerid, inventario_textos[playerid]
[9]);
break;
}
else if(pInventory[playerid][invSelectedSlot] != -1)
{
PlayerTextDrawBackgroundColor(playerid, inventario_index[playerid]
[pInventory[playerid][invSelectedSlot]], 96);
PlayerTextDrawHide(playerid, inventario_index[playerid]
[pInventory[playerid][invSelectedSlot]]);
PlayerTextDrawShow(playerid, inventario_index[playerid]
[pInventory[playerid][invSelectedSlot]]);
}
PlayerTextDrawBackgroundColor(playerid, inventario_index[playerid][i],
0xFFFFFF50);
PlayerTextDrawHide(playerid, inventario_index[playerid][i]);
PlayerTextDrawShow(playerid, inventario_index[playerid][i]);
// Descrição do Item
PlayerTextDrawSetPreviewModel(playerid,
inventario_description[playerid][0], Itens[pInventory[playerid][invSlot][i]]
[item_modelo]);
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]);
PlayerTextDrawShow(playerid, inventario_description[playerid][0]);
PlayerTextDrawSetString(playerid,
inventario_description[playerid][1], ConvertToGameText(Itens[pInventory[playerid]
[invSlot][i]][item_nome]));
PlayerTextDrawSetString(playerid,
inventario_description[playerid][2], ConvertToGameText(Itens[pInventory[playerid]
[invSlot][i]][item_description]));
if(Itens[pInventory[playerid][invSlot][i]][item_tipo] ==
ITEM_TYPE_BODY)
format(String, sizeof(String), "%s: %.1f",
Translate(Player[playerid][Language], "Durabilidade", "Durability"),
pInventory[playerid][invArmourStatus][i]);
else if(pInventory[playerid][invSlotAmount][i] > 1)
format(String, sizeof(String), "%s: %d",
Translate(Player[playerid][Language], "Quantidade", "Amount"), pInventory[playerid]
[invSlotAmount][i]);
else
String = " ";
PlayerTextDrawSetString(playerid,
inventario_description[playerid][3], String);
if(pInventory[playerid][invSelectedSlot] == -1)
{
TextDrawShowForPlayer(playerid, inventario_usar);
TextDrawShowForPlayer(playerid, inventario_split[0]);
TextDrawShowForPlayer(playerid, inventario_split[1]);
TextDrawShowForPlayer(playerid, inventario_drop[0]);
TextDrawShowForPlayer(playerid, inventario_drop[1]);
PlayerTextDrawShow(playerid, inventario_textos[playerid][9]);
TextDrawShowForPlayer(playerid, inventario_backgrounds[4]);
}
pInventory[playerid][invSelectedSlot] = i;
break;
}
if(pCharacter[playerid][charSelectedSlot] == i)
{
PlayerTextDrawBackgroundColor(playerid,
inventario_personagemindex[playerid][i], 96);
PlayerTextDrawHide(playerid, inventario_personagemindex[playerid]
[i]);
PlayerTextDrawShow(playerid,
inventario_personagemindex[playerid][i]);
pCharacter[playerid][charSelectedSlot] = -1;
PlayerTextDrawHide(playerid, inventario_textos[playerid]
[10]);
TextDrawHideForPlayer(playerid, inventario_remover);
break;
}
else if(pCharacter[playerid][charSelectedSlot] != -1)
{
new char_slot = pCharacter[playerid][charSelectedSlot];
PlayerTextDrawBackgroundColor(playerid,
inventario_personagemindex[playerid][char_slot], 96);
PlayerTextDrawHide(playerid, inventario_personagemindex[playerid]
[char_slot]);
PlayerTextDrawShow(playerid,
inventario_personagemindex[playerid][char_slot]);
}
PlayerTextDrawBackgroundColor(playerid,
inventario_personagemindex[playerid][i], 0xFFFFFF50);
PlayerTextDrawHide(playerid, inventario_personagemindex[playerid]
[i]);
PlayerTextDrawShow(playerid, inventario_personagemindex[playerid]
[i]);
if(pCharacter[playerid][charSelectedSlot] == -1)
{
PlayerTextDrawShow(playerid, inventario_textos[playerid]
[10]);
TextDrawShowForPlayer(playerid, inventario_remover);
}
pCharacter[playerid][charSelectedSlot] = i;
break;
}
return 1;
}
if(ammu_slot == -1)
{
for(new s = 3; s < 7; s ++)
if(Itens[pCharacter[playerid][charSlot][s]][item_tipo] !=
ITEM_TYPE_MELEEWEAPON)
if(pCharacter[playerid][charSlot][s] != 0)
{
AddItem(playerid, pCharacter[playerid][charSlot][s],
1);
RemoveItemFromCharacter(playerid, s);
}
return false;
}
pInventory[playerid][invSlotAmount][GetAmmunationSlot(playerid)] --;
SetPlayerAmmo(playerid, weaponid, GetAmmunation(playerid));
if(GetAmmunation(playerid) <= 0)
for(new s = 3; s < 7; s ++)
if(Itens[pCharacter[playerid][charSlot][s]][item_tipo] !=
ITEM_TYPE_MELEEWEAPON)
if(pCharacter[playerid][charSlot][s] != 0)
{
AddItem(playerid, pCharacter[playerid][charSlot][s],
1);
RemoveItemFromCharacter(playerid, s);
valid_shot = false;
}
if(pInventory[playerid][invSlotAmount][ammu_slot] <= 0)
RemoveItemFromInventory(playerid, ammu_slot);
if(valid_shot == false)
return false;
return true;
}
public OnPlayerKeyStateChange(playerid,newkeys,oldkeys)
{
if(newkeys == KEY_NO)
if(!Player[playerid][inInventory])
ShowInventory(playerid);
if(newkeys == KEY_WALK)
for(new i = 0; i < MAX_ITENS_WORLD; i++)
{
if(ItensWorld[i][world_active])
{
if(IsPlayerInRangeOfPoint(playerid, 2.0, ItensWorld[i]
[world_position][0], ItensWorld[i][world_position][1], ItensWorld[i]
[world_position][2]))
{
new bool:sucess = false;
if(!IsInventoryFull(playerid))
{
AddItem(playerid, ItensWorld[i][world_itemid],
ItensWorld[i][world_amount], ItensWorld[i][world_armourstatus]);
DeleteItemWorld(i);
sucess = true;
}
if(!sucess)
for(new a = 0; a < GetSlotsInventory(playerid); a ++)
if(pInventory[playerid][invSlot][a] ==
ItensWorld[i][world_itemid])
if(Itens[ItensWorld[i][world_itemid]]
[item_limite] >= ItensWorld[i][world_amount]+pInventory[playerid][invSlotAmount]
[a])
{
AddItem(playerid, ItensWorld[i]
[world_itemid], ItensWorld[i][world_amount], ItensWorld[i][world_armourstatus]);
DeleteItemWorld(i);
sucess = true;
break;
}
if(!sucess)
ShowMessageInventory(playerid,
Translate(Player[playerid][Language],
"~r~ERRO: ~w~Seu inventário está cheio.",
"~r~ERROR: ~w~Your inventory is full."));
break;
}
}
}
return true;
}
return true;
}
public OnPlayerUpdate(playerid)
{
new weapons[13][2];
new bool:have_fuzil = false;
if(pCharacter[playerid][charSlot][s] == 3 || pCharacter[playerid]
[charSlot][s] == 9)
{
new weaponid = GetWeaponIDFromModel(Itens[pCharacter[playerid]
[charSlot][s]][item_modelo]);
if(GetPlayerWeapon(playerid) != weaponid)
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);
else
RemovePlayerAttachedObject(playerid, 3);
have_fuzil = true;
}
if(GetPlayerWeapon(playerid) != weaponid)
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);
else
RemovePlayerAttachedObject(playerid, 3);
}
if(pCharacter[playerid][charSlot][s] == 10)
{
new weaponid = GetWeaponIDFromModel(Itens[pCharacter[playerid]
[charSlot][s]][item_modelo]);
if(GetPlayerWeapon(playerid) != weaponid)
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);
else
RemovePlayerAttachedObject(playerid, 4);
}
if(pCharacter[playerid][charSlot][s] == 2)
{
new weaponid = GetWeaponIDFromModel(Itens[pCharacter[playerid]
[charSlot][s]][item_modelo]);
if(GetPlayerWeapon(playerid) != weaponid)
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);
else
RemovePlayerAttachedObject(playerid, 5);
}
if(GetPlayerWeapon(playerid) != weaponid)
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);
else
RemovePlayerAttachedObject(playerid, 6);
}
}
return true;
}
//----------------------------------------------------------
@TimerOneSecond()
{
for(new i = 0; i < MAX_ITENS_WORLD; i++)
if(ItensWorld[i][world_active])
{
ItensWorld[i][world_timer]--;
if(ItensWorld[i][world_timer] == 0)
DeleteItemWorld(i);
}
//----------------------------------------------------------
if(Player[playerid][inInventory])
{
PlayerTextDrawSetPreviewModel(playerid,
inventario_index[playerid][a], Itens[itemid][item_modelo]);
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]);
PlayerTextDrawHide(playerid,
inventario_index[playerid][a]);
PlayerTextDrawShow(playerid,
inventario_index[playerid][a]);
}
break;
}
}
}
else
{
pInventory[playerid][invSlotAmount][i] += amount;
if(Player[playerid][inInventory])
{
if(pInventory[playerid][invSelectedSlot] == i)
{
if(pInventory[playerid][invSlotAmount][i] > 1)
format(String, sizeof(String), "%s: %d",
Translate(Player[playerid][Language], "Quantidade", "Amount"), pInventory[playerid]
[invSlotAmount][i]);
else
String = " ";
PlayerTextDrawSetString(playerid,
inventario_description[playerid][3], String);
PlayerTextDrawHide(playerid,
inventario_description[playerid][3]);
PlayerTextDrawShow(playerid,
inventario_description[playerid][3]);
}
}
}
sucess = true;
break;
}
}
if(sucess)
return true;
if(itemid == 6)
pInventory[playerid][invArmourStatus][i] = armorstatus;
if(Player[playerid][inInventory])
{
PlayerTextDrawSetPreviewModel(playerid,
inventario_index[playerid][i], Itens[itemid][item_modelo]);
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]);
PlayerTextDrawHide(playerid, inventario_index[playerid][i]);
PlayerTextDrawShow(playerid, inventario_index[playerid][i]);
}
break;
}
}
return true;
}
//----------------------------------------------------------
pInventory[playerid][invSlot][i] = pInventory[playerid][invSlot][slot];
pInventory[playerid][invSlotAmount][i] = result;
PlayerTextDrawHide(playerid, inventario_index[playerid][i]);
PlayerTextDrawSetPreviewModel(playerid, inventario_index[playerid][i],
Itens[pInventory[playerid][invSlot][i]][item_modelo]);
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]);
PlayerTextDrawShow(playerid, inventario_index[playerid][i]);
if(pInventory[playerid][invSlotAmount][slot] > 1)
format(String, sizeof(String), "%s: %d",
Translate(Player[playerid][Language], "Quantidade", "Amount"), pInventory[playerid]
[invSlotAmount][slot]);
else
String = " ";
PlayerTextDrawSetString(playerid,
inventario_description[playerid][3], String);
PlayerTextDrawHide(playerid, inventario_description[playerid]
[3]);
PlayerTextDrawShow(playerid, inventario_description[playerid]
[3]);
break;
}
}
//----------------------------------------------------------
new weapons[13][2];
new bool:have_slot;
if(pCharacter[playerid][charSlot][i] == 0)
{
AddItemCharacter(playerid, i, item, pInventory[playerid]
[invSlotAmount][slot]);
RemoveItemFromInventory(playerid, slot);
have_slot = true;
break;
}
}
if(!have_slot)
{
pInventory[playerid][invSelectedSlot] = slot;
ShowMessageInventory(playerid, Translate(Player[playerid]
[Language],
"~r~ERRO: ~w~Não é possivel equipar mais armas.",
"~r~ERROR: ~w~It's not possible to equip more weapons."));
return true;
}
}
else if(Itens[item][item_tipo] == ITEM_TYPE_BODY)
{
if(pCharacter[playerid][charSlot][1] == 0)
{
AddItemCharacter(playerid, 1, item, 0, pInventory[playerid]
[invArmourStatus][slot]);
RemoveItemFromInventory(playerid, slot);
}
else
{
RemoveItemFromInventory(playerid, slot);
AddItem(playerid, pCharacter[playerid][charSlot][1], 1);
RemoveItemFromCharacter(playerid, 1);
AddItemCharacter(playerid, 1, item);
}
}
else if(Itens[item][item_tipo] == ITEM_TYPE_BACKPACK)
{
if(pCharacter[playerid][charSlot][2] == 0)
{
AddItemCharacter(playerid, 2, item);
RemoveItemFromInventory(playerid, slot);
}
else
{
RemoveItemFromInventory(playerid, slot);
AddItem(playerid, pCharacter[playerid][charSlot][2], 1);
RemoveItemFromCharacter(playerid, 2);
AddItemCharacter(playerid, 2, item);
}
OrganizeInventory(playerid);
PlayerTextDrawShow(playerid, inventario_index[playerid][i]);
}
}
else if(Itens[item][item_tipo] == ITEM_TYPE_AMMO)
{
pInventory[playerid][invSelectedSlot] = slot;
return true;
}
else if(Itens[item][item_tipo] == ITEM_TYPE_NORMAL)
{
if(item == 18) // Medic Kit
{
SetPlayerHealth(playerid, 100.0);
RemoveItemFromInventory(playerid, slot, 1);
}
}
if(Player[playerid][inInventory])
{
for(new a = 0; a < 4; a++)
PlayerTextDrawHide(playerid, inventario_description[playerid]
[a]);
TextDrawHideForPlayer(playerid, inventario_backgrounds[4]);
TextDrawHideForPlayer(playerid, inventario_usar);
TextDrawHideForPlayer(playerid, inventario_split[0]);
TextDrawHideForPlayer(playerid, inventario_split[1]);
TextDrawHideForPlayer(playerid, inventario_drop[0]);
TextDrawHideForPlayer(playerid, inventario_drop[1]);
PlayerTextDrawHide(playerid, inventario_textos[playerid][9]);
}
return true;
}
//----------------------------------------------------------
switch(GetPlayerSkin(playerid))
{
case 292:
SetPlayerAttachedObject(playerid, 1, 19142, 1,
0.103999,0.034999,0.001000,0.000000,0.000000,0.000000,1.000000,1.000000,1.000000);
}
}
else if(Itens[itemid][item_tipo] == ITEM_TYPE_BACKPACK)
{
switch(GetPlayerSkin(playerid))
{
case 292:
SetPlayerAttachedObject(playerid, 2, 3026,1,-0.129000,-
0.078999,-0.003999,0.000000,0.000000,0.000000,1.000000,1.000000,1.000000);
}
}
pCharacter[playerid][charSlot][slot] = itemid;
PlayerPlaySound(playerid,1052,0.0,0.0,0.0);
if(Player[playerid][inInventory])
{
PlayerTextDrawSetPreviewModel(playerid,
inventario_personagemindex[playerid][slot], Itens[itemid][item_modelo]);
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]);
PlayerTextDrawHide(playerid, inventario_personagemindex[playerid][slot]);
PlayerTextDrawShow(playerid, inventario_personagemindex[playerid]
[slot]);
}
}
//----------------------------------------------------------
if(amount == 0)
{
pInventory[playerid][invSlot][slot] = 0;
pInventory[playerid][invSlotAmount][slot] = 0;
}
else
{
pInventory[playerid][invSlotAmount][slot] -= amount;
if(pInventory[playerid][invSlotAmount][slot] == 0)
pInventory[playerid][invSlot][slot] = 0;
if(Player[playerid][inInventory])
{
PlayerTextDrawSetPreviewModel(playerid, inventario_index[playerid][slot],
Itens[pInventory[playerid][invSlot][slot]][item_modelo]);
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]);
PlayerTextDrawBackgroundColor(playerid, inventario_index[playerid][slot],
96);
PlayerTextDrawHide(playerid, inventario_index[playerid][slot]);
PlayerTextDrawShow(playerid, inventario_index[playerid][slot]);
}
}
//----------------------------------------------------------
pCharacter[playerid][charSlot][slot] = 0;
if(itemid == 3 || itemid == 9)
if(IsPlayerAttachedObjectSlotUsed(playerid, 3))
RemovePlayerAttachedObject(playerid, 3);
if(itemid == 10)
if(IsPlayerAttachedObjectSlotUsed(playerid, 4))
RemovePlayerAttachedObject(playerid, 4);
if(itemid == 2)
if(IsPlayerAttachedObjectSlotUsed(playerid, 5))
RemovePlayerAttachedObject(playerid, 5);
}
else if(Itens[pCharacter[playerid][charSlot][slot]][item_tipo] ==
ITEM_TYPE_MELEEWEAPON)
{
new modelid = Itens[pCharacter[playerid][charSlot][slot]][item_modelo];
RemovePlayerWeapon(playerid, GetWeaponIDFromModel(modelid));
if(IsPlayerAttachedObjectSlotUsed(playerid, 6))
RemovePlayerAttachedObject(playerid, 6);
}
if(slot == 0) // Helmet
{
RemovePlayerAttachedObject(playerid, 0);
}
else if(slot == 1) // Armour
{
RemovePlayerAttachedObject(playerid, 1);
SetPlayerArmour(playerid, 0);
pCharacter[playerid][charArmourStatus] = 0.0;
}
else if(slot == 2) // Backpack
{
RemovePlayerAttachedObject(playerid, 2);
pCharacter[playerid][charSlot][slot] = 0;
PlayerTextDrawShow(playerid, inventario_index[playerid][i]);
}
}
pCharacter[playerid][charSlot][slot] = 0;
PlayerPlaySound(playerid,1053,0.0,0.0,0.0);
if(Player[playerid][inInventory])
{
PlayerTextDrawSetPreviewModel(playerid,
inventario_personagemindex[playerid][slot], Itens[0][item_modelo]);
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]);
PlayerTextDrawBackgroundColor(playerid,
inventario_personagemindex[playerid][slot], 96);
PlayerTextDrawHide(playerid, inventario_personagemindex[playerid][slot]);
PlayerTextDrawShow(playerid, inventario_personagemindex[playerid]
[slot]);
PlayerTextDrawHide(playerid, inventario_textos[playerid][10]);
TextDrawHideForPlayer(playerid, inventario_remover);
}
}
//----------------------------------------------------------
if(itemid == 6)
ItensWorld[LastItemID][world_armourstatus] = armourstatus;
ItensWorld[LastItemID][world_object] = CreateObject(ItensWorld[LastItemID]
[world_model], x, y, z-0.90, -90,0,0);
if(amount > 1)
format(String, sizeof(String), "%s (%d)", Itens[itemid][item_nome],
amount);
else
format(String, sizeof(String), "%s", Itens[itemid][item_nome]);
ItensWorld[LastItemID][world_active] = true;
if(LastItemID == MAX_ITENS_WORLD-1)
LastItemID = 0;
else
LastItemID++;
}
//----------------------------------------------------------
stock DeleteItemWorld(worlditemid)
{
ItensWorld[worlditemid][world_active] = false;
DestroyObject(ItensWorld[worlditemid][world_object]);
Delete3DTextLabel(ItensWorld[worlditemid][world_3dtext]);
}
//----------------------------------------------------------
if(!sucess)
return false;
else
return true;
}
//----------------------------------------------------------
stock GetSlotsFree(playerid)
{
new count = 0;
return count;
}
//----------------------------------------------------------
stock GetSlotsInUse(playerid)
{
new count = 0;
return count;
}
//----------------------------------------------------------
stock IsInventoryFull(playerid)
{
for(new i = 0; i < GetSlotsInventory(playerid); i ++)
if(pInventory[playerid][invSlot][i] == 0)
return false;
return true;
}
//----------------------------------------------------------
stock GetSlotsInventory(playerid)
{
new slots;
if(pCharacter[playerid][charSlot][2] == 0)
slots = 5;
else if(pCharacter[playerid][charSlot][2] == 7)
slots = 10;
else if(pCharacter[playerid][charSlot][2] == 8)
slots = 15;
return slots;
}
//----------------------------------------------------------
stock GetAmmunation(playerid)
{
new total;
return total;
}
//----------------------------------------------------------
stock GetAmmunationSlot(playerid)
{
new slot = -1;
return slot;
}
//----------------------------------------------------------
stock OrganizeInventory(playerid)
{
for(new i = 0; i < MAX_INVENTORY_SLOTS; i++)
if(pInventory[playerid][invSlot][i] != 0)
for(new a = 0; a < MAX_INVENTORY_SLOTS; a++)
if(pInventory[playerid][invSlot][a] == 0)
{
pInventory[playerid][invSlot][a] = pInventory[playerid]
[invSlot][i];
pInventory[playerid][invSlotAmount][a] =
pInventory[playerid][invSlotAmount][i];
pInventory[playerid][invArmourStatus][a] = pInventory[playerid]
[invArmourStatus][i];
pInventory[playerid][invSlot][i] = 0;
pInventory[playerid][invSlotAmount][i] = 0;
pInventory[playerid][invArmourStatus][i] = 0;
}
}
//----------------------------------------------------------
stock GetWeaponSlot(weaponid)
{
new slot;
switch(weaponid)
{
case 0,1: slot = 0;
case 2 .. 9: slot = 1;
case 10 .. 15: slot = 10;
case 16 .. 18, 39: slot = 8;
case 22 .. 24: slot =2;
case 25 .. 27: slot = 3;
case 28, 29, 32: slot = 4;
case 30, 31: slot = 5;
case 33, 34: slot = 6;
case 35 .. 38: slot = 7;
case 40: slot = 12;
case 41 .. 43: slot = 9;
case 44 .. 46: slot = 11;
}
return slot;
}
//----------------------------------------------------------
stock ShowInventory(playerid)
{
Player[playerid][inInventory] = true;
SelectTextDraw(playerid, 0xFFFFFFFF);
// Globais
TextDrawShowForPlayer(playerid, inventario_close[0]);
TextDrawShowForPlayer(playerid, inventario_close[1]);
// Player
PlayerTextDrawShow(playerid, inventario_index[playerid][i]);
}
PlayerTextDrawSetString(playerid, inventario_textos[playerid][0],
Translate(Player[playerid][Language], "Personagem", "Character"));
PlayerTextDrawSetString(playerid, inventario_textos[playerid][1],
Translate(Player[playerid][Language], ConvertToGameText("Seu Inventário"), "Your
Inventory"));
PlayerTextDrawSetString(playerid, inventario_textos[playerid][2],
Translate(Player[playerid][Language], ConvertToGameText("Cabeça"), "Head"));
PlayerTextDrawSetString(playerid, inventario_textos[playerid][3],
Translate(Player[playerid][Language], "Mochila", "Backpack"));
PlayerTextDrawSetString(playerid, inventario_textos[playerid][4],
Translate(Player[playerid][Language], "Corpo", "Body"));
PlayerTextDrawSetString(playerid, inventario_textos[playerid][5],
Translate(Player[playerid][Language], "Arma", "Weapon"));
PlayerTextDrawSetString(playerid, inventario_textos[playerid][6],
Translate(Player[playerid][Language], "Arma", "Weapon"));
PlayerTextDrawSetString(playerid, inventario_textos[playerid][7],
Translate(Player[playerid][Language], "Arma", "Weapon"));
PlayerTextDrawSetString(playerid, inventario_textos[playerid][8],
Translate(Player[playerid][Language], "Arma", "Weapon"));
PlayerTextDrawSetString(playerid, inventario_textos[playerid][9],
Translate(Player[playerid][Language], "Usar", "Use"));
PlayerTextDrawSetPreviewModel(playerid,
inventario_personagemindex[playerid][i], Itens[char_slot][item_modelo]);
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]);
PlayerTextDrawBackgroundColor(playerid,
inventario_personagemindex[playerid][i], 96);
PlayerTextDrawShow(playerid, inventario_personagemindex[playerid][i]);
}
PlayerTextDrawSetPreviewModel(playerid, inventario_skin[playerid],
GetPlayerSkin(playerid));
PlayerTextDrawShow(playerid, inventario_skin[playerid]);
}
//----------------------------------------------------------
stock HideInventory(playerid)
{
TextDrawHideForPlayer(playerid, inventario_usar);
TextDrawHideForPlayer(playerid, inventario_split[0]);
TextDrawHideForPlayer(playerid, inventario_split[1]);
TextDrawHideForPlayer(playerid, inventario_drop[0]);
TextDrawHideForPlayer(playerid, inventario_drop[1]);
TextDrawHideForPlayer(playerid, inventario_close[0]);
TextDrawHideForPlayer(playerid, inventario_close[1]);
PlayerTextDrawHide(playerid, inventario_skin[playerid]);
TextDrawHideForPlayer(playerid, inventario_remover);
TextDrawHideForPlayer(playerid, inventario_backgrounds[4]);
pInventory[playerid][invSelectedSlot] = -1;
pCharacter[playerid][charSelectedSlot] = -1;
Player[playerid][inInventory] = false;
CancelSelectTextDraw(playerid);
}
//----------------------------------------------------------
stock GetWeaponIDFromModel(modelid)
{
new idweapon;
switch(modelid)
{
case 331: idweapon = 1; // Brass Knuckles
case 333: idweapon = 2; // Golf Club
case 334: idweapon = 3; // Nightstick
case 335: idweapon = 4; // Knife
case 336: idweapon = 5; // Baseball Bat
case 337: idweapon = 6; // Shovel
case 338: idweapon = 7; // Pool Cue
case 339: idweapon = 8; // Katana
case 341: idweapon = 9; // Chainsaw
case 321: idweapon = 10; // Double-ended Dildo
case 325: idweapon = 14; // Flowers
case 326: idweapon = 15; // Cane
case 342: idweapon = 16; // Grenade
case 343: idweapon = 17; // Tear Gas
case 344: idweapon = 18; // Molotov Cocktail
case 346: idweapon = 22; // 9mm
case 347: idweapon = 23; // Silenced 9mm
case 348: idweapon = 24; // Desert Eagle
case 349: idweapon = 25; // Shotgun
case 350: idweapon = 26; // Sawnoff
case 351: idweapon = 27; // Combat Shotgun
case 352: idweapon = 28; // Micro SMG/Uzi
case 353: idweapon = 29; // MP5
case 355: idweapon = 30; // AK-47
case 356: idweapon = 31; // M4
case 372: idweapon = 32; // Tec-9
case 357: idweapon = 33; // Country Rifle
case 358: idweapon = 34; // Sniper Rifle
case 359: idweapon = 35; // RPG
case 360: idweapon = 36; // HS Rocket
case 361: idweapon = 37; // Flamethrower
case 362: idweapon = 38; // Minigun
case 363: idweapon = 39;// Satchel Charge + Detonator
case 365: idweapon = 41; // Spraycan
case 366: idweapon = 42; // Fire Extinguisher
}
return idweapon;
}
//----------------------------------------------------------
if(wep != weaponid)
{
GetPlayerWeaponData(playerid, slot, plyWeapons[slot],
plyAmmo[slot]);
}
}
ResetPlayerWeapons(playerid);
for(new slot = 0; slot != 12; slot++)
{
GivePlayerWeapon(playerid, plyWeapons[slot], plyAmmo[slot]);
}
}
//----------------------------------------------------------
public Float:GetPlayerArmourEx(playerid)
{
new Float:pColete;
GetPlayerArmour(playerid, pColete);
return Float:pColete;
}
//----------------------------------------------------------
PlayerTextDrawSetString(playerid, inventario_mensagem[playerid],
ConvertToGameText(string));
PlayerTextDrawShow(playerid, inventario_mensagem[playerid]);
Player[playerid][MessageInventory] = true;
Player[playerid][MessageInventoryTimer] = SetTimerEx("HideMessageInventory",
time, false, "d", playerid);
return true;
}
//----------------------------------------------------------
public HideMessageInventory(playerid)
{
if (!Player[playerid][MessageInventory])
return 0;
Player[playerid][MessageInventory] = false;
return PlayerTextDrawHide(playerid, inventario_mensagem[playerid]);
}
//----------------------------------------------------------
stock ConvertToGameText(in[])
{
new string[256];
for(new i = 0; in[i]; ++i)
{
string[i] = in[i];
switch(string[i])
{
case 0xC0 .. 0xC3: string[i] -= 0x40;
case 0xC7 .. 0xC9: string[i] -= 0x42;
case 0xD2 .. 0xD5: string[i] -= 0x44;
case 0xD9 .. 0xDC: string[i] -= 0x47;
case 0xE0 .. 0xE3: string[i] -= 0x49;
case 0xE7 .. 0xEF: string[i] -= 0x4B;
case 0xF2 .. 0xF5: string[i] -= 0x4D;
case 0xF9 .. 0xFC: string[i] -= 0x50;
case 0xC4, 0xE4: string[i] = 0x83;
case 0xC6, 0xE6: string[i] = 0x84;
case 0xD6, 0xF6: string[i] = 0x91;
case 0xD1, 0xF1: string[i] = 0xEC;
case 0xDF: string[i] = 0x96;
case 0xBF: string[i] = 0xAF;
}
}
return string;
}
//----------------------------------------------------------
stock ResetVariables(playerid)
{
// Inventory
pInventory[playerid][invSelectedSlot] = 0;
// Character
pCharacter[playerid][charArmourStatus] = 0;
pCharacter[playerid][charSelectedSlot] = 0;
// Player
//----------------------------------------------------------
if(language == 1)
format(string, sizeof(string), text_PT);
else if(language == 2)
format(string, sizeof(string), text_EN);
return string;
}
//----------------------------------------------------------
CMD:additem(playerid, params[])
{
new
id, item, amount;
//----------------------------------------------------------
stock LoadTextDraws()
{
inventario_backgrounds[0] = TextDrawCreate(63.900207, 120.000030, "box");
TextDrawLetterSize(inventario_backgrounds[0], 0.000000, 28.450004);
TextDrawTextSize(inventario_backgrounds[0], 308.250335, 0.000000);
TextDrawAlignment(inventario_backgrounds[0], 1);
TextDrawColor(inventario_backgrounds[0], -1);
TextDrawUseBox(inventario_backgrounds[0], 1);
TextDrawBoxColor(inventario_backgrounds[0], 128);
TextDrawSetShadow(inventario_backgrounds[0], 0);
TextDrawSetOutline(inventario_backgrounds[0], 0);
TextDrawBackgroundColor(inventario_backgrounds[0], 255);
TextDrawFont(inventario_backgrounds[0], 2);
TextDrawSetProportional(inventario_backgrounds[0], 1);
TextDrawSetShadow(inventario_backgrounds[0], 0);
//----------------------------------------------------------
LoadPlayerTextDraws(playerid)
{
inventario_index[playerid][0] = CreatePlayerTextDraw(playerid, 315.500152,
150.692352, "");
PlayerTextDrawLetterSize(playerid, inventario_index[playerid][0], 0.000000,
0.000000);
PlayerTextDrawTextSize(playerid, inventario_index[playerid][0], 46.000000,
45.000000);
PlayerTextDrawAlignment(playerid, inventario_index[playerid][0], 1);
PlayerTextDrawColor(playerid, inventario_index[playerid][0], -1);
PlayerTextDrawSetShadow(playerid, inventario_index[playerid][0], 0);
PlayerTextDrawSetOutline(playerid, inventario_index[playerid][0], 0);
PlayerTextDrawBackgroundColor(playerid, inventario_index[playerid][0], 96);
PlayerTextDrawFont(playerid, inventario_index[playerid][0], 5);
PlayerTextDrawSetProportional(playerid, inventario_index[playerid][0], 0);
PlayerTextDrawSetShadow(playerid, inventario_index[playerid][0], 0);
PlayerTextDrawSetSelectable(playerid, inventario_index[playerid][0], true);
PlayerTextDrawSetPreviewModel(playerid, inventario_index[playerid][0],
19382);
PlayerTextDrawSetPreviewRot(playerid, inventario_index[playerid][0],
0.000000, -30, 0.000000, 2.2);
inventario_description[playerid][0] = CreatePlayerTextDraw(playerid,
317.699981, 314.833312, "");
PlayerTextDrawLetterSize(playerid, inventario_description[playerid][0],
0.000000, 0.000000);
PlayerTextDrawTextSize(playerid, inventario_description[playerid][0],
65.000000, 56.000000);
PlayerTextDrawAlignment(playerid, inventario_description[playerid][0], 1);
PlayerTextDrawColor(playerid, inventario_description[playerid][0], -1);
PlayerTextDrawSetShadow(playerid, inventario_description[playerid][0], 0);
PlayerTextDrawSetOutline(playerid, inventario_description[playerid][0], 0);
PlayerTextDrawBackgroundColor(playerid, inventario_description[playerid][0],
-208);
PlayerTextDrawFont(playerid, inventario_description[playerid][0], 5);
PlayerTextDrawSetProportional(playerid, inventario_description[playerid][0],
0);
PlayerTextDrawSetShadow(playerid, inventario_description[playerid][0], 0);
PlayerTextDrawSetPreviewModel(playerid, inventario_description[playerid][0],
18645);
PlayerTextDrawSetPreviewRot(playerid, inventario_description[playerid][0],
0.000000, 0.000000, 0.000000, 1.000000);
PlayerTextDrawSetSelectable(playerid, inventario_description[playerid][0],
true);
inventario_description[playerid][1] = CreatePlayerTextDraw(playerid,
388.099884, 314.099884, "CAPACETE");
PlayerTextDrawLetterSize(playerid, inventario_description[playerid][1],
0.290499, 1.226665);
PlayerTextDrawAlignment(playerid, inventario_description[playerid][1], 1);
PlayerTextDrawColor(playerid, inventario_description[playerid][1], -1);
PlayerTextDrawSetShadow(playerid, inventario_description[playerid][1], 0);
PlayerTextDrawSetOutline(playerid, inventario_description[playerid][1], 0);
PlayerTextDrawBackgroundColor(playerid, inventario_description[playerid][1],
255);
PlayerTextDrawFont(playerid, inventario_description[playerid][1], 2);
PlayerTextDrawSetProportional(playerid, inventario_description[playerid][1],
1);
PlayerTextDrawSetShadow(playerid, inventario_description[playerid][1], 0);
inventario_description[playerid][2] = CreatePlayerTextDraw(playerid,
388.699920, 330.400878, "PROTEGE_CONTRA_HEADSHOTS");
PlayerTextDrawLetterSize(playerid, inventario_description[playerid][2],
0.157499, 0.882498);
PlayerTextDrawAlignment(playerid, inventario_description[playerid][2], 1);
PlayerTextDrawColor(playerid, inventario_description[playerid][2], -
168430192);
PlayerTextDrawSetShadow(playerid, inventario_description[playerid][2], 0);
PlayerTextDrawSetOutline(playerid, inventario_description[playerid][2], 0);
PlayerTextDrawBackgroundColor(playerid, inventario_description[playerid][2],
255);
PlayerTextDrawFont(playerid, inventario_description[playerid][2], 2);
PlayerTextDrawSetProportional(playerid, inventario_description[playerid][2],
1);
PlayerTextDrawSetShadow(playerid, inventario_description[playerid][2], 0);
inventario_description[playerid][3] = CreatePlayerTextDraw(playerid,
499.401489, 363.984985, "QUANTIDADE:_1");
PlayerTextDrawLetterSize(playerid, inventario_description[playerid][3],
0.157499, 0.882498);
PlayerTextDrawAlignment(playerid, inventario_description[playerid][3], 3);
PlayerTextDrawColor(playerid, inventario_description[playerid][3], -
168430208);
PlayerTextDrawSetShadow(playerid, inventario_description[playerid][3], 0);
PlayerTextDrawSetOutline(playerid, inventario_description[playerid][3], 0);
PlayerTextDrawBackgroundColor(playerid, inventario_description[playerid][3],
255);
PlayerTextDrawFont(playerid, inventario_description[playerid][3], 2);
PlayerTextDrawSetProportional(playerid, inventario_description[playerid][3],
1);
PlayerTextDrawSetShadow(playerid, inventario_description[playerid][3], 0);
inventario_personagemindex[playerid][0] = CreatePlayerTextDraw(playerid,
231.000305, 153.250015, "");
PlayerTextDrawLetterSize(playerid, inventario_personagemindex[playerid][0],
0.000000, 0.000000);
PlayerTextDrawTextSize(playerid, inventario_personagemindex[playerid][0],
33.000000, 32.000000);
PlayerTextDrawAlignment(playerid, inventario_personagemindex[playerid][0],
1);
PlayerTextDrawColor(playerid, inventario_personagemindex[playerid][0], -1);
PlayerTextDrawSetShadow(playerid, inventario_personagemindex[playerid][0],
0);
PlayerTextDrawSetOutline(playerid, inventario_personagemindex[playerid][0],
0);
PlayerTextDrawBackgroundColor(playerid, inventario_personagemindex[playerid]
[0], 112);
PlayerTextDrawFont(playerid, inventario_personagemindex[playerid][0], 5);
PlayerTextDrawSetProportional(playerid, inventario_personagemindex[playerid]
[0], 0);
PlayerTextDrawSetShadow(playerid, inventario_personagemindex[playerid][0],
0);
PlayerTextDrawSetPreviewModel(playerid, inventario_personagemindex[playerid]
[0], 18645);
PlayerTextDrawSetPreviewRot(playerid, inventario_personagemindex[playerid]
[0], 0.000000, 0.000000, 0.000000, 1.000000);
PlayerTextDrawSetSelectable(playerid, inventario_personagemindex[playerid][0],
true);
inventario_personagemindex[playerid][1] = CreatePlayerTextDraw(playerid,
110.600074, 189.283264, "");
PlayerTextDrawLetterSize(playerid, inventario_personagemindex[playerid][1],
0.000000, 0.000000);
PlayerTextDrawTextSize(playerid, inventario_personagemindex[playerid][1],
33.000000, 32.000000);
PlayerTextDrawAlignment(playerid, inventario_personagemindex[playerid][1],
1);
PlayerTextDrawColor(playerid, inventario_personagemindex[playerid][1], -1);
PlayerTextDrawSetShadow(playerid, inventario_personagemindex[playerid][1],
0);
PlayerTextDrawSetOutline(playerid, inventario_personagemindex[playerid][1],
0);
PlayerTextDrawBackgroundColor(playerid, inventario_personagemindex[playerid]
[1], 112);
PlayerTextDrawFont(playerid, inventario_personagemindex[playerid][1], 5);
PlayerTextDrawSetProportional(playerid, inventario_personagemindex[playerid]
[1], 0);
PlayerTextDrawSetShadow(playerid, inventario_personagemindex[playerid][1],
0);
PlayerTextDrawSetSelectable(playerid, inventario_personagemindex[playerid]
[1], true);
PlayerTextDrawSetPreviewModel(playerid, inventario_personagemindex[playerid]
[1], 18645);
PlayerTextDrawSetPreviewRot(playerid, inventario_personagemindex[playerid]
[1], 0.000000, 0.000000, 0.000000, 1.000000);
inventario_personagemindex[playerid][2] = CreatePlayerTextDraw(playerid,
230.500000, 198.749984, "");
PlayerTextDrawLetterSize(playerid, inventario_personagemindex[playerid][2],
0.000000, 0.000000);
PlayerTextDrawTextSize(playerid, inventario_personagemindex[playerid][2],
33.000000, 36.000000);
PlayerTextDrawAlignment(playerid, inventario_personagemindex[playerid][2],
1);
PlayerTextDrawColor(playerid, inventario_personagemindex[playerid][2], -1);
PlayerTextDrawSetShadow(playerid, inventario_personagemindex[playerid][2],
0);
PlayerTextDrawSetOutline(playerid, inventario_personagemindex[playerid][2],
0);
PlayerTextDrawBackgroundColor(playerid, inventario_personagemindex[playerid]
[2], 112);
PlayerTextDrawFont(playerid, inventario_personagemindex[playerid][2], 5);
PlayerTextDrawSetProportional(playerid, inventario_personagemindex[playerid]
[2], 0);
PlayerTextDrawSetShadow(playerid, inventario_personagemindex[playerid][2],
0);
PlayerTextDrawSetSelectable(playerid, inventario_personagemindex[playerid]
[2], true);
PlayerTextDrawSetPreviewModel(playerid, inventario_personagemindex[playerid]
[2], 18645);
PlayerTextDrawSetPreviewRot(playerid, inventario_personagemindex[playerid]
[2], 0.000000, 0.000000, 0.000000, 1.000000);
inventario_personagemindex[playerid][3] = CreatePlayerTextDraw(playerid,
110.400032, 242.366851, "");
PlayerTextDrawLetterSize(playerid, inventario_personagemindex[playerid][3],
0.000000, 0.000000);
PlayerTextDrawTextSize(playerid, inventario_personagemindex[playerid][3],
33.000000, 36.000000);
PlayerTextDrawAlignment(playerid, inventario_personagemindex[playerid][3],
1);
PlayerTextDrawColor(playerid, inventario_personagemindex[playerid][3], -1);
PlayerTextDrawSetShadow(playerid, inventario_personagemindex[playerid][3],
0);
PlayerTextDrawSetOutline(playerid, inventario_personagemindex[playerid][3],
0);
PlayerTextDrawBackgroundColor(playerid, inventario_personagemindex[playerid]
[3], 112);
PlayerTextDrawFont(playerid, inventario_personagemindex[playerid][3], 5);
PlayerTextDrawSetProportional(playerid, inventario_personagemindex[playerid]
[3], 0);
PlayerTextDrawSetShadow(playerid, inventario_personagemindex[playerid][3],
0);
PlayerTextDrawSetSelectable(playerid, inventario_personagemindex[playerid]
[3], true);
PlayerTextDrawSetPreviewModel(playerid, inventario_personagemindex[playerid]
[3], 18645);
PlayerTextDrawSetPreviewRot(playerid, inventario_personagemindex[playerid]
[3], 0.000000, 0.000000, 0.000000, 1.000000);
inventario_personagemindex[playerid][4] = CreatePlayerTextDraw(playerid,
230.405273, 244.750305, "");
PlayerTextDrawLetterSize(playerid, inventario_personagemindex[playerid][4],
0.000000, 0.000000);
PlayerTextDrawTextSize(playerid, inventario_personagemindex[playerid][4],
33.000000, 36.000000);
PlayerTextDrawAlignment(playerid, inventario_personagemindex[playerid][4],
1);
PlayerTextDrawColor(playerid, inventario_personagemindex[playerid][4], -1);
PlayerTextDrawSetShadow(playerid, inventario_personagemindex[playerid][4],
0);
PlayerTextDrawSetOutline(playerid, inventario_personagemindex[playerid][4],
0);
PlayerTextDrawBackgroundColor(playerid, inventario_personagemindex[playerid]
[4], 112);
PlayerTextDrawFont(playerid, inventario_personagemindex[playerid][4], 5);
PlayerTextDrawSetProportional(playerid, inventario_personagemindex[playerid]
[4], 0);
PlayerTextDrawSetShadow(playerid, inventario_personagemindex[playerid][4],
0);
PlayerTextDrawSetSelectable(playerid, inventario_personagemindex[playerid]
[4], true);
PlayerTextDrawSetPreviewModel(playerid, inventario_personagemindex[playerid]
[4], 18645);
PlayerTextDrawSetPreviewRot(playerid, inventario_personagemindex[playerid]
[4], 0.000000, 0.000000, 0.000000, 1.000000);
inventario_personagemindex[playerid][5] = CreatePlayerTextDraw(playerid,
230.505279, 294.150360, "");
PlayerTextDrawLetterSize(playerid, inventario_personagemindex[playerid][5],
0.000000, 0.000000);
PlayerTextDrawTextSize(playerid, inventario_personagemindex[playerid][5],
33.000000, 36.000000);
PlayerTextDrawAlignment(playerid, inventario_personagemindex[playerid][5],
1);
PlayerTextDrawColor(playerid, inventario_personagemindex[playerid][5], -1);
PlayerTextDrawSetShadow(playerid, inventario_personagemindex[playerid][5],
0);
PlayerTextDrawSetOutline(playerid, inventario_personagemindex[playerid][5],
0);
PlayerTextDrawBackgroundColor(playerid, inventario_personagemindex[playerid]
[5], 112);
PlayerTextDrawFont(playerid, inventario_personagemindex[playerid][5], 5);
PlayerTextDrawSetProportional(playerid, inventario_personagemindex[playerid]
[5], 0);
PlayerTextDrawSetShadow(playerid, inventario_personagemindex[playerid][5],
0);
PlayerTextDrawSetSelectable(playerid, inventario_personagemindex[playerid]
[5], true);
PlayerTextDrawSetPreviewModel(playerid, inventario_personagemindex[playerid]
[5], 18645);
PlayerTextDrawSetPreviewRot(playerid, inventario_personagemindex[playerid]
[5], 0.000000, 0.000000, 0.000000, 1.000000);
inventario_personagemindex[playerid][6] = CreatePlayerTextDraw(playerid,
110.400032, 294.070007, "");
PlayerTextDrawLetterSize(playerid, inventario_personagemindex[playerid][6],
0.000000, 0.000000);
PlayerTextDrawTextSize(playerid, inventario_personagemindex[playerid][6],
33.000000, 36.000000);
PlayerTextDrawAlignment(playerid, inventario_personagemindex[playerid][6],
1);
PlayerTextDrawColor(playerid, inventario_personagemindex[playerid][6], -1);
PlayerTextDrawSetShadow(playerid, inventario_personagemindex[playerid][6],
0);
PlayerTextDrawSetOutline(playerid, inventario_personagemindex[playerid][6],
0);
PlayerTextDrawBackgroundColor(playerid, inventario_personagemindex[playerid]
[6], 112);
PlayerTextDrawFont(playerid, inventario_personagemindex[playerid][6], 5);
PlayerTextDrawSetProportional(playerid, inventario_personagemindex[playerid]
[6], 0);
PlayerTextDrawSetShadow(playerid, inventario_personagemindex[playerid][6],
0);
PlayerTextDrawSetSelectable(playerid, inventario_personagemindex[playerid]
[6], true);
PlayerTextDrawSetPreviewModel(playerid, inventario_personagemindex[playerid]
[6], 18645);
PlayerTextDrawSetPreviewRot(playerid, inventario_personagemindex[playerid]
[6], 0.000000, 0.000000, 0.000000, 1.000000);
//----------------------------------------------------------