Raised This Month: $ Target: $400
 0% 

[ZP] Addon: Buy Classes v2.0 [31/12/2009]


Post New Thread Reply   
 
Thread Tools Display Modes
wicho
Veteran Member
Join Date: Feb 2012
Location: GuateAmala
Old 06-21-2013 , 16:24   Re: [ZP] Addon: Buy Classes v2.0 [31/12/2009]
Reply With Quote #41

ok, no problem..
wicho is offline
Catastrophe
Veteran Member
Join Date: Jul 2012
Location: somewhere between narnia
Old 06-22-2013 , 01:00   Re: [ZP] Addon: Buy Classes v2.0 [31/12/2009]
Reply With Quote #42

Quote:
Originally Posted by wicho View Post
Try...

PHP Code:
#include <amxmodx>
#include <zp50_items>
#include <zp50_class_assassin>
#include <zp50_class_sniper>
#include <zp50_class_nemesis>
#include <zp50_class_survivor>
#include <zp50_gamemodes>
#include <zp50_colorchat>
#include <zmvip>

new g_assassin g_sniperg_nemesisg_survivor
new g_GameModeSurvivorIDg_GameModeNemesisIDg_GameModeSniperIDg_GameModeAssassinID

public plugin_init() 
{
        
register_plugin "[ZP] Extra: Buy classes" "1.0" "H.RED.ZONE + wicho" )
        
        
g_assassin zp_items_register ("Buy Assassin" 30)
        
g_sniper zp_items_register ("Buy Sniper" 25
        
g_nemesis zp_items_register("Buy Nemesis"30)
        
g_survivor zp_items_register("Buy Survivor"25)
}

public 
plugin_cfg()
{
    
g_GameModeNemesisID zp_gamemodes_get_id("Nemesis Mode")
    
g_GameModeSurvivorID zp_gamemodes_get_id("Survivor Mode")
    
g_GameModeSniperID zp_gamemodes_get_id("Sniper Mode")    
    
g_GameModeAssassinID zp_gamemodes_get_id("Assassin Mode")
}

public 
zp_fw_items_select_pre(iditemid 
{
    
    if (
itemid == g_assassin
    { 
        if (
zv_get_user_flags(id) == 0
            
        if (!
zp_core_is_zombie (id) || zp_class_nemesis_get(id) || zp_class_survivor_get(id) || zp_class_assassin_get (id) || zp_class_sniper_get(id))
            return 
ZP_ITEM_DONT_SHOW;
        
        if (
zp_gamemodes_get_current() == ZP_NO_GAME_MODE && g_GameModeAssassinID == ZP_INVALID_GAME_MODE)
            return 
ZP_ITEM_DONT_SHOW;        
            
        return 
ZP_ITEM_AVAILABLE
    }
 
    if (
itemid == g_nemesis)
    { 
        if (
zv_get_user_flags(id) == 0)
 
        if (!
zp_core_is_zombie(id) || zp_class_nemesis_get(id) || zp_class_survivor_get(id) || zp_class_assassin_get (id) || zp_class_sniper_get(id))
            return 
ZP_ITEM_DONT_SHOW;
        
        if (
zp_gamemodes_get_current() == ZP_NO_GAME_MODE && g_GameModeNemesisID == ZP_INVALID_GAME_MODE)
            return 
ZP_ITEM_DONT_SHOW;    
            
        return 
ZP_ITEM_AVAILABLE;
    }
    
    if (
itemid == g_sniper
    { 
        if (
zv_get_user_flags(id) == 0)
            
        if (
zp_core_is_zombie (id) || zp_class_survivor_get(id) || zp_class_nemesis_get(id) || zp_class_assassin_get (id) || zp_class_sniper_get(id))
            return 
ZP_ITEM_DONT_SHOW;
        
        if (
zp_gamemodes_get_current() == ZP_NO_GAME_MODE && g_GameModeSniperID == ZP_INVALID_GAME_MODE)
            return 
ZP_ITEM_DONT_SHOW;        
            
        return 
ZP_ITEM_AVAILABLE
    }

    if (
itemid == g_survivor)
    { 
        if (
zv_get_user_flags(id) == 0)
       
        if (
zp_core_is_zombie(id) || zp_class_survivor_get(id) || zp_class_nemesis_get(id) || zp_class_assassin_get(id) || zp_class_sniper_get(id))
            return 
ZP_ITEM_DONT_SHOW;
        
        if (
zp_gamemodes_get_current() == ZP_NO_GAME_MODE && g_GameModeSurvivorID == ZP_INVALID_GAME_MODE)
            return 
ZP_ITEM_DONT_SHOW;        
           
        return 
ZP_ITEM_AVAILABLE;
    }

    return 
ZP_ITEM_AVAILABLE

}

public 
zp_fw_items_select_post (id itemid
{
    if (
itemid == g_assassin
    {
             
        if (
zp_gamemodes_get_current() == ZP_NO_GAME_MODE)
        {            
            if (!
zp_gamemodes_start(g_GameModeAssassinIDid))
            {
                
zp_colored_print(id"%L"id"GAME_MODE_CANT_START")
                return;
            }
        }
        else
        {            
            
zp_class_assassin_set(id)
        }
    }
    
    else if(
itemid == g_nemesis)
    {
                
        if (
zp_gamemodes_get_current() == ZP_NO_GAME_MODE)
        {            
            if (!
zp_gamemodes_start(g_GameModeNemesisIDid))
            {
                
zp_colored_print(id"%L"id"GAME_MODE_CANT_START")
                return;
            }
        }
        else
        {            
            
zp_class_nemesis_set(id)
        }
    }
    
        else if (
itemid == g_sniper)
    {
        
        if (
zp_gamemodes_get_current() == ZP_NO_GAME_MODE)
        {            
            if (!
zp_gamemodes_start(g_GameModeSniperIDid))
            {
                
zp_colored_print(id"%L"id"GAME_MODE_CANT_START")
                return;
            }
        }
        else
        {            
            
zp_class_sniper_set(id)
        }
    }

        else if (
itemid == g_survivor)
    {
        
        if (
zp_gamemodes_get_current() == ZP_NO_GAME_MODE)
        {            
            if (!
zp_gamemodes_start(g_GameModeSurvivorIDid))
            {
                
zp_colored_print(id"%L"id"GAME_MODE_CANT_START")
                return;
            }
        }
        else
        {            
            
zp_class_survivor_set(id)
        }
    }

Wicho, the code is perfect, but this wont work for VIP, this will be for normal players, if u wanna make it for VIP check out my code and the forwards i use

No offense, just telling
__________________
You will find everything u need :-
Catastrophe is offline
wicho
Veteran Member
Join Date: Feb 2012
Location: GuateAmala
Old 06-22-2013 , 01:09   Re: [ZP] Addon: Buy Classes v2.0 [31/12/2009]
Reply With Quote #43

If u want try using your method, im little busy to do now..
wicho is offline
Catastrophe
Veteran Member
Join Date: Jul 2012
Location: somewhere between narnia
Old 06-22-2013 , 01:15   Re: [ZP] Addon: Buy Classes v2.0 [31/12/2009]
Reply With Quote #44

Quote:
Originally Posted by wicho View Post
If u want try using your method, im little busy to do now..
NO problem bro, i was just telling you , that if u want it for VIP, u have to use different forwards. As i said, i mean no offense
__________________
You will find everything u need :-
Catastrophe is offline
wicho
Veteran Member
Join Date: Feb 2012
Location: GuateAmala
Old 06-22-2013 , 01:19   Re: [ZP] Addon: Buy Classes v2.0 [31/12/2009]
Reply With Quote #45

ok, relax lol..
wicho is offline
Catastrophe
Veteran Member
Join Date: Jul 2012
Location: somewhere between narnia
Old 06-22-2013 , 01:25   Re: [ZP] Addon: Buy Classes v2.0 [31/12/2009]
Reply With Quote #46

Quote:
Originally Posted by wicho View Post
ok, relax lol..
Really, lolz.... xD
__________________
You will find everything u need :-
Catastrophe 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 06:25.


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