08.08.2016, 13:32
Hello.
I need your help.
how can I learn from the id of this object?
in this way it does not work
I need your help.
Код:
forward ShowPlayerItems(playerid); public ShowPlayerItems(playerid) { new info[512], result; foreach(new i : i_count) { if(Item[i][item_owner] == DataPlayer[playerid][player_uid]) { format(info, sizeof(info), "%s\n[%d]\t%s (%d | %d)", info, Item[i][item_uid], Item[i][item_name], Item[i][item_amount], Item[i][item_amount2]); result++; } } if(!strlen(info)) { ShowPlayerDialog(playerid, DIALOG_I, DIALOG_STYLE_MSGBOX, "Przedmioty | Informacja", "Przykro nam ale twoja postać nie posiada przedmiotуw", "Ok", ""); } ShowPlayerDialog(playerid, DIALOG_P, DIALOG_STYLE_LIST, "Przedmioty", info, "Usage", "Close"); return 1; }
Код:
new item_sscanf_uid, item_sscanf_info[128], itemid; if(sscanf(inputtext, "ds[128]", item_sscanf_uid, item_sscanf_info)) { printf("%d ITEMID USE\n", item_sscanf_uid); return 1; } itemid = item_sscanf_uid; printf("%d ITEMID USE\n", itemid); UsePlayerItem(playerid, Item[itemid][item_type], Item[itemid][item_uid]);