AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Camera looks invisible in terrorists/zombies (https://forums.alliedmods.net/showthread.php?t=325242)

wicho 06-13-2020 18:05

Camera looks invisible in terrorists/zombies
 
Hi everyone, well I use a camera plugin that when a player writes /cam can be seen at different angles, it works well but when the terrorist/zombie writes /cam it looks transparent for a millisecond but then becomes invisible, with the antiterrorist/human it works good. Does anyone know what is the problem? ... Thanks in advance

This is the code:

PHP Code:

#include <amxmodx> 
#include <engine> 

const KEYS MENU_KEY_0|MENU_KEY_1|MENU_KEY_2|MENU_KEY_3 

public plugin_init() 

         
register_plugin("Camera Changer""1.1""XunTric"
         
register_menucmd(register_menuid("\rChoose Camera View"), KEYS"setview"

         
register_clcmd("say /camera""chooseview"
         
register_clcmd("say_team /camera""chooseview"

         
register_clcmd("say /cam""chooseview"
         
register_clcmd("say_team /cam""chooseview"


public 
plugin_precache() 

         
precache_model("models/rpgrocket.mdl"


public 
chooseview(id

         
show_menu(idKEYS"\rChoose Camera View^n^n\r1. \w3rd Person View^n\r2. \wUpside View^n\r3. \wNormal View^n^n\r0. \wExit"


public 
setview(idkeymenu

         switch(
key
         { 
                  case 
0
                  { 
                           
set_view(idCAMERA_3RDPERSON
                  } 
                  case 
1
                  { 
                           
set_view(idCAMERA_TOPDOWN
                  } 
                  case 
2
                  { 
                           
set_view(idCAMERA_NONE
                  } 
         } 
         return 
PLUGIN_HANDLED 



condoriano90 06-13-2020 18:14

Re: Camera looks invisible in terrorists/zombies
 
You need to decompile the model and remove this line:
Code:

$texrendermode "xxx.bmp" "masked"
from its .qc file and recompile

abdobiskra 06-14-2020 11:48

Re: Camera looks invisible in terrorists/zombies
 
PHP Code:

#include <amxmodx>
#include <fakemeta>

public plugin_init()
    
register_forward(FM_AddToFullPack"fwFmAddToFullPack"1);

public 
fwFmAddToFullPack(es_handleeenthostflagsplayerpSet)
{
    if (!
player || host != ent )
        return;
        
    
set_es(es_handleES_RenderModehost



Natsheh 06-14-2020 12:17

Re: Camera looks invisible in terrorists/zombies
 
Quote:

Originally Posted by abdobiskra (Post 2705639)
PHP Code:

#include <amxmodx>
#include <fakemeta>

public plugin_init()
    
register_forward(FM_AddToFullPack"fwFmAddToFullPack"1);

public 
fwFmAddToFullPack(es_handleeenthostflagsplayerpSet)
{
    if (!
player || host != ent )
        return;
        
    
set_es(es_handleES_RenderModehost




What is host have to do with render mode?

set_es(es_handle, ES_RenderMode, host)

abdobiskra 06-14-2020 13:52

Re: Camera looks invisible in terrorists/zombies
 
Quote:

Originally Posted by Natsheh (Post 2705640)
What is host have to do with render mode?

set_es(es_handle, ES_RenderMode, host)

A good question and I don't have an answer, maybe we should check if he does not have kRenderTransTexture or he has kRenderTransAlpha I did not check it because it works with me..maybe might check what the host has and put it for him but it is stupid to think so :nono:
I am also puzzled :!:

Natsheh 06-14-2020 15:04

Re: Camera looks invisible in terrorists/zombies
 
host will return a client index between 1 - 32 if im not mistaken.

should be instead kRenderNone


All times are GMT -4. The time now is 17:13.

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