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

API Scripting Help [HELP]Transparency not working corectly


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Depresie
Veteran Member
Join Date: Nov 2013
Old 02-23-2015 , 11:09   [HELP]Transparency not working corectly
Reply With Quote #1

so i have this code, but i got a problem, im trying to make the zombie 50 % percent visible, but everytime i put a lower value then 140 the zombie goes completly invisible.. i run this on zp 5.0 and cs video mode opengl
Code:
#include <amxmodx>
#include <fun>
#include <fakemeta>
#include <zp50_core>
#include <zp50_class_zombie>
#include <zp50_class_nemesis>
#include <zp50_class_assassin>
#include <zp50_class_hive>
#include <zp50_class_terror>
#include <zp50_class_sniper>

// Big Zombie Attributes
new const zombieclass4_name[] = "Shadow"
new const zombieclass4_info[] = "Stealth"
new const zombieclass4_models[][] = { "dna_shadow" }
new const zombieclass4_clawmodels[][] = { "models/zombie_plague/v_dna_shadow.mdl" }
const zombieclass4_health = 5700
const Float:zombieclass4_speed = 0.8
const Float:zombieclass4_gravity = 1.0
const Float:zombieclass4_knockback = 0.5

new g_ZombieClassID

public plugin_precache()
{
    register_plugin("[ZP] Class: Zombie: Shadow", "1.0", "ZP Dev Team")
    
    
    new index
    
    g_ZombieClassID = zp_class_zombie_register(zombieclass4_name, zombieclass4_info, zombieclass4_health, zombieclass4_speed, zombieclass4_gravity)
    zp_class_zombie_register_kb(g_ZombieClassID, zombieclass4_knockback)
    for (index = 0; index < sizeof zombieclass4_models; index++)
        zp_class_zombie_register_model(g_ZombieClassID, zombieclass4_models[index])
    for (index = 0; index < sizeof zombieclass4_clawmodels; index++)
        zp_class_zombie_register_claw(g_ZombieClassID, zombieclass4_clawmodels[index])
}

public zp_fw_core_infect_post(id)
{
    if(!is_user_alive(id) || !zp_core_is_zombie(id))
        return
        
    if(zp_class_zombie_get_current(id) != g_ZombieClassID)
        return
        
    if(zp_class_zombie_get_current(id) == g_ZombieClassID && !(zp_class_nemesis_get(id) || zp_class_assassin_get(id) || zp_class_hive_get(id) || zp_class_terror_get(id)))
    set_user_rendering(id, kRenderFxNone, 0, 0, 0, kRenderTransAlpha, 50)
}

Last edited by Depresie; 02-23-2015 at 12:39.
Depresie is offline
sirerick
Senior Member
Join Date: Jul 2012
Location: Venezuela
Old 02-23-2015 , 23:26   Re: [HELP]Transparency not working corectly
Reply With Quote #2

try this

PHP Code:
set_user_rendering(idkRenderFxHologram000kRenderTransAlpha125
sirerick is offline
RateX
Veteran Member
Join Date: Jun 2012
Location: 0o. SEA .o0
Old 02-23-2015 , 23:46   Re: [HELP]Transparency not working corectly
Reply With Quote #3

A simpler way:
PHP Code:
entity_set_float(idEV_FL_renderamt100.0
The value ranges from 0.0 to 255.0
__________________
Currently offline for study.
RateX is offline
WaLkMaN
Senior Member
Join Date: Oct 2010
Location: Varna, Bulgaria
Old 02-24-2015 , 16:52   Re: [HELP]Transparency not working corectly
Reply With Quote #4

BTW

Quote:
Originally Posted by ConnorMcLeod View Post
kRenderTransAlpha doesn't work good with software mode, use kRenderTransColor.
WaLkMaN is offline
Depresie
Veteran Member
Join Date: Nov 2013
Old 02-24-2015 , 18:16   Re: [HELP]Transparency not working corectly
Reply With Quote #5

thx, will try tomorow
Depresie is offline
Depresie
Veteran Member
Join Date: Nov 2013
Old 03-04-2015 , 22:29   Re: [HELP]Transparency not working corectly
Reply With Quote #6

Quote:
Originally Posted by RateX View Post
A simpler way:
PHP Code:
entity_set_float(idEV_FL_renderamt100.0
The value ranges from 0.0 to 255.0
not working
tried the other methods, it is the same, cannot make the character full invisible, but with the hologram code the issue is partial fixed, he is invisible from distance
Depresie is offline
Krtola
Veteran Member
Join Date: Oct 2013
Location: Serbia
Old 03-05-2015 , 02:32   Re: [HELP]Transparency not working corectly
Reply With Quote #7

Do not waste your time,it is much easier to make model,50 % percent visible,in jed's half life viewer.
Krtola is online now
Send a message via Skype™ to Krtola
Depresie
Veteran Member
Join Date: Nov 2013
Old 03-05-2015 , 02:36   Re: [HELP]Transparency not working corectly
Reply With Quote #8

well, the problem is that i have my assassin mode modified, wanted to make him fullly invisible when not moving, but i think it's gonna be fine with the hologram render thing if i will disable the nightvision for that round, btw thx for the tip, i will give it your method a try for the sniper mode
Depresie 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 12:42.


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