Raised This Month: $202 Target: $400
 50% 

[ANY] Poof


Post New Thread Reply   
 
Thread Tools Display Modes
Author
blackalegator
Member
Join Date: Jan 2010
Plugin ID:
2406
Plugin Version:
1.35
Plugin Category:
Admin Commands
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
    17 
    Plugin Description:
    Make yourself invisible!
    Old 06-29-2011 , 19:16   [ANY] Poof
    Reply With Quote #1

    • Title: Poof
    • Description
    This is my first plugin. Originally made for left 4 dead 2 it may be used on any game. Features:
    - Makes a player fully invisible
    - Hides player's nickaname on top of his head
    - All the attached models dissapear (In left 4 dead 2 even the light attached to survivors body dissapears)
    - It dhould work on any gamemode, though maybe I will add left4dead-only features soon
    • Commands
    - sm_poof
    - poof
    (for yourself only)
    - sm_poof <userid/name>
    - poof <userid/name>
    (For targeting someone else)
    - !poof in chat works too

    • Dependencies
    SDKhooks
    • Changelog
    30.06.2011 (1.0)
    - Plugin realease
    30.06.2011 (1.01)
    -Removed player renaming. Currently I didnt find any otption of making your nickanme invisible except doing it manually in steam settings. Change your nickname in stem to:
    "~" at the beginning, maximum ammount of spaces possible in the middle and "." at the end

    30.06.2011(1.1)
    -Fixed multiplayer support. It is now safe to use poof for more than 1 person

    30.06.2011(1.2)
    - Nearly all my code wasnt needed xD. Thank silvers, code is now clean and nickname is hidden. Though Ive got a lot of experience writing this first plugin.

    30.06.2011(1.21)
    - Sorry! Forgot about checking for poof state enabled per client. Fixed now

    1.06.2011(1.3)
    - Multitargeting
    - Cleaned and commented all the code

    3.06.2011(1.31)
    - Fixed a bug where player wasnt able to go back from invisibility state if he was not using any arguments

    -Removed usseless log (In poofcheck=0 state)

    4.08.2011(1.35)
    - No more Warnings in compilation
    - Made IsValidClient function look prettier
    • Installation Instructions
    - Install SDKhooks
    - Place poof.smx at your plugins folder
    • Plans
    //Add a possibility to hide all the clients from one client
    (Maybe later...)
    Thanks:
    - Special thanks to MatthiasVance and some other guys from IRC channel!
    If not you, my first plugin would never be released!
    - Thank you Silvers for your code!
    Attached Files
    File Type: sp Get Plugin or Get Source (poof.sp - 497 views - 3.9 KB)
    File Type: smx poof.smx (3.5 KB, 434 views)
    __________________
    I am Russian so DONT look at my english

    Last edited by blackalegator; 08-04-2011 at 09:51. Reason: Plugin update
    blackalegator is offline
    Send a message via Skype™ to blackalegator
    alexip121093
    Senior Member
    Join Date: Dec 2009
    Location: Hong Kong
    Old 06-29-2011 , 20:59   Re: [L4D2] Poof
    Reply With Quote #2

    I dont know why you using this script to make invisible

    sdkhook settransmit work great. can hide the player name too
    __________________
    alexip121093 is offline
    Send a message via MSN to alexip121093
    blackalegator
    Member
    Join Date: Jan 2010
    Old 06-30-2011 , 03:37   Re: [L4D2] Poof
    Reply With Quote #3

    Quote:
    Originally Posted by alexip121093 View Post
    I dont know why you using this script to make invisible

    sdkhook settransmit work great. can hide the player name too
    Thanks! Going to change that today. BTW I havent read about settransmit yet, but maybe infected will be still able to see your hud.
    __________________
    I am Russian so DONT look at my english

    Last edited by blackalegator; 06-30-2011 at 03:42.
    blackalegator is offline
    Send a message via Skype™ to blackalegator
    blackalegator
    Member
    Join Date: Jan 2010
    Old 06-30-2011 , 07:56   Re: [L4D2] Poof
    Reply With Quote #4

    Quote:
    Originally Posted by alexip121093 View Post
    I dont know why you using this script to make invisible

    sdkhook settransmit work great. can hide the player name too

    Could you please explain how to do it a bit more? If I hook a client he is not able to move/shoot at all. Or there is a way to hook clients nickname?
    __________________
    I am Russian so DONT look at my english
    blackalegator is offline
    Send a message via Skype™ to blackalegator
    blackalegator
    Member
    Join Date: Jan 2010
    Old 06-30-2011 , 08:55   Re: [L4D2] Poof
    Reply With Quote #5

    Okay... It seems like there is no way to make player's name invisible excepth setting it in steam settings. Ive tried Sdkhooks settransmit, NULL_STRING for player's name and a bunch of other ideas.
    Anyways, Ill finish plans written on the main thread and it will be over for development
    __________________
    I am Russian so DONT look at my english
    blackalegator is offline
    Send a message via Skype™ to blackalegator
    Silvers
    AlliedModders Donor
    Join Date: Aug 2010
    Location: SpaceX
    Old 06-30-2011 , 08:57   Re: [L4D2] Poof
    Reply With Quote #6

    You dont need to change the players name, SDKHooks blocks the players model completely, youre just doing it wrong.
    __________________
    Silvers is offline
    blackalegator
    Member
    Join Date: Jan 2010
    Old 06-30-2011 , 10:51   Re: [L4D2] Poof
    Reply With Quote #7

    Quote:
    Originally Posted by Silvers View Post
    You dont need to change the players name, SDKHooks blocks the players model completely, youre just doing it wrong.
    Well Ill show you what Ive tried to do with SDKhooks:

    PHP Code:
    SDKHook(clientSDKHook_SetTransmitHook_SetTransmit);

    public 
    Action:Hook_SetTransmit(cliententity)
    {
        return 
    Plugin_Handled;

    This made invisible player to stuck. He wasnt able to move, shoot or do whatsoever
    __________________
    I am Russian so DONT look at my english
    blackalegator is offline
    Send a message via Skype™ to blackalegator
    Silvers
    AlliedModders Donor
    Join Date: Aug 2010
    Location: SpaceX
    Old 06-30-2011 , 10:56   Re: [L4D2] Poof
    Reply With Quote #8

    Try this:
    PHP Code:
    SDKHook(clientSDKHook_SetTransmitHook_SetTransmit);

    public 
    Action:Hook_SetTransmit(cliententity)
    {
        if( 
    client == entity )
            return 
    Plugin_Continue;
        return 
    Plugin_Handled;

    __________________
    Silvers is offline
    blackalegator
    Member
    Join Date: Jan 2010
    Old 06-30-2011 , 13:27   Re: [L4D2] Poof
    Reply With Quote #9

    Quote:
    Originally Posted by Silvers View Post
    Try this:
    PHP Code:
    SDKHook(clientSDKHook_SetTransmitHook_SetTransmit);

    public 
    Action:Hook_SetTransmit(cliententity)
    {
        if( 
    client == entity )
            return 
    Plugin_Continue;
        return 
    Plugin_Handled;

    Could You please explain me this code a little bit? Isnt client allways an entity? Than it would have no effect
    __________________
    I am Russian so DONT look at my english
    blackalegator is offline
    Send a message via Skype™ to blackalegator
    Silvers
    AlliedModders Donor
    Join Date: Aug 2010
    Location: SpaceX
    Old 06-30-2011 , 15:04   Re: [L4D2] Poof
    Reply With Quote #10

    Quote:
    Originally Posted by blackalegator View Post
    Could You please explain me this code a little bit? Isnt client allways an entity? Than it would have no effect
    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.
    __________________
    Silvers 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 15:51.


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