Raised This Month: $ Target: $400
 0% 

API Scripting Help [TUT][ZP Making extra item for ZP 5.0!!!


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Snaker beatter
Veteran Member
Join Date: Sep 2011
Location: Manila, Philippines
Old 11-18-2011 , 01:45   [TUT][ZP Making extra item for ZP 5.0!!!
Reply With Quote #1

THIS IS A TUTORIAL FOR ZOMBIE PLAGUE 5.0:

1ST. Manage included files
PHP Code:
        #include <amxmodx>
        #include <zp50_core> // engine
        #include <zp50_items> // extra items
        #include <zp50_class_nemesis> // nemesis
        #include <zp50_class_survivor> // survivor 
2ND. Make an item's id and register it in plugin_precache()
PHP Code:
        new g_item_id

        
public plugin_prechache() 
        {
                
g_item_id zp_items_register("<name>", <cost>) // no more teams!
        

3RD. If you want the item for only one team(human/survivor/nemesis/zombie) the make make a forward (more here):
PHP Code:
        public zp_fw_items_select_pre(iditemidignorecost)
        {
                
//check our item id
                
if (itemid == g_item_id)
                {
                        
// if you want it for only nemesis use this:
                        
if (zp_core_is_zombie(id) && !zp_core_is_zombie(id) && zp_class_survivor_get(id))
                        {
                                
// Return values
                                
return ZP_ITEM_DONT_SHOW;
                        }
                }
                
// here the main extra item's return value (if you want it to exist or not)
                
return ZP_ITEM_AVAILABLE;
        } 
4Th. When i player was succesfully buyed a extra item
PHP Code:
        public zp_fw_items_select_post(iditemidignorecost)
        {
                
// check our extra item
                
if (itemid == g_item_id)
                {
                        
// do your command
                
}

                
// should always have a return value for sure
                
return ZP_ITEM_AVAILABLE;
        } 
Quote:
Any way in zp50's forwards if you are blocking use "return;" value
__________________

Last edited by Snaker beatter; 01-23-2012 at 21:31.
Snaker beatter is offline
SeniorRamos
Senior Member
Join Date: Nov 2011
Location: Raccoon City
Old 11-26-2011 , 07:44   Re: [TUT][ZP Making extra item for ZP 5.0!!!
Reply With Quote #2

GJ
__________________
SeniorRamos is offline
JoKeR LauGh
Veteran Member
Join Date: May 2011
Location: Malaysia
Old 11-26-2011 , 08:05   Re: [TUT][ZP Making extra item for ZP 5.0!!!
Reply With Quote #3

leave the old thread alone.
__________________
Quote:
Originally Posted by addons_zz View Post
Also, just to not read `the article`, read all you find. Read and read, for ever and ever. Never stop reading.
Why? Because there is not one single universal truth which holds the meaning for everything.
JoKeR LauGh is offline
Isaac999
Senior Member
Join Date: Nov 2011
Location: Home
Old 11-26-2011 , 09:08   Re: [TUT][ZP Making extra item for ZP 5.0!!!
Reply With Quote #4

Thanks snake. With this i created my private l4d survivors HUMAN CLASS:

zoey
bill
francis
louis
Isaac999 is offline
styler
Senior Member
Join Date: Oct 2011
Location: Oslo, Norway
Old 11-26-2011 , 14:54   Re: [TUT][ZP Making extra item for ZP 5.0!!!
Reply With Quote #5

Quote:
Originally Posted by JoKeR LauGh View Post
leave the old thread alone.
Its not old.. 11-18-11
styler is offline
Excalibur.007
Veteran Member
Join Date: Sep 2009
Location: Singapore
Old 11-28-2011 , 05:43   Re: [TUT][ZP Making extra item for ZP 5.0!!!
Reply With Quote #6

Quote:
Originally Posted by styler View Post
Its not old.. 11-18-11
Even if it's not old he should not have bump the thread through a "GJ and a thumbs up smiley". Only bump when you encounter problems with it and the thread isn't outdated/old.
Excalibur.007 is offline
styler
Senior Member
Join Date: Oct 2011
Location: Oslo, Norway
Old 11-28-2011 , 08:57   Re: [TUT][ZP Making extra item for ZP 5.0!!!
Reply With Quote #7

Yes i agree but still its not old & that's what JoKeR said
styler is offline
Old 12-03-2011, 09:48
SeniorRamos
This message has been deleted by Excalibur.007. Reason: Don't curse massively
Snaker beatter
Veteran Member
Join Date: Sep 2011
Location: Manila, Philippines
Old 12-03-2011 , 09:52   Re: [TUT][ZP Making extra item for ZP 5.0!!!
Reply With Quote #8

Quote:
Originally Posted by SeniorRamos View Post
WTF is wrong with you ppl? is an encouragement comment is a bump? is EVERY F*CKING comment a bump? F*CK Y'ALL , BUMP BUMP BUMP BUMP BUMP , IMMA BUMP THIS S*IT TILL I'M DEAD , BUUUUUUMMMMMMMMMPPPPPPPPPPPPP...

And one more thing : GOOD THINGS NEVER DIE , so you ppl gona die soon ;)


BUMP !!!!
Me? no one bump this thread
__________________
Snaker beatter is offline
styler
Senior Member
Join Date: Oct 2011
Location: Oslo, Norway
Old 12-03-2011 , 10:58   Re: [TUT][ZP Making extra item for ZP 5.0!!!
Reply With Quote #9

Quote:
Originally Posted by SeniorRamos View Post
WTF is wrong with you ppl? is an encouragement comment is a bump? is EVERY F*CKING comment a bump? F*CK Y'ALL , BUMP BUMP BUMP BUMP BUMP , IMMA BUMP THIS S*IT TILL I'M DEAD , BUUUUUUMMMMMMMMMPPPPPPPPPPPPP...

And one more thing : GOOD THINGS NEVER DIE , so you ppl gona die soon ;)


BUMP !!!!
Someone's mad
styler is offline
poliisi299
Senior Member
Join Date: May 2011
Old 12-12-2011 , 14:14   Re: [TUT][ZP Making extra item for ZP 5.0!!!
Reply With Quote #10

Nice,

but can you make video in youtube how to create extra item ?
coz i cant understand now
poliisi299 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 00:49.


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