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

[ZP] Last human is survivor


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
miccino9408
Member
Join Date: Feb 2009
Old 02-23-2009 , 15:15   [ZP] Last human is survivor
Reply With Quote #1

In zombie_plague40.sma search:

PHP Code:
if (!g_lasthuman[id]) fm_set_user_health(idpev(idpev_health)+get_pcvar_num(cvar_humanlasthp)) 
And put

PHP Code:
set_hudmessage(2020255HUD_EVENT_XHUD_EVENT_Y10.05.01.01.0, -1)
new 
name[32]
get_user_name(idname31)
show_hudmessage(0"%s is the last human!"name)
humanme(id1
Simple

Edit:
You have to put
Quote:
zp_respawn_after_last_human 0

Last edited by miccino9408; 02-24-2009 at 13:49.
miccino9408 is offline
filo
BANNED
Join Date: Jul 2008
Location: Venezuela, What did you
Old 02-24-2009 , 11:48   Re: [ZP] Last human is survivor
Reply With Quote #2

WaW I've looking for this for so long
filo is offline
Send a message via AIM to filo Send a message via MSN to filo
AfteR.
Veteran Member
Join Date: Dec 2008
Location: λ
Old 02-24-2009 , 11:51   Re: [ZP] Last human is survivor
Reply With Quote #3

what happens if zp_deathmatch is set to 3 ? T_T
AfteR. is offline
miccino9408
Member
Join Date: Feb 2009
Old 02-24-2009 , 13:48   Re: [ZP] Last human is survivor
Reply With Quote #4

Oh, I forget
You have to put:
Quote:
zp_respawn_after_last_human 0
-------------------------------------------------------
Quote:
Originally Posted by filo View Post
WaW I've looking for this for so long

Last edited by miccino9408; 02-24-2009 at 13:50.
miccino9408 is offline
filo
BANNED
Join Date: Jul 2008
Location: Venezuela, What did you
Old 02-25-2009 , 13:42   Re: [ZP] Last human is survivor
Reply With Quote #5

Quote:
Originally Posted by AfteR. View Post
what happens if zp_deathmatch is set to 3 ? T_T
If you want zp_deathmatch to 3 you can't use this, so simple
filo is offline
Send a message via AIM to filo Send a message via MSN to filo
lionel_lo
Member
Join Date: Aug 2008
Old 02-25-2009 , 13:47   Re: [ZP] Last human is survivor
Reply With Quote #6

Who can tell me How to turn off the survivors of unlimited Clip Ammo??

THX!!
lionel_lo is offline
filo
BANNED
Join Date: Jul 2008
Location: Venezuela, What did you
Old 02-26-2009 , 18:28   Re: [ZP] Last human is survivor
Reply With Quote #7

@miccino9408 What possibilty there are to make play a sound where there is a single human left??
Quote:
Originally Posted by lionel_lo View Post
Who can tell me How to turn off the survivors of unlimited Clip Ammo??

THX!!
I found this:
Code:
/*================================================================================
 [Message Hooks]
=================================================================================*/

// Current Weapon info
public message_cur_weapon(msg_id, msg_dest, msg_entity)
{
    // Player not alive or not an active weapon
    if (!is_user_alive(msg_entity) || get_msg_arg_int(1) != 1)
        return;
    
    // Get weapon id
    static weapon
    weapon = get_msg_arg_int(2)
    
    // Store weapon id for reference
    g_currentweapon[msg_entity] = weapon
    
    // Replace weapon models with custom ones
    replace_models(msg_entity)
    
    // Unlimited Clip Ammo?
    if (MAXBPAMMO[weapon] > 2 && (g_survivor[msg_entity] || get_pcvar_num(cvar_infammo) > 1))
    {
        // Refill when it's running out
        if (get_msg_arg_int(3) < 7)
        {
            // Get weapon entity
            static wname[32], weapon_ent
            get_weaponname(weapon, wname, sizeof wname - 1)
            weapon_ent = fm_find_ent_by_owner(-1, wname, msg_entity)
            
            // Max out clip ammo
            fm_set_weapon_ammo(weapon_ent, MAXCLIP[weapon])
        }
        
        // HUD should show full clip all the time
        set_msg_arg_int(3, get_msg_argtype(3), MAXCLIP[weapon])
    }
}

// BP Ammo update
public message_ammo_x(msg_id, msg_dest, msg_entity)
{
    // Get ammo type
    static type
    type = get_msg_arg_int(1)
    
    // Unknown ammo type
    if (type >= sizeof AMMOWEAPON) return;
    
    // Get weapon id
    static weapon
    weapon = AMMOWEAPON[type]
    
    // Primary and secondary only
    if (MAXBPAMMO[weapon] > 2)
    {
        // Get ammo amount
        static amount
        amount = get_msg_arg_int(2)
        
        // Unlimited BP Ammo?
        if (g_survivor[msg_entity] || get_pcvar_num(cvar_infammo))
        {
            if (amount < MAXBPAMMO[weapon])
            {
                fm_set_user_bpammo(msg_entity, weapon, MAXBPAMMO[weapon])
                set_msg_arg_int(2, get_msg_argtype(2), MAXBPAMMO[weapon])
            }
        }
        // Bots automatically buy ammo when needed
        else if (!g_zombie[msg_entity] && !g_survivor[msg_entity] && g_ammopacks[msg_entity] > 0 && amount <= BUYAMMO[weapon] && is_user_bot(msg_entity))
            clcmd_buyammo(msg_entity);
    }
}
I Added this:

Code:
/*================================================================================
 [Message Hooks]
=================================================================================*/

// Current Weapon info
public message_cur_weapon(msg_id, msg_dest, msg_entity)
{
    // Player not alive or not an active weapon
    if (!is_user_alive(msg_entity) || get_msg_arg_int(1) != 1)
        return;
    
    // Get weapon id
    static weapon
    weapon = get_msg_arg_int(2)
    
    // Store weapon id for reference
    g_currentweapon[msg_entity] = weapon
    
    // Replace weapon models with custom ones
    replace_models(msg_entity)
    
    // Unlimited Clip Ammo?
    if (MAXBPAMMO[weapon] > 2 && (!g_survivor[msg_entity] || get_pcvar_num(cvar_infammo) > 1))
    {
        // Refill when it's running out
        if (get_msg_arg_int(3) < 7)
        {
            // Get weapon entity
            static wname[32], weapon_ent
            get_weaponname(weapon, wname, sizeof wname - 1)
            weapon_ent = fm_find_ent_by_owner(-1, wname, msg_entity)
            
            // Max out clip ammo
            fm_set_weapon_ammo(weapon_ent, MAXCLIP[weapon])
        }
        
        // HUD should show full clip all the time
        set_msg_arg_int(3, get_msg_argtype(3), MAXCLIP[weapon])
    }
}

// BP Ammo update
public message_ammo_x(msg_id, msg_dest, msg_entity)
{
    // Get ammo type
    static type
    type = get_msg_arg_int(1)
    
    // Unknown ammo type
    if (type >= sizeof AMMOWEAPON) return;
    
    // Get weapon id
    static weapon
    weapon = AMMOWEAPON[type]
    
    // Primary and secondary only
    if (MAXBPAMMO[weapon] > 2)
    {
        // Get ammo amount
        static amount
        amount = get_msg_arg_int(2)
        
        // Unlimited BP Ammo?
        if (!g_survivor[msg_entity] || get_pcvar_num(cvar_infammo))
        {
            if (amount < MAXBPAMMO[weapon])
            {
                fm_set_user_bpammo(msg_entity, weapon, MAXBPAMMO[weapon])
                set_msg_arg_int(2, get_msg_argtype(2), MAXBPAMMO[weapon])
            }
        }
        // Bots automatically buy ammo when needed
        else if (!g_zombie[msg_entity] && !g_survivor[msg_entity] && g_ammopacks[msg_entity] > 0 && amount <= BUYAMMO[weapon] && is_user_bot(msg_entity))
            clcmd_buyammo(msg_entity);
    }
}
And the Survivor has not Unlimited ammo anymore, but he can't buy anymore so at this line delete the ! from g_survivor
Code:
        // Bots automatically buy ammo when needed
        else if (!g_zombie[msg_entity] && !g_survivor[msg_entity] && g_ammopacks[msg_entity] > 0 && amount <= BUYAMMO[weapon] && is_user_bot(msg_entity))
            clcmd_buyammo(msg_entity);
    }
So the Bots can buy more ammo when survivor, but i dont know how to enable to player buy ammo as survivor.

Last edited by filo; 02-26-2009 at 18:58.
filo is offline
Send a message via AIM to filo Send a message via MSN to filo
Old 02-26-2009, 18:57
filo
This message has been deleted by filo. Reason: Accidentally Doble Post
lionel_lo
Member
Join Date: Aug 2008
Old 02-26-2009 , 20:41   Re: [ZP] Last human is survivor
Reply With Quote #8

Quote:
Originally Posted by filo View Post
@miccino9408 What possibilty there are to make play a sound where there is a single human left??


I found this:
Code:
/*================================================================================
 [Message Hooks]
=================================================================================*/
 
// Current Weapon info
public message_cur_weapon(msg_id, msg_dest, msg_entity)
{
    // Player not alive or not an active weapon
    if (!is_user_alive(msg_entity) || get_msg_arg_int(1) != 1)
        return;
 
    // Get weapon id
    static weapon
    weapon = get_msg_arg_int(2)
 
    // Store weapon id for reference
    g_currentweapon[msg_entity] = weapon
 
    // Replace weapon models with custom ones
    replace_models(msg_entity)
 
    // Unlimited Clip Ammo?
    if (MAXBPAMMO[weapon] > 2 && (g_survivor[msg_entity] || get_pcvar_num(cvar_infammo) > 1))
    {
        // Refill when it's running out
        if (get_msg_arg_int(3) < 7)
        {
            // Get weapon entity
            static wname[32], weapon_ent
            get_weaponname(weapon, wname, sizeof wname - 1)
            weapon_ent = fm_find_ent_by_owner(-1, wname, msg_entity)
 
            // Max out clip ammo
            fm_set_weapon_ammo(weapon_ent, MAXCLIP[weapon])
        }
 
        // HUD should show full clip all the time
        set_msg_arg_int(3, get_msg_argtype(3), MAXCLIP[weapon])
    }
}
 
// BP Ammo update
public message_ammo_x(msg_id, msg_dest, msg_entity)
{
    // Get ammo type
    static type
    type = get_msg_arg_int(1)
 
    // Unknown ammo type
    if (type >= sizeof AMMOWEAPON) return;
 
    // Get weapon id
    static weapon
    weapon = AMMOWEAPON[type]
 
    // Primary and secondary only
    if (MAXBPAMMO[weapon] > 2)
    {
        // Get ammo amount
        static amount
        amount = get_msg_arg_int(2)
 
        // Unlimited BP Ammo?
        if (g_survivor[msg_entity] || get_pcvar_num(cvar_infammo))
        {
            if (amount < MAXBPAMMO[weapon])
            {
                fm_set_user_bpammo(msg_entity, weapon, MAXBPAMMO[weapon])
                set_msg_arg_int(2, get_msg_argtype(2), MAXBPAMMO[weapon])
            }
        }
        // Bots automatically buy ammo when needed
        else if (!g_zombie[msg_entity] && !g_survivor[msg_entity] && g_ammopacks[msg_entity] > 0 && amount <= BUYAMMO[weapon] && is_user_bot(msg_entity))
            clcmd_buyammo(msg_entity);
    }
}
I Added this:

Code:
/*================================================================================
 [Message Hooks]
=================================================================================*/
 
// Current Weapon info
public message_cur_weapon(msg_id, msg_dest, msg_entity)
{
    // Player not alive or not an active weapon
    if (!is_user_alive(msg_entity) || get_msg_arg_int(1) != 1)
        return;
 
    // Get weapon id
    static weapon
    weapon = get_msg_arg_int(2)
 
    // Store weapon id for reference
    g_currentweapon[msg_entity] = weapon
 
    // Replace weapon models with custom ones
    replace_models(msg_entity)
 
    // Unlimited Clip Ammo?
    if (MAXBPAMMO[weapon] > 2 && (!g_survivor[msg_entity] || get_pcvar_num(cvar_infammo) > 1))
    {
        // Refill when it's running out
        if (get_msg_arg_int(3) < 7)
        {
            // Get weapon entity
            static wname[32], weapon_ent
            get_weaponname(weapon, wname, sizeof wname - 1)
            weapon_ent = fm_find_ent_by_owner(-1, wname, msg_entity)
 
            // Max out clip ammo
            fm_set_weapon_ammo(weapon_ent, MAXCLIP[weapon])
        }
 
        // HUD should show full clip all the time
        set_msg_arg_int(3, get_msg_argtype(3), MAXCLIP[weapon])
    }
}
 
// BP Ammo update
public message_ammo_x(msg_id, msg_dest, msg_entity)
{
    // Get ammo type
    static type
    type = get_msg_arg_int(1)
 
    // Unknown ammo type
    if (type >= sizeof AMMOWEAPON) return;
 
    // Get weapon id
    static weapon
    weapon = AMMOWEAPON[type]
 
    // Primary and secondary only
    if (MAXBPAMMO[weapon] > 2)
    {
        // Get ammo amount
        static amount
        amount = get_msg_arg_int(2)
 
        // Unlimited BP Ammo?
        if (!g_survivor[msg_entity] || get_pcvar_num(cvar_infammo))
        {
            if (amount < MAXBPAMMO[weapon])
            {
                fm_set_user_bpammo(msg_entity, weapon, MAXBPAMMO[weapon])
                set_msg_arg_int(2, get_msg_argtype(2), MAXBPAMMO[weapon])
            }
        }
        // Bots automatically buy ammo when needed
        else if (!g_zombie[msg_entity] && !g_survivor[msg_entity] && g_ammopacks[msg_entity] > 0 && amount <= BUYAMMO[weapon] && is_user_bot(msg_entity))
            clcmd_buyammo(msg_entity);
    }
}
And the Survivor has not Unlimited ammo anymore, but he can't buy anymore so at this line delete the ! from g_survivor
Code:
        // Bots automatically buy ammo when needed
        else if (!g_zombie[msg_entity] && !g_survivor[msg_entity] && g_ammopacks[msg_entity] > 0 && amount <= BUYAMMO[weapon] && is_user_bot(msg_entity))
            clcmd_buyammo(msg_entity);
    }
So the Bots can buy more ammo when survivor, but i dont know how to enable to player buy ammo as survivor.
This amendment will be unlimited bullets for each person
lionel_lo is offline
filo
BANNED
Join Date: Jul 2008
Location: Venezuela, What did you
Old 02-27-2009 , 09:47   Re: [ZP] Last human is survivor
Reply With Quote #9

Quote:
Originally Posted by lionel_lo View Post
This amendment will be unlimited bullets for each person
LOL xD Only Tested Being Survivor xD
filo is offline
Send a message via AIM to filo Send a message via MSN to filo
water
Member
Join Date: Feb 2009
Old 02-28-2009 , 12:20   Re: [ZP] Last human is survivor
Reply With Quote #10

Quote:
Originally Posted by miccino9408 View Post
In zombie_plague40.sma search:

PHP Code:
if (!g_lasthuman[id]) fm_set_user_health(idpev(idpev_health)+get_pcvar_num(cvar_humanlasthp)) 
And put

PHP Code:
set_hudmessage(2020255HUD_EVENT_XHUD_EVENT_Y10.05.01.01.0, -1)
new 
name[32]
get_user_name(idname31)
show_hudmessage(0"%s is the last human!"name)
humanme(id1
Simple

Edit:
You have to put
i don't know what to do. can you post the code together?
water 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 11:36.


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