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
Author Message
ROKronoS
Senior Member
Join Date: Oct 2010
Location: Bucharest, Romania
Old 06-30-2014 , 11:30   [ZPS] Extra Item: Buy Classes 2.0 (with Item Limiter)
Reply With Quote #1

[ZPS] Extra Item: Buy Classes

Description

Players can buy a special mode (Sniper, Assassin, Bombardier, Survivor, Nemesis) with ammo packs if the last played mode wasn't Nemesis, Survivor, Assassin, Sniper or Bombardier.By default, each item can be bought once in 4 rounds (this can be changed by modifying the value of the g_limit variable).

zps_buy_classes_2.0.sma includes Sniper, Assassin, Bombardier
zps_buy_classes_nmsv2.0.sma includes Survivor, Nemesis

Requirements
  • Zombie Plague Shade 1.1 or newer (due to the new natives)

Images

[IMG]http://img856.**************/img856/3438/loye.png[/IMG]
Attached Files
File Type: sma Get Plugin or Get Source (zps_buy_classes_2.0.sma - 1422 views - 1.8 KB)
File Type: sma Get Plugin or Get Source (zps_buy_classes_nmsv2.0.sma - 1237 views - 1.4 KB)
__________________

Last edited by ROKronoS; 12-13-2014 at 10:42.
ROKronoS is offline
Just4Games
Senior Member
Join Date: Jan 2013
Location: Romania
Old 06-30-2014 , 13:28   Re: [ZPS] Extra Item: Buy Classes
Reply With Quote #2

Very nice, tested and it's working! GJ
PS: You could add Nemesis and Survivor too (all in one)
Just4Games is offline
Nano x
Member
Join Date: Feb 2014
Location: Lebanon, beirut
Old 06-30-2014 , 17:52   Re: [ZPS] Extra Item: Buy Classes
Reply With Quote #3

very nice
Nano x is offline
Old 07-01-2014, 14:39
gigis
This message has been deleted by YamiKaitou. Reason: server advertising
ghostz0r
Senior Member
Join Date: Dec 2012
Old 07-07-2014 , 00:58   Re: [ZPS] Extra Item: Buy Classes
Reply With Quote #4

hey man , create this item for arnaas vip system plss)
ghostz0r is offline
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 07-07-2014 , 03:17   Re: [ZPS] Extra Item: Buy Classes
Reply With Quote #5

Just follow this step: https://forums.alliedmods.net/showpo...6&postcount=99

Or just try below:
PHP Code:
/*

This plugin works only with Zombie Plague Shade

*/

#include < amxmodx >
#include < zombieplague >
#include <zmvip> 

new g_buy_sniper;
new 
g_item_sniper[] = "Become Sniper";
new 
g_cost_sniper 200;

new 
g_buy_assassin;
new 
g_item_assassin[] = "Become Assassin";
new 
g_cost_assassin 200;

new 
g_buy_bombardier;
new 
g_item_bombardier[] = "Become Bombardier";
new 
g_cost_bombardier 200;

public 
plugin_init()
{
        
register_plugin "[ZPS] Buy Classes""1.0""KronoS" ;
    
        
g_buy_sniper zv_register_extra_itemg_item_sniper"for VIP only"g_cost_sniperZV_TEAM_HUMAN );
        
g_buy_assassin zv_register_extra_itemg_item_assassin"for VIP only"g_cost_assassinZV_TEAM_HUMAN );
        
g_buy_bombardier zv_register_extra_itemg_item_bombardier"for VIP only"g_cost_bombardierZV_TEAM_HUMAN );
}

public 
zv_extra_item_selectedindexitem )
{
        if ( 
item != g_buy_sniper && item != g_buy_assassin && item != g_buy_bombardier )
            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_printindexprint_chat"[ZP] You can't buy a mode because one was played recently!" );
            return 
ZP_PLUGIN_HANDLED;
    }    
    
        if ( 
item == g_buy_sniper )
        
zp_make_user_sniperindex );
        else if ( 
item == g_buy_assassin )
        
zp_make_user_assassinindex );
        else if ( 
item == g_buy_bombardier )
        
zp_make_user_bombardierindex );
    
        return 
PLUGIN_CONTINUE;

Edit: I have tested it and it is working in ZPS. Now, only VIP can buy the classes.

Last edited by zmd94; 10-25-2014 at 23:05.
zmd94 is offline
ghostz0r
Senior Member
Join Date: Dec 2012
Old 07-07-2014 , 14:57   Re: [ZPS] Extra Item: Buy Classes
Reply With Quote #6

zmd94 , thank's very big (:
ghostz0r is offline
Ren0k
Junior Member
Join Date: Jul 2014
Old 07-08-2014 , 08:03   Re: [ZPS] Extra Item: Buy Classes
Reply With Quote #7

nop, crashes server
__________________
Ren0k is offline
Just4Games
Senior Member
Join Date: Jan 2013
Location: Romania
Old 07-08-2014 , 08:26   Re: [ZPS] Extra Item: Buy Classes
Reply With Quote #8

Make sure you don't have other plugin like this.
This plugin is running well on my server
__________________

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
gigis
BANNED
Join Date: Sep 2013
Location: bucuresti
Old 07-21-2014 , 06:22   Re: [ZPS] Extra Item: Buy Classes
Reply With Quote #9

100% NO error code,work for vip
no class bomber
- compille no errors

Code:
/*

This plugin works only with Zombie Plague Shade

*/

#include < amxmodx >
#include < zombieplague >
#include <zmvip> 

new g_buy_sniper;
new g_item_sniper[] = "Become Sniper";
//new g_cost_sniper = 200;

new g_buy_assassin;
new g_item_assassin[] = "Become Assassin";
//new g_cost_assassin = 200;

//new g_buy_bombardier;
//new g_item_bombardier[] = "Become Bombardier";
//new g_cost_bombardier = 200;

public plugin_init()
{
        register_plugin "[ZPS] Buy Classes", "1.0", "KronoS" ;
    
        g_buy_sniper = zv_register_extra_item( g_item_sniper, "Transform in Sniper", 200, ZV_TEAM_HUMAN );
        g_buy_assassin = zv_register_extra_item( g_item_assassin, "Transform in Assasin", 200, ZV_TEAM_HUMAN );
        //g_buy_bombardier = zv_register_extra_item( g_item_bombardier, "Transform in Bombardier", 200, ZV_TEAM_HUMAN );
}

public zv_extra_item_selected( index, item )
{
        if ( item != g_buy_sniper && item != g_buy_assassin )
            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 )
    {
        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_sniper )
        zp_make_user_sniper( index );
        else if ( item == g_buy_assassin )
        zp_make_user_assassin( index );
    
        return PLUGIN_CONTINUE;
}

Last edited by gigis; 07-21-2014 at 06:23.
gigis is offline
Send a message via Yahoo to gigis
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 07-21-2014 , 06:51   Re: [ZPS] Extra Item: Buy Classes
Reply With Quote #10

Quote:
It do not have Bombardier Class.
LOL, why you removed the Bombardier Class as this plugin is specifically for ZPS which have Bombardier Class.
zmd94 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 23:53.


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