Raised This Month: $ Target: $400
 0% 

Help - zp_buymenu small code fix


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 07-28-2018 , 12:18   Re: Help - zp_buymenu small code fix
Reply With Quote #1

Code:
[ZE] Invalid extra item id (-1)
Show the code of ItemGive_Post.
__________________








CrazY. is offline
plazma
Senior Member
Join Date: Oct 2013
Old 07-28-2018 , 18:02   Re: Help - zp_buymenu small code fix
Reply With Quote #2

Quote:
Originally Posted by CrazY. View Post
Code:
[ZE] Invalid extra item id (-1)
Show the code of ItemGive_Post.
Source:
PHP Code:
stock ItemGive_Post(const id, const category, const item) {
    if(
category == KNIFE && HasKnife[id][item]) {
        
zp_force_buy_extra_item(idzp_get_extra_item_id(ItemTodo[category][item]), true)
        return 
PLUGIN_CONTINUE;
    }
    if(
get_currency(id) < ItemCost[category][item] || get_souls(id) < ItemSouls[category][item]) return PLUGIN_CONTINUE;
    if(
equal(ItemTodo[category][item], "weapon_"7)) UTIL_GiveWeapon(idItemTodo[category][item])
    else 
zp_force_buy_extra_item(idzp_get_extra_item_id(ItemTodo[category][item]), true)
    if(
ItemCost[category][item] > 0set_currency(idget_currency(id) - ItemCost[category][item])
    if(
ItemSouls[category][item] > 0set_souls(idget_souls(id) - ItemSouls[category][item])
    if(
ItemFlags[category][item] & FLAG_MItemUsed[id][category][item]++
    else 
ItemUsed[id][category][item] = ItemLimit[ROUNDS][category][item]
    if(
category == KNIFEHasKnife[id][item] = true
    ItemPlayerUsed
[category][item]++
    return 
PLUGIN_CONTINUE;

__________________
Free Palestine ♥
plazma is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 12:21.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode