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

ImageMap


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Matthias Vance
Senior Member
Join Date: Jan 2009
Plugin ID:
1403
Plugin Version:
1.0
Plugin Category:
General Purpose
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
    1 
    Plugin Description:
    Interactive player/map decals!
    Old 01-14-2010 , 14:19   ImageMap
    Reply With Quote #1

    ImageMap

    This is just the first version of this plugin, there will be extended functionality later on. Right now it's possible to specify a player decal in the KV file, and only ActionType "url" is supported.

    Basically this detects sprays that match the predefined DecalFile, and then sets an imagemap for them!

    Plugin features

    • Interactive player decals
    • Players will receive a notification when they hover over an interactive spray.
    • Different action types
    Commands
    • spray_check
      • Provide debug information about the spray a player is aiming at.
    Changelog
    • 2010-01-14 (v1.0)
      • Initial release.
    Plans
    • Support for ActionType "cmd", so you can run commands.
      • Also needs support for different client arguments (userid, clientid, name, steamid).
    • Support for map decals.
      • Includes spawning them automatically on a per-map base.
    • Support for additional hooks. ("voicemenu 0 0" only works on TF2, so for the rest of the games only the spray-key is working)
      • +use (since that's also E)
    Media

    Installation

    So, in order to install/configure this plugin, you first have to drop the SMX in addons/sourcemod/plugins/ and the CFG into cfg/sourcemod/.

    The first thing you have to do is spray an image in-game, and run the spray_check command. It will output the following information:

    • The decal filename of the spray you're looking at.
    • The point you're aiming at.
    Set the "Decal" key in the CFG to be the filename it displays.

    Now aim at the top left corner of the imagemap you want to define, and run the command. Save this point under "Point1", now do the same for the lower right corner and save this point under "Point 2".

    This is a copy of the CFG file:
    Code:
    "Test Decal" {
    
        "Type"        "player"
        "Decal"        "78f6a9b6"
    
        "#1" {
            "Label"            "Press E to donate."
    
            "Point1"        "-1.963104 0.000000 6.141464"
            "Point2"        "26.536132 0.000000 -7.195083"
    
            "ActionType"    "url"
            "Action"        "http://www.paypal.com/"
        }
    
    }
    Have fun!

    Kind regards,

    Matthias Vance
    Attached Files
    File Type: cfg imagemap.cfg (264 Bytes, 612 views)
    File Type: sp Get Plugin or Get Source (imagemap.sp - 1418 views - 7.7 KB)

    Last edited by Matthias Vance; 01-14-2010 at 16:16.
    Matthias Vance is offline
    EHG
    Senior Member
    Join Date: May 2009
    Location: 127.0.0.1
    Old 01-14-2010 , 14:53   Re: ImageMap
    Reply With Quote #2

    Matthias Vance you rebel you..
    It is understandable with the 1337 plugin but you should really only make a thread when you have a plugin ready to upload at the same time.
    EHG is offline
    Matthias Vance
    Senior Member
    Join Date: Jan 2009
    Old 01-14-2010 , 14:57   Re: ImageMap
    Reply With Quote #3

    Hush! I was actually uploading it when I discovered something that could be improved. Check the video in the meantime!

    [Edit]
    Done, everything uploaded!

    Last edited by Matthias Vance; 01-14-2010 at 15:04.
    Matthias Vance is offline
    EHG
    Senior Member
    Join Date: May 2009
    Location: 127.0.0.1
    Old 01-14-2010 , 15:08   Re: ImageMap
    Reply With Quote #4

    You could also add support for command execution.
    I can just see it now, a big bright red circle with "PRESS ME!" written on it.
    Those curious enough to submit to its will face their end as they explode ^_^
    EHG is offline
    Matthias Vance
    Senior Member
    Join Date: Jan 2009
    Old 01-14-2010 , 15:10   Re: ImageMap
    Reply With Quote #5

    This is already planned, and almost supported! (See: Plans)
    Matthias Vance is offline
    DarthNinja
    SourceMod Plugin Approver
    Join Date: Mar 2009
    Location: PreThinkHook()
    Old 01-14-2010 , 15:56   Re: ImageMap
    Reply With Quote #6

    Wow.
    Awesome idea!
    __________________
    DarthNinja is offline
    DontWannaName
    Veteran Member
    Join Date: Jun 2007
    Location: VALVe Land, WA
    Old 01-14-2010 , 16:32   Re: ImageMap
    Reply With Quote #7

    I am going to have some fun with this.
    What happens when a non admin trys to run that command?

    What other types and actions are there other than url and player, I cant think of any other ones?

    I know sprays are restricted to 256px or so but decals can be much larger. I know there is this pluginhttp://forums.alliedmods.net/showthread.php?p=607043 but it makes users download the decal, can this be done but with the DL as a spray?

    What happens if we delete all the files in the downloads folder and then repsray the spray? It will have a different decal # I presume?
    __________________


    Last edited by DontWannaName; 01-14-2010 at 16:36.
    DontWannaName is offline
    Matthias Vance
    Senior Member
    Join Date: Jan 2009
    Old 01-14-2010 , 16:47   Re: ImageMap
    Reply With Quote #8

    Quote:
    Originally Posted by DontWannaName View Post
    What happens when a non admin trys to run that command?
    It's a general command, so they can use it, but it's harmless. I'll make it admin only in the next release.

    Quote:
    Originally Posted by DontWannaName View Post
    What other types and actions are there other than url and player, I cant think of any other ones?
    The only ones it's going to have is url and cmd.

    Quote:
    Originally Posted by DontWannaName View Post
    I know sprays are restricted to 256px or so but decals can be much larger. I know there is this pluginhttp://forums.alliedmods.net/showthread.php?p=607043 but it makes users download the decal, can this be done but with the DL as a spray?
    That actually doesn't make much sense, because they can already see your spray in-game. Or do you want them to be able to add it to their game? If so, I can let users download it, but they will still have to add it manually, and find it in the directory structure.

    Quote:
    Originally Posted by DontWannaName View Post
    What happens if we delete all the files in the downloads folder and then repsray the spray? It will have a different decal # I presume?
    Well, weird thing is, I moved the plugin to my live server, and it had the same filename. Maybe it's some semi-unique thingy?
    Matthias Vance is offline
    DontWannaName
    Veteran Member
    Join Date: Jun 2007
    Location: VALVe Land, WA
    Old 01-14-2010 , 17:58   Re: ImageMap
    Reply With Quote #9

    Ok, I dont think the decal will download a spray since I want it to be larger than 256px.
    __________________

    DontWannaName is offline
    Matthias Vance
    Senior Member
    Join Date: Jan 2009
    Old 01-15-2010 , 03:48   Re: ImageMap
    Reply With Quote #10

    You can use map decals for that! That functionality is coming in the next version.
    Matthias Vance 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 04:38.


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