Raised This Month: $ Target: $400
 0% 

[ZP 5.0] How to make extra item only for human ?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
programmer97
Junior Member
Join Date: Sep 2011
Old 01-23-2012 , 13:03   [ZP 5.0] How to make extra item only for human ?
Reply With Quote #1

How to make extra item only for human in ZP 5.0 ?
I read this TUT http://forums.alliedmods.net/showthread.php?t=172262, but I don`t understand how to make extra items only for humans
programmer97 is offline
poliisi299
Senior Member
Join Date: May 2011
Old 01-23-2012 , 13:09   Re: [ZP 5.0] How to make extra item only for human ?
Reply With Quote #2

me too understand this
poliisi299 is offline
H.RED.ZONE
Veteran Member
Join Date: Sep 2011
Location: Serbia, Belgrade
Old 01-23-2012 , 14:03   Re: [ZP 5.0] How to make extra item only for human ?
Reply With Quote #3

PHP Code:
public zp_fw_items_select_pre(iditemid)
{
    if (
itemid == g_extra_item)
    {
        if (
get_pcvar_num(cvar_enable) == 0)
            return 
ZP_ITEM_DONT_SHOW;
            
        if (
zp_class_nemesis_get(id) || zp_core_is_zombie(id))
            return 
ZP_ITEM_DONT_SHOW;
            
        if (
get_pcvar_num(cvar_allow_survivor) == && zp_class_survivor_get(id))
            return 
ZP_ITEM_DONT_SHOW;
            
        return 
ZP_ITEM_AVAILABLE;
    }
    return 
ZP_ITEM_AVAILABLE;

__________________
H.RED.ZONE is offline
DeMNiX
Veteran Member
Join Date: Nov 2011
Location: Russia
Old 01-23-2012 , 19:34   Re: [ZP 5.0] How to make extra item only for human ?
Reply With Quote #4

Quote:
Originally Posted by H.RED.ZONE View Post
PHP Code:
public zp_fw_items_select_pre(iditemid)
{
    if (
itemid == g_extra_item)
    {
        if (
get_pcvar_num(cvar_enable) == 0)
            return 
ZP_ITEM_DONT_SHOW;
            
        if (
zp_class_nemesis_get(id) || zp_core_is_zombie(id))
            return 
ZP_ITEM_DONT_SHOW;
            
        if (
get_pcvar_num(cvar_allow_survivor) == && zp_class_survivor_get(id))
            return 
ZP_ITEM_DONT_SHOW;
            
        return 
ZP_ITEM_AVAILABLE;
    }
    return 
ZP_ITEM_AVAILABLE;

Thy! But how you write a code? You say that your hand is broken o_0
DeMNiX is offline
lucas_7_94
Leche Loco
Join Date: Mar 2009
Location: Argentina
Old 01-23-2012 , 19:43   Re: [ZP 5.0] How to make extra item only for human ?
Reply With Quote #5

The human has 2 hands.
__________________
ATWWMH - MiniDuels
Madness is like gravity, just need a little push.
lucas_7_94 is offline
Send a message via Skype™ to lucas_7_94
Snaker beatter
Veteran Member
Join Date: Sep 2011
Location: Manila, Philippines
Old 01-23-2012 , 21:25   Re: [ZP 5.0] How to make extra item only for human ?
Reply With Quote #6

Quote:
Originally Posted by DeMNiX View Post
Thy! But how you write a code? You say that your hand is broken o_0
yeah doubtful to h.red.zone. Or maybe he just can

EDIT:

If you want only for humans here:
PHP Code:
        if (zp_class_nemesis_get(id) || zp_core_is_zombie(id) || zp_class_survivor_get(id))
            return 
ZP_ITEM_DONT_SHOW
Or for zombies here:
PHP Code:
        if (zp_class_nemesis_get(id) || !zp_core_is_zombie(id) || zp_class_survivor_get(id))
            return 
ZP_ITEM_DONT_SHOW
Or for nemesis here:
PHP Code:
        if (zp_class_nemesis_get(id))
            return 
ZP_ITEM_AVAILABLE// Or something like this

        
if (!zp_core_is_zombie(id) || zp_core_is_zombie(id) || zp_class_survivor_get(id))
            return 
ZP_ITEM_DONT_SHOW
Or for survivor here"
PHP Code:
        if (zp_class_survivor_get(id))
            return 
ZP_ITEM_AVAILABLE// Or something like this

        
if (zp_class_nemesis_get(id) || zp_core_is_zombie(id) || !zp_core_is_zombie(id))
            return 
ZP_ITEM_DONT_SHOW
__________________

Last edited by Snaker beatter; 01-23-2012 at 21:30.
Snaker beatter is offline
programmer97
Junior Member
Join Date: Sep 2011
Old 01-24-2012 , 00:24   Re: [ZP 5.0] How to make extra item only for human ?
Reply With Quote #7

Snaker beatter thank you very much
programmer97 is offline
H.RED.ZONE
Veteran Member
Join Date: Sep 2011
Location: Serbia, Belgrade
Old 01-24-2012 , 01:33   Re: [ZP 5.0] How to make extra item only for human ?
Reply With Quote #8

Quote:
Originally Posted by DeMNiX View Post
Thy! But how you write a code? You say that your hand is broken o_0
copy paste. :/
__________________
H.RED.ZONE is offline
DeMNiX
Veteran Member
Join Date: Nov 2011
Location: Russia
Old 01-24-2012 , 03:52   Re: [ZP 5.0] How to make extra item only for human ?
Reply With Quote #9

Quote:
Originally Posted by H.RED.ZONE View Post
copy paste. :/
ok.
DeMNiX 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 05:12.


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