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

[ANY] Poof


Post New Thread Reply   
 
Thread Tools Display Modes
blackalegator
Member
Join Date: Jan 2010
Old 06-30-2011 , 16:49   Re: [L4D2] Poof
Reply With Quote #11

Quote:
Originally Posted by Silvers View Post
You SetTransmit hook on an entity, usually a prop_dynamic or something. The transmit callback is fired for that prop_dynamic entity (or in this case the client) and fires every frame for all clients. You can then decide who should see that entity by return Plugin_Continue or not allowed to see that entity with return Plugin_Handled.

Because the entity you hooked is a client, all you have to do is check the entity and client are the same and allow that person to see themselves (so they can move etc), while they are blocked to everyone else.
Oh! Nice one. Thank you so much. In fact it looks like a lot of my friends actually liked the plugin. (Of course not my nasty bit of code)
__________________
I am Russian so DONT look at my english
blackalegator is offline
Send a message via Skype™ to blackalegator
alexip121093
Senior Member
Join Date: Dec 2009
Location: Hong Kong
Old 06-30-2011 , 20:39   Re: [ANY] Poof
Reply With Quote #12

you can also make a player can not see everyone . (for admin annoy that guy)
But you need to hook every player first
__________________
alexip121093 is offline
Send a message via MSN to alexip121093
blackalegator
Member
Join Date: Jan 2010
Old 07-01-2011 , 05:42   Re: [ANY] Poof
Reply With Quote #13

Quote:
Originally Posted by alexip121093 View Post
you can also make a player can not see everyone . (for admin annoy that guy)
But you need to hook every player first
Great idea! Ill add this feature after I deal with multi-targeting
__________________
I am Russian so DONT look at my english
blackalegator is offline
Send a message via Skype™ to blackalegator
DarthNinja
SourceMod Plugin Approver
Join Date: Mar 2009
Location: PreThinkHook()
Old 07-05-2011 , 12:58   Re: [L4d(2)(ANY)] Poof
Reply With Quote #14

PHP Code:
// Big, huh?
//Checks for valid client, looks pretty
public IsValidClient(client)
{
    if (
client == 0)
        return 
false;

    if (!
IsClientConnected(client))
        return 
false;
//Wait, wait whats that?
//Oh, bot check!
//Maybe a convar for this? Nai, later
    //if (IsFakeClient(client))
        //return false;
    
    
if (!IsClientInGame(client))
        return 
false;
    
    if (!
IsPlayerAlive(client))
        return 
false;

    if (!
IsValidEntity(client))
        return 
false;

    return 
true;

Oh god my eyes
__________________
DarthNinja is offline
blackalegator
Member
Join Date: Jan 2010
Old 07-05-2011 , 16:31   Re: [L4d(2)(ANY)] Poof
Reply With Quote #15

Quote:
Originally Posted by DarthNinja View Post
Oh god my eyes
I am soryy, but if you may not have noticed, this is my first plugin. Besides, what is so bad about this function? It doesnt produce some additional CPU usage
__________________
I am Russian so DONT look at my english
blackalegator is offline
Send a message via Skype™ to blackalegator
kwski43
Senior Member
Join Date: Mar 2009
Old 07-11-2011 , 09:02   Re: [L4d(2)(ANY)] Poof
Reply With Quote #16

You could make all those checks in one if statement
__________________
kwski43 is offline
napalm00
Veteran Member
Join Date: Jun 2011
Location: Italy, sadly
Old 07-11-2011 , 09:08   Re: [L4d(2)(ANY)] Poof
Reply With Quote #17

Quote:
Originally Posted by blackalegator View Post
I am soryy, but if you may not have noticed, this is my first plugin. Besides, what is so bad about this function? It doesnt produce some additional CPU usage
PHP Code:
// Big, huh?
//Checks for valid client, looks pretty
public IsValidClient(client)
{
    if (
client == || !IsClientConnected(client) || !IsClientInGame(client) || !IsPlayerAlive(client) || !IsValidEntity(client))
        return 
false;
//Wait, wait whats that?
//Oh, bot check!
//Maybe a convar for this? Nai, later
    //if (IsFakeClient(client))
        //return false;

    
return true;

the change is only when reading the source code, it's easier and clearer to read
__________________
napalm00 is offline
blackalegator
Member
Join Date: Jan 2010
Old 07-16-2011 , 10:14   Re: [L4d(2)(ANY)] Poof
Reply With Quote #18

Quote:
Originally Posted by napalm00 View Post
the change is only when reading the source code, it's easier and clearer to read
Thanks! I am in Malta now, so I will edit it when I get back to Moscow.
__________________
I am Russian so DONT look at my english
blackalegator is offline
Send a message via Skype™ to blackalegator
asto
Member
Join Date: Aug 2010
Old 08-07-2011 , 11:32   Re: [ANY] Poof
Reply With Quote #19

I want to hide only the floating player names on top of they heads in Left 4 Dead. How can I do only this?
asto is offline
Elektramode
Senior Member
Join Date: Mar 2010
Old 08-07-2011 , 11:59   Re: [ANY] Poof
Reply With Quote #20

Quote:
Originally Posted by asto View Post
I want to hide only the floating player names on top of they heads in Left 4 Dead. How can I do only this?
hud_targetid_name_height 9999
Elektramode 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 00:23.


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