Raised This Month: $32 Target: $400
 8% 

Survivor / Nemesis


Post New Thread Reply   
 
Thread Tools Display Modes
sencor
Junior Member
Join Date: Dec 2011
Old 01-08-2012 , 06:19   Re: Survivor / Nemesis
Reply With Quote #11

Quote:
Originally Posted by Isaac999 View Post
See?
if buy survivor, deduct Ammo pack , does nothing
sencor is offline
Isaac999
Senior Member
Join Date: Nov 2011
Location: Home
Old 01-08-2012 , 06:20   Re: Survivor / Nemesis
Reply With Quote #12

See JoKeR?
__________________
Isaac999 is offline
Old 01-08-2012, 06:23
JoKeR LauGh
This message has been deleted by JoKeR LauGh.
sencor
Junior Member
Join Date: Dec 2011
Old 01-08-2012 , 07:13   Re: Survivor / Nemesis
Reply With Quote #13

Help pls !!!
sencor is offline
H.RED.ZONE
Veteran Member
Join Date: Sep 2011
Location: Serbia, Belgrade
Old 01-08-2012 , 12:10   Re: Survivor / Nemesis
Reply With Quote #14

sencor --> i have surv and nemesis buy plugin, but dont started nemesis or survivor round when i buy nemesis or survivor.

Me:
You can only start nemesis or survivor round if you buy it before countdown.

This one works great but it wont start round as nemesis, survivor it will only buy it.

PHP Code:
#include <amxmodx>
#include <zp50_core>
#include <zp50_items>
#include <zp50_class_nemesis>
#include <zp50_class_survivor>

new g_nemesisg_survivor

public plugin_init()
{
        
register_plugin("[ZP] Extra: Surv or Nem""1""snaker-beatter")
        
        
g_nemesis zp_items_register("Buy Nemesis"30)
        
g_survivor zp_items_register("Buy Survivor"25)
}

public 
zp_fw_items_select_pre(iditemid)
{
    if (
itemid == g_nemesis)
    {
        if (!
zp_core_is_zombie(id) || zp_class_nemesis_get(id) || zp_class_survivor_get(id))
            return 
ZP_ITEM_DONT_SHOW;
            
        return 
ZP_ITEM_AVAILABLE;
    }
    if (
itemid == g_survivor)
    {
        if (
zp_core_is_zombie(id) || zp_class_survivor_get(id) || zp_class_nemesis_get(id))
            return 
ZP_ITEM_DONT_SHOW;
            
        return 
ZP_ITEM_AVAILABLE;
    }
    
    return 
ZP_ITEM_AVAILABLE;
}

public 
zp_fw_items_select_post(iditemid)
{
    if (
itemid == g_nemesis)
    {
        
zp_class_nemesis_set(id)
    }
    if (
itemid == g_survivor)
    {
        
zp_class_survivor_set(id)
    }

__________________

Last edited by H.RED.ZONE; 01-08-2012 at 12:12.
H.RED.ZONE is offline
MeRcyLeZZ
Veteran Member
Join Date: Dec 2007
Old 01-09-2012 , 11:22   Re: Survivor / Nemesis
Reply With Quote #15

This code should work (mostly from zp50_admin_commands.sma)
Code:
public zp_fw_items_select_pre(id, itemid) {     if (itemid == g_nemesis)     {         if (!zp_core_is_zombie(id) || zp_class_nemesis_get(id) || zp_class_survivor_get(id))             return ZP_ITEM_DONT_SHOW;                 // No game mode in progress and Nemesis mode disabled         if (zp_gamemodes_get_current() == ZP_NO_GAME_MODE && g_GameModeNemesisID == ZP_INVALID_GAME_MODE)             return ZP_ITEM_DONT_SHOW;                 return ZP_ITEM_AVAILABLE;     }     else if (itemid == g_survivor)     {         if (zp_core_is_zombie(id) || zp_class_survivor_get(id) || zp_class_nemesis_get(id))             return ZP_ITEM_DONT_SHOW;                 // No game mode in progress and Survivor mode disabled         if (zp_gamemodes_get_current() == ZP_NO_GAME_MODE && g_GameModeSurvivorID == ZP_INVALID_GAME_MODE)             return ZP_ITEM_DONT_SHOW;                 return ZP_ITEM_AVAILABLE;     } } public zp_fw_items_select_post(id, itemid) {     if (itemid == g_nemesis)     {         // Check if a game mode is in progress         if (zp_gamemodes_get_current() == ZP_NO_GAME_MODE)         {             // Start nemesis game mode with this target player             if (!zp_gamemodes_start(g_GameModeNemesisID, player))             {                 zp_colored_print(id, "%L", id, "GAME_MODE_CANT_START")                 return;             }         }         else         {             // Make player nemesis             zp_class_nemesis_set(player)         }     }     else if (itemid == g_survivor)     {         // Check if a game mode is in progress         if (zp_gamemodes_get_current() == ZP_NO_GAME_MODE)         {             // Start survivor game mode with this target player             if (!zp_gamemodes_start(g_GameModeSurvivorID, player))             {                 zp_colored_print(id, "%L", id, "GAME_MODE_CANT_START")                 return;             }         }         else         {             // Make player survivor             zp_class_survivor_set(player)         }     } }
Don't forget:
Code:
#include <zp50_gamemodes> public plugin_cfg() {     g_GameModeNemesisID = zp_gamemodes_get_id("Nemesis Mode")     g_GameModeSurvivorID = zp_gamemodes_get_id("Survivor Mode") }
__________________

Last edited by MeRcyLeZZ; 01-09-2012 at 11:42.
MeRcyLeZZ is offline
sencor
Junior Member
Join Date: Dec 2011
Old 01-09-2012 , 13:39   Re: Survivor / Nemesis
Reply With Quote #16

Quote:
Originally Posted by MeRcyLeZZ View Post
This code should work (mostly from zp50_admin_commands.sma)
Code:
public zp_fw_items_select_pre(id, itemid) {     if (itemid == g_nemesis)     {         if (!zp_core_is_zombie(id) || zp_class_nemesis_get(id) || zp_class_survivor_get(id))             return ZP_ITEM_DONT_SHOW;                 // No game mode in progress and Nemesis mode disabled         if (zp_gamemodes_get_current() == ZP_NO_GAME_MODE && g_GameModeNemesisID == ZP_INVALID_GAME_MODE)             return ZP_ITEM_DONT_SHOW;                 return ZP_ITEM_AVAILABLE;     }     else if (itemid == g_survivor)     {         if (zp_core_is_zombie(id) || zp_class_survivor_get(id) || zp_class_nemesis_get(id))             return ZP_ITEM_DONT_SHOW;                 // No game mode in progress and Survivor mode disabled         if (zp_gamemodes_get_current() == ZP_NO_GAME_MODE && g_GameModeSurvivorID == ZP_INVALID_GAME_MODE)             return ZP_ITEM_DONT_SHOW;                 return ZP_ITEM_AVAILABLE;     } } public zp_fw_items_select_post(id, itemid) {     if (itemid == g_nemesis)     {         // Check if a game mode is in progress         if (zp_gamemodes_get_current() == ZP_NO_GAME_MODE)         {             // Start nemesis game mode with this target player             if (!zp_gamemodes_start(g_GameModeNemesisID, player))             {                 zp_colored_print(id, "%L", id, "GAME_MODE_CANT_START")                 return;             }         }         else         {             // Make player nemesis             zp_class_nemesis_set(player)         }     }     else if (itemid == g_survivor)     {         // Check if a game mode is in progress         if (zp_gamemodes_get_current() == ZP_NO_GAME_MODE)         {             // Start survivor game mode with this target player             if (!zp_gamemodes_start(g_GameModeSurvivorID, player))             {                 zp_colored_print(id, "%L", id, "GAME_MODE_CANT_START")                 return;             }         }         else         {             // Make player survivor             zp_class_survivor_set(player)         }     } }
Don't forget:
Code:
#include <zp50_gamemodes> public plugin_cfg() {     g_GameModeNemesisID = zp_gamemodes_get_id("Nemesis Mode")     g_GameModeSurvivorID = zp_gamemodes_get_id("Survivor Mode") }

Can you make me plugin??
I cant convert
sencor is offline
Reply


Thread Tools
Display Modes

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 21:06.


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