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

How to hide door only for a player


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
OneHites100
New Member
Join Date: Feb 2023
Old 02-21-2023 , 10:31   How to hide door only for a player
Reply With Quote #1

How i can hide entity only for a player ?
OneHites100 is offline
JusTGo
Veteran Member
Join Date: Mar 2013
Old 02-21-2023 , 13:55   Re: How to hide door only for a player
Reply With Quote #2

This plugin hides doors for admins, you can edit to choose the players to hide the entity for

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>

public plugin_init() {
    
register_plugin("Admin hide doors""0.0.1""JustGo")

    
register_forward(FM_AddToFullPack"AddToFullPack_Post"1)
}

public 
AddToFullPack_Post(es_handle,e,ent,host,hostflags,player,pSet)
{
    if(
player) return FMRES_IGNORED

    
if(!is_user_alive(host)) return FMRES_IGNORED

    
if(!is_user_admin(host)) return FMRES_IGNORED

    
if(!isDoor(ent)) return FMRES_IGNORED

    set_es
es_handleES_EffectsEF_NODRAW );

    return 
FMRES_IGNORED
}

stock bool:isDoor(ent) {
    if(!
pev_valid(ent)) return false;

    static 
szClassName[32]; 
    
    
pev(entpev_classnameszClassNamecharsmax(szClassName));

    if(!
equal(szClassName"func_door")) return false;

    return 
true;

__________________
JusTGo is offline
OneHites100
New Member
Join Date: Feb 2023
Old 02-28-2023 , 12:03   Re: How to hide door only for a player
Reply With Quote #3

Quote:
Originally Posted by JusTGo View Post
This plugin hides doors for admins, you can edit to choose the players to hide the entity for

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>

public plugin_init() {
    
register_plugin("Admin hide doors""0.0.1""JustGo")

    
register_forward(FM_AddToFullPack"AddToFullPack_Post"1)
}

public 
AddToFullPack_Post(es_handle,e,ent,host,hostflags,player,pSet)
{
    if(
player) return FMRES_IGNORED

    
if(!is_user_alive(host)) return FMRES_IGNORED

    
if(!is_user_admin(host)) return FMRES_IGNORED

    
if(!isDoor(ent)) return FMRES_IGNORED

    set_es
es_handleES_EffectsEF_NODRAW );

    return 
FMRES_IGNORED
}

stock bool:isDoor(ent) {
    if(!
pev_valid(ent)) return false;

    static 
szClassName[32]; 
    
    
pev(entpev_classnameszClassNamecharsmax(szClassName));

    if(!
equal(szClassName"func_door")) return false;

    return 
true;


Thanks, i will test it
OneHites100 is offline
rantab
New Member
Join Date: Mar 2023
Old 03-03-2023 , 02:03   Re: How to hide door only for a player
Reply With Quote #4

Wildlife photography is mostly about capturing and documenting different forms of life in natural habitats. A career in the best wildlife camera is equally challenging and requires commitment. best camera for wildlife
rantab 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 10:46.


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