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

[ZP] Addon : Last Human Pain Shock Free


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Dolph_Ziggler
BANNED
Join Date: Jun 2011
Old 06-06-2011 , 10:55   [ZP] Addon : Last Human Pain Shock Free
Reply With Quote #1

[ZP] Addon : Last Human Pain Shock Free


Plugin Description:
This add the last human pain shock free.

Cvars:
zp_last_human_pain_free // Enable/Disable last human psf [0-Disable/1-Enabled]
zp_human_pain_free_in_swarm // Enable/Disable human psf in swarm round [0-Disable/1-Enabled] - default : 0
Attached Files
File Type: sma Get Plugin or Get Source (zp_addons_last_human_pain_free.sma - 2265 views - 942 Bytes)

Last edited by Dolph_Ziggler; 06-06-2011 at 11:04.
Dolph_Ziggler is offline
Send a message via MSN to Dolph_Ziggler
dias
BANNED
Join Date: Jul 2009
Location: South Vietnam
Old 06-06-2011 , 11:00   Re: [ZP] Addon : Last Human Pain Shock Free
Reply With Quote #2

Edit your title in your post ...
-> added this thread to new plugins list
dias is offline
Send a message via Yahoo to dias Send a message via Skype™ to dias
georgik57
Veteran Member
Join Date: Oct 2008
Location: 🎧Music World
Old 06-06-2011 , 11:01   Re: [ZP] Addon : Last Human Pain Shock Free
Reply With Quote #3

very nice idea
adding this to my zp too xD
__________________
georgik57 is offline
Send a message via MSN to georgik57 Send a message via Yahoo to georgik57 Send a message via Skype™ to georgik57
Dolph_Ziggler
BANNED
Join Date: Jun 2011
Old 06-06-2011 , 11:04   Re: [ZP] Addon : Last Human Pain Shock Free
Reply With Quote #4

Quote:
Originally Posted by dias View Post
Edit your title in your post ...
-> added this thread to new plugins list
@dias oyyyyyyyyy xDD edited xD
@geaorgik thank you xD
Dolph_Ziggler is offline
Send a message via MSN to Dolph_Ziggler
ms@.@
Junior Member
Join Date: May 2011
Old 06-07-2011 , 10:17   Re: [ZP] Addon : Last Human Pain Shock Free
Reply With Quote #5

GoooooooooooooD
__________________
[Korea ZombiePlague Server]

쵸코의 좀비서버 QQ:1917582796

ChocoCs.Wowip.Co.Kr:27015
ms@.@ is offline
Dolph_Ziggler
BANNED
Join Date: Jun 2011
Old 06-07-2011 , 13:02   Re: [ZP] Addon : Last Human Pain Shock Free
Reply With Quote #6

Quote:
Originally Posted by ms@.@ View Post
GoooooooooooooD
thnx
Dolph_Ziggler is offline
Send a message via MSN to Dolph_Ziggler
GraviAnt
Senior Member
Join Date: Oct 2010
Old 06-21-2011 , 18:26   Re: [ZP] Addon : Last Human Pain Shock Free
Reply With Quote #7

Awesome, thanks!
GraviAnt is offline
Excalibur.007
Veteran Member
Join Date: Sep 2009
Location: Singapore
Old 06-21-2011 , 20:32   Re: [ZP] Addon : Last Human Pain Shock Free
Reply With Quote #8

There should be credits to this e.g. Pain shock free code. I believe it's someone else right?

This is better

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

new cvar_last_human_pain_freecvar_human_pain_free_swarm
new cached_last_human_pain_freecached_human_pain_free_swarm

const OFFSET_LINUX 5
const OFFSET_PAINSHOCK 108
const PDATA_SAFE 2

#define PLUGIN "[ZP] Last Human Pain Shock Free"
#define VERSION "0.1"
#define AUTHOR "Dolph_Ziggler"

new g_bitZombiePlayersg_bitLastHumanPlayers

#define MarkUserZombie(%0)       g_bitZombiePlayers |= (1 << (%0 & 31))
#define ClearUserZombie(%0)      g_bitZombiePlayers &= ~(1 << (%0 & 31))
#define IsUserZombie(%0)    g_bitZombiePlayers & (1 << (%0 & 31))

#define MarkUserLastHuman(%0)   g_bitLastHumanPlayers |= (1 << (%0 & 31))
#define ClearUserLastHuman(%0)  g_bitLastHumanPlayers &= ~(1 << (%0 & 31))
#define IsUserLastHuman(%0)    g_bitLastHumanPlayers & (1 << (%0 & 31))

new bool:bInSwarm

public plugin_init()
{    
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_event("HLTV""event_new_round""a""1=0""2=0")
    
    
RegisterHam(Ham_TakeDamage"player""Player_TakeDamage"1)
    
    
cvar_last_human_pain_free register_cvar("zp_last_human_pain_free""1"
    
cvar_human_pain_free_swarm register_cvar("zp_human_pain_free_in_swarm""0")
}

public 
client_disconnect(id)
{
    
ClearUserZombie(id)
    
ClearUserLastHuman(id)
}

public 
event_new_round()
{
    
cached_last_human_pain_free get_pcvar_num(cvar_last_human_pain_free)
    
cached_human_pain_free_swarm get_pcvar_num(cvar_human_pain_free_swarm)
    
    new 
iPlayers[32], iNum
    get_players
(iPlayersiNum)
    
    for(new 
0iNumi++)
    {
        
ClearUserZombie(i)
        
ClearUserLastHuman(i)
    }
}

public 
Player_TakeDamage(id)
{
    if(
pev_valid(id) != PDATA_SAFE)
        return 
HAM_IGNORED
        
    
if(IsUserZombie(id))
        return 
HAM_IGNORED
        
    
if (IsUserLastHuman(id) && cached_last_human_pain_free)
    {
        
set_pdata_float(idOFFSET_PAINSHOCK1.0OFFSET_LINUX)
    }
    else if (
bInSwarm && cached_human_pain_free_swarm)
    {
        
set_pdata_float(idOFFSET_PAINSHOCK1.0OFFSET_LINUX)
    }
    
    return 
HAM_IGNORED
}

public 
zp_round_started(gamemode)
{
    if(
gamemode == MODE_SWARM)
        
bInSwarm true
    
else
        
bInSwarm false // Reset it on a new mode start
}

public 
zp_user_infected_post(id)
{
    
MarkUserZombie(id)
}

public 
zp_user_humanized_post(id)
{
    
ClearUserZombie(id)
}

public 
zp_user_last_human(id)
{
    
MarkUserLastHuman(id)

Excalibur.007 is offline
tei1995
Senior Member
Join Date: Feb 2011
Location: VietNam
Old 06-21-2011 , 22:07   Re: [ZP] Addon : Last Human Pain Shock Free
Reply With Quote #9

you can use some native in zp 4.3 new native, its easy
__________________

Hatsune Miku~
tei1995 is offline
Excalibur.007
Veteran Member
Join Date: Sep 2009
Location: Singapore
Old 06-22-2011 , 00:56   Re: [ZP] Addon : Last Human Pain Shock Free
Reply With Quote #10

Quote:
Originally Posted by tei1995 View Post
you can use some native in zp 4.3 new native, its easy
I still prefer the ZP 4.3 Fix3 though. Although it creates some problems, which can be fixed, with setting speed after the updates.
Excalibur.007 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 15:24.


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