Raised This Month: $51 Target: $400
 12% 

Subplugin Submission [ZPS] Extra Item: Buy Classes 2.0 (with Item Limiter)


Post New Thread Reply   
 
Thread Tools Display Modes
Just4Games
Senior Member
Join Date: Jan 2013
Location: Romania
Old 07-21-2014 , 08:16   Re: [ZPS] Extra Item: Buy Classes
Reply With Quote #11

Quote:
Originally Posted by ROKronoS View Post
Requirements
  • Zombie Plague Shade (due to the new natives)
Some people are so lazy to read a simple line...
__________________

Just an old fart revisiting the nostalgia.
---------
Oh yeah
|[[ZPA/ZPS]NoSound]|[[ZPA/ZPS]Hud Stats(Edited)]|

PS: I go by MoistWomble nowadays.
Just4Games is offline
ROKronoS
Senior Member
Join Date: Oct 2010
Location: Bucharest, Romania
Old 07-29-2014 , 08:24   Re: [ZPS] Extra Item: Buy Classes
Reply With Quote #12

Added support for Survivor and Nemesis (separate plugin)
__________________
ROKronoS is offline
crysucs
Junior Member
Join Date: Jun 2014
Old 07-30-2014 , 01:58   Re: [ZPS] Extra Item: Buy Classes
Reply With Quote #13

Quote:
Originally Posted by ROKronoS View Post
Added support for Survivor and Nemesis (separate plugin)
- kronos think you rushed and you have been paying attention for that gave me compile error.
- and line survivor&nemesis,but code is assasin&sniper ?/!!!

1.
LINE:
Code:
public zp_extra_item_selected( index, item )
{
    	if ( item != g_buy_survivor && item != g_buy_nemesis && item != g_buy_bombardier )
        	return PLUGIN_CONTINUE;
g_buy_bombardier has no place in code, after I deleted has not given error

2.
Code:
if ( item == g_buy_survivor )
		zp_make_user_sniper( index );
line zp_make_user_sniper should not be?
Code:
 if ( item == g_buy_survivor )
		zp_make_user_survivor( index );
please you can check and correct code?
crysucs is offline
ROKronoS
Senior Member
Join Date: Oct 2010
Location: Bucharest, Romania
Old 07-30-2014 , 04:09   Re: [ZPS] Extra Item: Buy Classes
Reply With Quote #14

@crysucs: Thanks for noticing that.It wasn't a good day.Fixed and reuploaded.
__________________
ROKronoS is offline
crysucs
Junior Member
Join Date: Jun 2014
Old 07-30-2014 , 09:52   Re: [ZPS] Extra Item: Buy Classes
Reply With Quote #15

nui problema,deaja ai facut prae multe cu modul asta),prea frumos, daca sar putea si o limita pe raunda la moduri ar fi belea ;),multumim pt tot ce faci pt iubitorii zombie plague
crysucs is offline
ROKronoS
Senior Member
Join Date: Oct 2010
Location: Bucharest, Romania
Old 07-30-2014 , 10:32   Re: [ZPS] Extra Item: Buy Classes
Reply With Quote #16

Quote:
Originally Posted by crysucs View Post
nui problema,deaja ai facut prae multe cu modul asta),prea frumos, daca sar putea si o limita pe raunda la moduri ar fi belea ;),multumim pt tot ce faci pt iubitorii zombie plague
RO: In Zombie Plague Shade 1.0.8 o sa aiba loc un update-ul al native-ului prin care se inregistreaza extra-itemele (o sa fie adaugata posibilitatea de a adauga restrictii de cumparare)
__________________
ROKronoS is offline
crysucs
Junior Member
Join Date: Jun 2014
Old 07-30-2014 , 14:05   Re: [ZPS] Extra Item: Buy Classes
Reply With Quote #17

omg, is the best that,thx
crysucs is offline
Depresie
Veteran Member
Join Date: Nov 2013
Old 10-27-2014 , 08:51   Re: [ZPS] Extra Item: Buy Classes
Reply With Quote #18

Code:
/*

This plugin works only with Zombie Plague Shade

*/

#include < amxmodx >
#include < zombieplague >

new g_buy_survivor;
new g_item_survivor[] = "Become Survivor";
new g_cost_survivor = 200;

new g_buy_nemesis;
new g_item_nemesis[] = "Become Nemesis";
new g_cost_nemesis = 200;

public plugin_init()
{
        register_plugin "[ZPS] Buy Classes (Nm & Sv)", "1.0", "KronoS" ;
    
        g_buy_survivor = zp_register_extra_item( g_item_survivor, g_cost_survivor, ZP_TEAM_HUMAN );
        g_buy_nemesis = zp_register_extra_item( g_item_nemesis, g_cost_nemesis, ZP_TEAM_HUMAN );
}

public zp_extra_item_selected( index, item )
{
        if ( item != g_buy_survivor && item != g_buy_nemesis )
            return PLUGIN_CONTINUE;
    
        if ( zp_has_round_started( ) )
            return ZP_PLUGIN_HANDLED;

    if ( zp_get_last_mode() == MODE_NEMESIS || zp_get_last_mode() == MODE_SURVIVOR || zp_get_last_mode() == MODE_ASSASSIN || zp_get_last_mode() == MODE_SNIPER || zp_get_last_mode() == MODE_BOMBARDIER )
    {
        client_print( index, print_chat, "[ZP] You can't buy a mode because one was played recently!" );
            return ZP_PLUGIN_HANDLED;
    }    
    
        if ( item == g_buy_survivor )
        zp_make_user_survivor( index );
        else if ( item == g_buy_nemesis )
        zp_make_user_nemesis( index );
    
        return PLUGIN_CONTINUE;
}
can someone make it 2 rounds instead of one ? in this code please?
Depresie is offline
ROKronoS
Senior Member
Join Date: Oct 2010
Location: Bucharest, Romania
Old 12-13-2014 , 10:42   Re: [ZPS] Extra Item: Buy Classes 2.0 (with Item Limiter)
Reply With Quote #19

Update!
Added support for the Item Restrictions API.By default, each item can be bought once in 4 rounds (this can be changed by modifying the value of the g_limit variable).
__________________
ROKronoS is offline
cobra.
Junior Member
Join Date: Dec 2014
Old 12-16-2014 , 16:17   Re: [ZPS] Extra Item: Buy Classes 2.0 (with Item Limiter)
Reply With Quote #20

eror completing
cobra. 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 13:04.


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