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

[ZP] Addon: First Zombie Translucent/Invisible || v0.4


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Without Soul
New Member
Join Date: Nov 2010
Location: Ukraine
Old 11-15-2010 , 09:22   [ZP] Addon: First Zombie Translucent/Invisible || v0.4
Reply With Quote #1

[ZP] Addon: First Zombie Translucent/Invisible || v0.4

Author: Arseny aka Without Soul
Version: 0.4 (18.11.2010)

Requirements:
Zombie Plague, Fun

Description:
Gives to the first zombie or translucent, or invisibility on certain quantity of seconds (set CVars).
Also the warning message is shown to all people, depending from chosen mode.

PS It is my first plugin, don't judge strictly

Install:
1) Extract archive.
2) Next modules and includes may be enabled/present: Zombie Plague, Fun.
3) File "zp_fz_translucent.amxx" place in amxmodx/plugins.
4) File "zp_fz_translucent.txt" place in amxmodx/data/lang.
5) File "zp_fz_translucent.sma" place in amxmodx/scripting.
6) Write "zp_fz_translucent.amxx" in plugins.ini.
7) Restart server.

CVars:
zp_fz_mode <1|0> // Mode: 0 - translucent, 1 - invisibility. Default - 0.
zp_fz_amount <0-100> // Percent of visibility of first zombie, from 0 to 100 % (if zp_fz_mode = 0). Default - 50%.
zp_fz_duration <1-30> // Time on which invisibility is given (if zp_fz_mode = 1). Default - 10 seconds.
zp_fz_warn_humans <1|0> // Warn or not humans. Default - 1.

Credits:
Weltgericht
Excalibur.007

Changelog:
Code:
0.1		First release.
	
0.2		Added a new mode: a semi-transparent for the entire round, either complete invisibility of a certain number of seconds (specified CVar).
		Added three CVars.
		Added a language file.
	      
0.3		FIX: Invisible in Nemesis.
		Warning to all people, depending of type of regime (controlled CVar).

0.4		CVar "zp_fz_amount" now depending from 0 to 100 %.
		Fixed shadow under invisible & translucent zombie.
Sorry for my bad English, i use translator.
Attached Files
File Type: zip zp_fz_translucent.zip (6.7 KB, 2205 views)

Last edited by Without Soul; 11-18-2010 at 11:16. Reason: New version (0.4)
Without Soul is offline
Send a message via ICQ to Without Soul Send a message via Skype™ to Without Soul
Excalibur.007
Veteran Member
Join Date: Sep 2009
Location: Singapore
Old 11-17-2010 , 18:20   Re: [ZP] Addon: First Zombie Translucent
Reply With Quote #2

Quite original.

Allow the CVar to make more than 99 . Although, your main idea is to make it transclucent, some people may want to add more than that or make it fully invis.

This is mine when I needed it.
PHP Code:
set_user_rendering(idkRenderFxNone000kRenderTransAlpha255
Using kRenderFxNone is better than glowshell. It destroys the invis. Try comparing kRenderFxNone and kRenderFxGlowShell with kRenderTransAlpha.

If you set alpha to like 50 or below, you most likely will see them during the light. (Darkest will make them almost fully invis). You can spot them with flashlight as well! Use flashlight at them, you will notice there's a shadow on the floor. (ONLY APPLIES TO kRenderFxNone)
Excalibur.007 is offline
georgik57
Veteran Member
Join Date: Oct 2008
Location: 🎧Music World
Old 11-17-2010 , 23:39   Re: [ZP] Addon: First Zombie Translucent
Reply With Quote #3

nice idea
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
Without Soul
New Member
Join Date: Nov 2010
Location: Ukraine
Old 11-18-2010 , 11:03   Re: [ZP] Addon: First Zombie Translucent
Reply With Quote #4

Thanks all for comments!

UPDATE:
CVar "zp_fz_amount" now depending from 0 to 100 %.
Fixed shadow under invisible & translucent zombie.

Enjoy %)
Without Soul is offline
Send a message via ICQ to Without Soul Send a message via Skype™ to Without Soul
albert123
Veteran Member
Join Date: Mar 2009
Location: VietNam, Hai Phong
Old 11-18-2010 , 11:05   Re: [ZP] Addon: First Zombie Translucent
Reply With Quote #5

Good, i like it.
__________________
albert123 is offline
SaBBa
Member
Join Date: Dec 2012
Old 01-23-2015 , 03:32   Re: [ZP] Addon: First Zombie Translucent/Invisible || v0.4
Reply With Quote #6

Works fine,
Thanks
__________________
SaBBa is offline
Slavut1chh
Member
Join Date: Jul 2010
Location: N/A
Old 12-11-2015 , 13:27   Re: [ZP] Addon: First Zombie Translucent/Invisible || v0.4
Reply With Quote #7

Zombie is translucent on:
Survivor
Swarm
Multi

Also zombie is still translucent after 10 seconds.

Zombie Plague 5.0.8
__________________
Quote:
Originally Posted by tei1995 View Post
nobody care about fps when play zombie mod

Last edited by Slavut1chh; 12-11-2015 at 13:28.
Slavut1chh is offline
Krtola
Veteran Member
Join Date: Oct 2013
Location: Serbia
Old 12-14-2015 , 17:33   Re: [ZP] Addon: First Zombie Translucent/Invisible || v0.4
Reply With Quote #8

In this version invisibility is blocked in swarm and survivor round.
I do not know how to set up for multi.
About timer(seconds),is there any error in logs?
PHP Code:
#include <amxmodx>
#include <zombieplague>
#include <fun>

#define PLUGIN_NAME        "[ZP] Addon: First Zombie Translucent/Invisible"
#define PLUGIN_VERSION    "0.4"
#define PLUGIN_AUTHOR    "Arseny aka Without Soul"

new Timer[33];
new 
g_HudSync;
new 
cvar_Modecvar_Amountcvar_Durationcvar_WarnHumans;

public 
plugin_init() {
    
register_plugin(PLUGIN_NAMEPLUGIN_VERSIONPLUGIN_AUTHOR);
    
register_dictionary("zp_fz_translucent.txt");
    
    
cvar_Mode register_cvar("zp_fz_mode""0");
    
cvar_Amount register_cvar("zp_fz_amount""50");
    
cvar_Duration register_cvar("zp_fz_duration""10");
    
cvar_WarnHumans register_cvar("zp_fz_warn_humans""1");
    
    
g_HudSync CreateHudSyncObj();
}

public 
zp_user_infected_post(idinfector) {
    if(!
is_user_connected(id)) {
        return;
    }
    
    if(
zp_get_user_first_zombie(id)) {
        if(
zp_get_user_zombie(id) && !zp_get_user_nemesis(id)) {
            if(
get_pcvar_num(cvar_Mode) <= 0) {
                if(
get_pcvar_num(cvar_Amount) < 0) {
                    
set_pcvar_num(cvar_Amount0);
                }
                if(
get_pcvar_num(cvar_Amount) > 100) {
                    
set_pcvar_num(cvar_Amount100);
                }            
                
                
// thnx Excalibur.007
                
set_user_rendering(idkRenderFxNone000kRenderTransAlphaget_pcvar_num(cvar_Amount));
                
                
set_hudmessage(2552550, -1.00.311.05.01.01.0, -1);
                
ShowSyncHudMsg(idg_HudSync"%L"id"TRANSLUCENT"get_pcvar_num(cvar_Amount));
            }
            if(
get_pcvar_num(cvar_Mode) >= 1) {
                
Timer[id] = get_pcvar_num(cvar_Duration);
                
                
invisibility(id);
            }
            
            
warn_humans();
        }
    }
    else {
        
set_user_rendering(idkRenderFxNone0,0,0kRenderNormal255);
    }
}    

public 
invisibility(id) {
    if(!
is_user_connected(id) || zp_is_survivor_round() || zp_is_swarm_round()) {
        return;
    }
    
    if(
is_user_alive(id) && !zp_get_user_nemesis(id)) {    
        if(
Timer[id] <= 0) {
            
set_user_rendering(idkRenderFxNone0,0,0kRenderNormal255);
        
            
set_hudmessage(25500, -1.00.312.02.01.01.0, -1);
            
ShowSyncHudMsg(idg_HudSync"%L"id"INVISIBILITY_OFF");
        
            return;
        }
        
        
// thnx Excalibur.007
        
set_user_rendering(idkRenderFxNone000kRenderTransAlpha0);
        
        
Timer[id]--;
        
        
set_hudmessage(2552550, -1.00.310.993.00.050.05, -1);
        
ShowSyncHudMsg(idg_HudSync"%L"id"INVISIBILITY_REMAINING"Timer[id]);
        
        
set_task(1.0"invisibility"id);
    }
}

public 
warn_humans() {
    
    
// thnx Weltgericht 
    
new maxplayers get_maxplayers();

    for(new 
0<= maxplayersi++) { 
        if(
is_user_alive(i) && !zp_get_user_zombie(i) && get_pcvar_num(cvar_WarnHumans) >= 1) {            
            
set_hudmessage(2552550, -1.00.311.05.01.01.0, -1);
            if(
get_pcvar_num(cvar_Mode) <= 0) {
                
ShowSyncHudMsg(ig_HudSync"%L"i"WARN_TRANSLUCENT"get_pcvar_num(cvar_Amount));
            }
            else {
                
ShowSyncHudMsg(ig_HudSync"%L"i"WARN_INVISIBILITY"get_pcvar_num(cvar_Duration));
            }
        } 
    } 


public 
zp_user_humanized_post(id) {
    
set_user_rendering(idkRenderFxNone0,0,0kRenderNormal255);    

Krtola is offline
Send a message via Skype™ to Krtola
Slavut1chh
Member
Join Date: Jul 2010
Location: N/A
Old 12-20-2015 , 12:16   Re: [ZP] Addon: First Zombie Translucent/Invisible || v0.4
Reply With Quote #9

Thx but it doesn't work.
And no,there are no errors in logs.
__________________
Quote:
Originally Posted by tei1995 View Post
nobody care about fps when play zombie mod

Last edited by Slavut1chh; 12-20-2015 at 12:18.
Slavut1chh 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 01:45.


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