hi men! i'm making menu in that i will add items from other plugins with natives (just as in ZP).
i want to add some free items and some paid.
If cost = -1 then it
[cost] will not be shown in menu. but when i trying to add free item like
Code:
var = register_item("Free scout")
it shows me random number. if i adding item like this:
Code:
var = register_item("Free AK", -1)
it works perfectly.
How are natives works? What i have in my include file:
Code:
native register_item(const name[], cost = -1)
The way i hide item cost:
Code:
if(item_cost == -1) {
formatex(szText, charsmax(szText), "%s", item_name)
} else {
formatex(szText, charsmax(szText), "%s \r[\y$\w%i\r]", item_name, item_cost)
}