stock MostrarInventario(playerid)
{
new name_item[1024];
format(name_item, sizeof(name_item), "{ECEE89}Item\t{ECEE89}Cantidad\t{ECEE89}Peso de item {FFFFFF}(KG)\n");
for(new i = 0; i < MAX_ITEMS; i++)
{
if(pInfo[playerid][jItem][i] > 0)
{
new Float:peso = PesoItem(i);
format(name_item, sizeof(name_item), "%s%s\t%i\t%.2f\n", name_item, ItemName[i], pInfo[playerid][jItem][i], peso);
pInfo[playerid][jItemDispoible][i] = true;
}
else pInfo[playerid][jItemDispoible][i] = false;
}
SPD(playerid, DG_INVENTARIO_1, DIALOG_STYLE_TABLIST_HEADERS, "{54FF52}Inventario", name_item, "Aceptar", "Salir");
return true;
}
if(pInfo[playerid][jItem][i] > 0)
{
new Float:peso = PesoItem(i);
format(name_item, sizeof(name_item), "%s%s\t%i\t%.2f\n", name_item, ItemName[i], pInfo[playerid][jItem][i], peso);
pInfo[playerid][jItemDispoible][i] = true;
}
else
{
pInfo[playerid][jItemDispoible][i] = false;
}
for(new x = 0; x < MAX_ITEMS; x++)
{
if (pInfo[playerid][jItemDispoible][x]) // true
{
// do something as the item exists
}
else // false
{
// do something as the item doesn't exist
}
}
buscar_item(playerid, string[])
{
if(!strcmp(string, ItemName[ITEM_GANZUA])) return SCM(playerid, -1, "Item ganzъa.");
if(!strcmp(string, ItemName[ITEM_MANZANA])) return SCM(playerid, -1, "Item manzana.");
SCM(playerid, -1, "Not found.");
return true;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch(dialogid)
{
case DG_INVENTARIO_1:
{
if(!response) return true;
buscar_item(playerid, inputtext);
}
}
return true;
}
|
#Hansrutger.
thanks for the support, but not what I want. #SickAttack. Thanks for the idea, man. Код:
buscar_item(playerid, string[])
{
if(!strcmp(string, ItemName[ITEM_GANZUA])) return SCM(playerid, -1, "Item ganzъa.");
if(!strcmp(string, ItemName[ITEM_MANZANA])) return SCM(playerid, -1, "Item manzana.");
SCM(playerid, -1, "Not found.");
return true;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch(dialogid)
{
case DG_INVENTARIO_1:
{
if(!response) return true;
buscar_item(playerid, inputtext);
}
}
return true;
}
If you're going to comment stupid things in my publications, you better go to sleep. |
|
I hope you were joking? Please don't be rude enough to call someone stupid, when you yourself have done the stupid and not followed the rules, at this time you are the one in the wrong. Please do not attack people who are willing enough to spend there time helping you.
Abagail is a huge part of this community, and should be treated with the respect they deserve. |
|
The title of this thread is more than appropriate (acceptable), though.
|