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

sniper vs nemesis mode


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
StarMpK
Member
Join Date: Feb 2014
Location: Romania , Cluj
Old 04-23-2015 , 03:44   sniper vs nemesis mode
Reply With Quote #1

Hi moders , i need the sma of sniper versus nemesis mode for ZPA.
Can somebody help me?
StarMpK is offline
bakir123
Senior Member
Join Date: Jan 2015
Location: Palestine, Hebron
Old 04-23-2015 , 06:19   Re: sniper vs nemesis mode
Reply With Quote #2

take:
if sma file not work use amxx
Attached Files
File Type: amxx Nemesises-VS-Snipers.amxx (2.8 KB, 164 views)
File Type: sma Get Plugin or Get Source (zp50_gamemode_sniper_vs_nemesis.sma - 641 views - 6.1 KB)
bakir123 is offline
Send a message via Skype™ to bakir123
Obada
Senior Member
Join Date: Dec 2014
Location: Abu Dhabi
Old 04-23-2015 , 06:24   Re: sniper vs nemesis mode
Reply With Quote #3

You're not allowed to post .amxx files.
Obada is offline
Keys PK
Member
Join Date: Mar 2015
Location: Romania
Old 04-23-2015 , 06:25   Re: sniper vs nemesis mode
Reply With Quote #4

try
PHP Code:
#include < amxmodx >
#include < fun >
#include < zombie_plague_advance >

new const g_chance 15
new const g_access_flag[] = "a"
new const g_play_sounds[][] =
{
    
"zombie_plague/sniper1.wav" ,
    
"zombie_plague/nemesis1.wav"
}

#define AMBIENCE_SOUNDS
#if defined AMBIENCE_SOUNDS

new const g_sound_ambience[][] =

    
"zombie_plague/ambience.wav"
}
new const 
Float:g_sound_ambience_duration[] = { 58.0 56.0 }
#endif

new g_gameidg_maxplayerscvar_minplayerscvar_ratiocvar_sniperhpcvar_nemehpg_msg_sync

// Ambience sounds task
#define TASK_AMB 3256

public plugin_init( )
{
    
register_plugin"[ZPA] Game mode : Sniper vs Nemesis","1.0""@bdul!" )

    
cvar_minplayers register_cvar("zp_svsn_minplayers""2")
    
cvar_sniperhp =      register_cvar("zp_svsn_sniper_hp""1.5")
    
cvar_nemehp =      register_cvar("zp_svsn_nemesis_hp""1.0")
    
cvar_ratio =       register_cvar("zp_svsn_inf_ratio""0.5")
    
    
g_maxplayers get_maxplayers( )
    
    
g_msg_sync CreateHudSyncObj()
}

public 
plugin_precache( )
{
    new 
access_flag read_flagsg_access_flag )
    new 
i
    
    
for (0sizeof g_play_soundsi++)
        
precache_soundg_play_sounds[i] )
    
    
#if defined AMBIENCE_SOUNDS
    
new sound[100]
    for (
0sizeof g_sound_ambiencei++)
    {
        if (
equal(g_sound_ambience[i][strlen(g_sound_ambience[i])-4], ".mp3"))
        {
            
formatex(soundsizeof sound 1"sound/%s"g_sound_ambience[i])
            
precache_genericsound )
        }
        else
        {
            
precache_soundg_sound_ambience[i] )
        }
    }
    
#endif
    
    
g_gameid zp_register_game_mode"Sniper vs Nemesis"access_flagg_chance0ZP_DM_BALANCE )
}

public 
zp_player_spawn_postid )
{
    if( 
zp_get_current_mode() == g_gameid )
    {
        if( 
zp_get_user_zombieid ))
        {
            
zp_make_user_nemesisid )
            
            
set_user_healthidfloatround(get_user_health(id) * get_pcvar_float(cvar_nemehp)) )
        }
        else
        {
            
zp_make_user_sniperid )
            
            
set_user_healthidfloatround(get_user_health(id) * get_pcvar_float(cvar_sniperhp)) )
        }
    }
}

public 
zp_round_started_pregame )
{
    if( 
game == g_gameid )
    {
        if( 
fn_get_alive_players() < get_pcvar_num(cvar_minplayers) )
        {
            return 
ZP_PLUGIN_HANDLED
        
}
        
start_avs_mode( )
    }
    return 
PLUGIN_CONTINUE
}

public 
zp_round_startedgameid )
{
    if( 
game == g_gameid )
    {
        
set_hudmessage(22115621, -1.00.1710.05.01.01.0, -1)
        
ShowSyncHudMsg(0g_msg_sync"Sniper vs Nemesis Mode !!!")
        
        
client_cmd(0"spk ^"%s^""g_play_soundsrandom_num(0sizeof g_play_sounds -1) ] )
        
        
remove_taskTASK_AMB )
        
        
#if defined AMBIENCE_SOUNDS
        
set_task2.0"start_ambience_sounds"TASK_AMB )
        
#endif
    
}
}

public 
zp_game_mode_selectedgameidid )
{
    if( 
gameid == g_gameid )
        
start_avs_mode( )
    
    return 
PLUGIN_CONTINUE
}

start_avs_mode( )
{
    static 
i_nemesisi_max_nemesisidi_alive
    i_alive 
fn_get_alive_players()
    
id 0
    
    i_max_nemesis 
floatround( ( i_alive get_pcvar_floatcvar_ratio ) ), floatround_ceil )
    
i_nemesis 0
    
    
while (i_nemesis i_max_nemesis)
    {
        if ( (++
id) > g_maxplayersid 1
        
        
if ( !is_user_alive(id) )
            continue;
        
        if (
random_num(15) == 1)
        {
            
zp_make_user_nemesis(id)
            
            
set_user_healthidfloatround(get_user_health(id) * get_pcvar_float(cvar_nemehp)) )
            
            
i_nemesis++
        }
    }
    
    for (
id 1id <= g_maxplayersid++)
    {
        if ( !
is_user_alive(id) || zp_get_user_nemesis(id) )
            continue;
            
        
zp_make_user_sniper(id)
        
        
set_user_healthidfloatround(get_user_health(id) * get_pcvar_float(cvar_sniperhp)) )
    }
}

#if defined AMBIENCE_SOUNDS
public start_ambience_sounds( )
{
    static 
amb_sound[64], soundFloat:duration

    sound 
random_num0sizeof g_sound_ambience )
    
copyamb_soundsizeof amb_sound g_sound_ambiencesound ] )
    
duration g_sound_ambience_durationsound ]
    
    if ( 
equalamb_soundstrlenamb_sound ) - ], ".mp3" ) )
        
client_cmd0"mp3 play ^"sound/%s^""amb_sound )
    else
        
client_cmd0"spk ^"%s^""sound )
    
    
set_taskduration"start_ambience_sounds"TASK_AMB )
}
public 
zp_round_endedwinteam )
{
    
remove_taskTASK_AMB )
}
#endif

fn_get_alive_players( )
{
    static 
i_aliveid
    i_alive 
0
    
    
for ( id 1id <= g_maxplayersid++ )
    {
        if( 
is_user_aliveid ) )
            
i_alive++
    }
    return 
i_alive;

__________________
Keys PK is offline
Send a message via Skype™ to Keys PK
bakir123
Senior Member
Join Date: Jan 2015
Location: Palestine, Hebron
Old 04-23-2015 , 06:26   Re: sniper vs nemesis mode
Reply With Quote #5

Quote:
Originally Posted by Obada View Post
You're not allowed to post .amxx files.
why man ? and ? what do u need?
يا عبيدة؟ خير شو بدك ؟
bakir123 is offline
Send a message via Skype™ to bakir123
Kia
AlliedModders Donor
Join Date: Apr 2010
Location: In a world of madness
Old 04-23-2015 , 06:52   Re: sniper vs nemesis mode
Reply With Quote #6

Quote:
Originally Posted by bakir123 View Post
why man ? and ? what do u need?
يا عبيدة؟ خير شو بدك ؟
Only staff members are allowed to post binary files. Read the board rules.
__________________
Kia is offline
StarMpK
Member
Join Date: Feb 2014
Location: Romania , Cluj
Old 04-23-2015 , 09:56   Re: sniper vs nemesis mode
Reply With Quote #7

thx Keys it's working great. [RO] Dau o bere )

Last edited by StarMpK; 04-23-2015 at 10:05.
StarMpK is offline
Keys PK
Member
Join Date: Mar 2015
Location: Romania
Old 04-23-2015 , 14:50   Re: sniper vs nemesis mode
Reply With Quote #8

[EN] I'm glad it's working , didn't test it
[RO] Ma bucur ca merge ) nu l-am testat, ms de bere xdd
__________________
Keys PK is offline
Send a message via Skype™ to Keys PK
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 01:35.


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