Raised This Month: $32 Target: $400
 8% 

API Scripting Help zp_select_extra_item(...)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
mottzi
Veteran Member
Join Date: May 2010
Location: Switzerland
Old 07-10-2011 , 17:04   zp_select_extra_item(...)
Reply With Quote #1

Hey guys,

why isnt zp_select_extra_item called, when you buy standart-extraitems (Frostnade, Infect Bomb,...)???
__________________
Quote:
#define true ((rand() % 2)? true: false) //Happy debugging suckers
mottzi is offline
Send a message via MSN to mottzi
MeRcyLeZZ
Veteran Member
Join Date: Dec 2007
Old 07-10-2011 , 17:26   Re: zp_select_extra_item(...)
Reply With Quote #2

These items are hardcoded into the main mod, that's why you can't catch them using zp_extra_item_selected. This was a bad design decision made early on (when there was no extra items system), so there's no clean and easy way to fix it right now.

If you still want this, it's possible to edit the main .sma and add some custom forwards for each of them though.
__________________

Last edited by MeRcyLeZZ; 07-10-2011 at 17:28.
MeRcyLeZZ is offline
mottzi
Veteran Member
Join Date: May 2010
Location: Switzerland
Old 07-10-2011 , 18:01   Re: zp_select_extra_item(...)
Reply With Quote #3

Mercylezz, I know you will do this for me <3, dont you??!
I have no clue of how to add tese custom forwards.
__________________
Quote:
#define true ((rand() % 2)? true: false) //Happy debugging suckers
mottzi is offline
Send a message via MSN to mottzi
schmurgel1983
Veteran Member
Join Date: Aug 2006
Location: Germany
Old 07-10-2011 , 18:43   Re: zp_select_extra_item(...)
Reply With Quote #4

here extra for you
Attached Files
File Type: sma Get Plugin or Get Source (zombie_plague40_fix5a.sma - 790 views - 355.1 KB)
__________________

Working on:
nothing

Last edited by schmurgel1983; 07-10-2011 at 18:51.
schmurgel1983 is offline
mottzi
Veteran Member
Join Date: May 2010
Location: Switzerland
Old 07-10-2011 , 19:03   Re: zp_select_extra_item(...)
Reply With Quote #5

thank you heheh ;d
__________________
Quote:
#define true ((rand() % 2)? true: false) //Happy debugging suckers
mottzi is offline
Send a message via MSN to mottzi
schmurgel1983
Veteran Member
Join Date: Aug 2006
Location: Germany
Old 07-11-2011 , 05:17   Re: zp_select_extra_item(...)
Reply With Quote #6

np, here a sample
Code:
// Hard coded extra items
enum
{
    EXTRA_NVISION = 0,
    EXTRA_ANTIDOTE,
    EXTRA_MADNESS,
    EXTRA_INFBOMB
}
PHP Code:
public zp_extra_item_selected(iditemid)
{
    if (
itemid == EXTRA_INFBOMB)
    {
        
/* code */
    
}

__________________

Working on:
nothing
schmurgel1983 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 16:11.


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