Raised This Month: $ Target: $400
 0% 

[ZP] Addon: Protect the Nemesis/Survivor


Post New Thread Reply   
 
Thread Tools Display Modes
georgik57
Veteran Member
Join Date: Oct 2008
Location: 🎧Music World
Old 07-31-2010 , 14:10   Re: [ZP] Addon: Protect the Nemesis/Survivor
Reply With Quote #11

sounds nice
good job
__________________
georgik57 is offline
Send a message via MSN to georgik57 Send a message via Yahoo to georgik57 Send a message via Skype™ to georgik57
sk@.@
Senior Member
Join Date: Feb 2010
Location: Hong Kong
Old 07-31-2010 , 14:16   Re: [ZP] Addon: Protect the Nemesis/Survivor
Reply With Quote #12

This will good xD


Code:
#include <amxmodx>
#include <zombieplague>
#include <hamsandwich>
#include <fakemeta>

#define PLUGIN "[ZP] Addon: Protect the menesis"
#define VERSION "1.0"
#define AUTHOR "fiendshard"

new cvar_botquota
public plugin_init() 
{
	register_plugin(PLUGIN, VERSION, AUTHOR)
	RegisterHam(Ham_Killed, "player", "fw_PlayerKilled")
	cvar_botquota = get_cvar_pointer("bot_quota")
}

public fw_PlayerKilled(victim, attacker, shouldgib)
{
	new vic1, id
	if(zp_get_user_nemesis(victim)) vic1 = 1
	if(zp_get_user_survivor(victim)) vic1 = 2

	for(id = 0; id <= 32; id++)
	{
		if (!is_user_alive(id))
			continue;

		if (vic1 == 1)
		{
			if (zp_get_user_zombie(id)) ExecuteHamB(Ham_Killed, id, id, 2)
			continue;
		}
		else if (vic1 == 2)
		{
			if (!zp_get_user_zombie(id)) ExecuteHamB(Ham_Killed, id, id, 2)
			continue;
		}
	}
}

new bool:BotHasDebug = false
public client_putinserver(id)
{
	if (!cvar_botquota || !is_user_bot(id) || BotHasDebug)
		return;
	
	new classname[32]
	pev(id, pev_classname, classname, 31)
	
	if (!equal(classname, "player"))
		set_task(0.1, "_Debug", id)
}

public _Debug(id)
{
	// Make sure it's a CZ bot and it's still connected
	if (!get_pcvar_num(cvar_botquota) || !is_user_connected(id))
		return;
	
	BotHasDebug = true
	
	RegisterHamFromEntity(Ham_Killed, id, "fw_PlayerKilled")
}
__________________
This is my Game-Blog:
http://hsk-game.blogspot.hk/

Last edited by sk@.@; 07-31-2010 at 14:28.
sk@.@ is offline
Send a message via MSN to sk@.@
abdul-rehman
Veteran Member
Join Date: Jan 2010
Location: Khi, Pakistan
Old 07-31-2010 , 14:23   Re: [ZP] Addon: Protect the Nemesis/Survivor
Reply With Quote #13

How about this:
Code:
#include <amxmodx> #include <zombieplague> #include <fakemeta> public plugin_init() {     register_plugin("What", "the", "hell")     register_event("DeathMsg", "player_die", "a") } public player_die() {     new victim = read_data(2)     if (zp_get_user_survivor(victim))     {         new id         for(id = 1; id <= get_maxplayers(); id++)         {             if (!zp_get_user_zombie(id) && is_user_alive(id))                 dllfunc(DLLFunc_ClientKill, id)         }     }     else if (zp_get_user_nemesis(victim))     {         new id         for(id = 1; id <= get_maxplayers(); id++)         {             if (zp_get_user_zombie(id) && is_user_alive(id))                 dllfunc(DLLFunc_ClientKill, id)         }     } }
It will also work on CZ Bots
__________________

My Plugins For ZP

Inactive due to College and Studies
abdul-rehman is offline
Send a message via Yahoo to abdul-rehman Send a message via Skype™ to abdul-rehman
fiendshard
Senior Member
Join Date: Dec 2009
Location: In Water
Old 07-31-2010 , 14:31   Re: [ZP] Addon: Protect the Nemesis/Survivor
Reply With Quote #14

Quote:
Originally Posted by abdul-rehman View Post
I read this in the plugin's source:


I think you can make that game mode since you have already made it's base by making this plugin...
yeah, it was just a note
__________________
fiendshard is offline
bibu
Veteran Member
Join Date: Sep 2010
Old 05-20-2011 , 12:04   Re: [ZP] Addon: Protect the Nemesis/Survivor
Reply With Quote #15

Both plugins into 1 including 3 cvars:

zp_kill_not_decrease_frags (When is set to 1 then death won't decrase frags.)
zp_kill_nemesis
zp_kill_survivor

Should be also a bit more optimized.

PHP Code:
#include <amxmodx>
#include <zombieplague>

#define PLUGIN "[ZP] Addon: Protect the nemesis / survivor (edited)"
#define VERSION "1.0"
#define AUTHOR "fiendshard"

new zp_not_decrase_fragszp_kill_nemesiszp_kill_survivor

public plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
zp_not_decrase_frags register_cvar("zp_kill_not_decrease_frags""1")
    
zp_kill_nemesis register_cvar("zp_kill_nemesis""1")
    
zp_kill_survivor register_cvar("zp_kill_survivor""1")
    
    
register_event("DeathMsg""player_die""a")
}

public 
player_die()
{
    new 
victim read_data(2)
    
    if(
zp_get_user_nemesis(victim) && get_pcvar_num(zp_kill_nemesis))
    {
        new 
flag get_pcvar_num(zp_not_decrase_frags)
    
        new 
players[32], totalplayers
        get_players
(playerstotalplayers)   
        for(new 
0totalplayersi++)
        {
            if(
zp_get_user_zombie(players[i]))
                
user_kill(players[i], flag)
        }
    }
    else if(
zp_get_user_survivor(victim) && get_pcvar_num(zp_kill_survivor))
    {
        new 
flag get_pcvar_num(zp_not_decrase_frags)
    
        new 
players[32], totalplayers
        get_players
(playerstotalplayers)   
        for(new 
0totalplayersi++)
        {
            if(!
zp_get_user_zombie(players[i]))
                
user_kill(players[i], flag)
        }
    }


Last edited by bibu; 05-20-2011 at 14:13.
bibu is offline
Catastrophe
Veteran Member
Join Date: Jul 2012
Location: somewhere between narnia
Old 04-17-2013 , 10:46   Re: [ZP] Addon: Protect the Nemesis/Survivor
Reply With Quote #16

It shows... smthing like msg unreliable or smthing how to fix it ?
Catastrophe is offline
Podarok
BANNED
Join Date: Jan 2011
Location: Narnia
Old 04-17-2013 , 11:06   Re: [ZP] Addon: Protect the Nemesis/Survivor
Reply With Quote #17

Quote:
Originally Posted by Catastrophe View Post
It shows... smthing like msg unreliable or smthing how to fix it ?
Contact layka_LUBII for help
Podarok is offline
gpower
Member
Join Date: Sep 2012
Old 04-17-2013 , 17:19   Re: [ZP] Addon: Protect the Nemesis/Survivor
Reply With Quote #18

Good Idea !
__________________
gpower is offline
Send a message via Skype™ to gpower
gpower
Member
Join Date: Sep 2012
Old 04-17-2013 , 17:29   Re: [ZP] Addon: Protect the Nemesis/Survivor
Reply With Quote #19

PHP Code:
public client_disconnect(id)
{
    if(
zp_get_user_nemesis(id) && zp_is_plague_round())
    {
        new 
players[32], totalplayers
        get_players
(playerstotalplayers)   
        for(new 
0totalplayersi++)
        {
            if(
zp_get_user_zombie(players[i]) && is_user_alive(players[i]))
                
user_kill(players[i], flag)
        }
    }

__________________
gpower is offline
Send a message via Skype™ to gpower
Catastrophe
Veteran Member
Join Date: Jul 2012
Location: somewhere between narnia
Old 04-18-2013 , 00:53   Re: [ZP] Addon: Protect the Nemesis/Survivor
Reply With Quote #20

whose :-
Quote:
layka_LUBII
?

Also gpower can u code it for zp50 ? i dont have pretty much scripting skills.... so i tried but had sm probs..

Last edited by Catastrophe; 04-18-2013 at 00:54.
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 21:12.


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