AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   ImageMap (https://forums.alliedmods.net/showthread.php?t=115572)

Matthias Vance 01-14-2010 14:19

ImageMap
 
2 Attachment(s)
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

EHG 01-14-2010 14:53

Re: ImageMap
 
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.

Matthias Vance 01-14-2010 14:57

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

[Edit]
Done, everything uploaded!

EHG 01-14-2010 15:08

Re: ImageMap
 
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 ^_^

Matthias Vance 01-14-2010 15:10

Re: ImageMap
 
This is already planned, and almost supported! (See: Plans)

DarthNinja 01-14-2010 15:56

Re: ImageMap
 
Wow.
Awesome idea!

DontWannaName 01-14-2010 16:32

Re: ImageMap
 
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?

Matthias Vance 01-14-2010 16:47

Re: ImageMap
 
Quote:

Originally Posted by DontWannaName (Post 1055025)
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 (Post 1055025)
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 (Post 1055025)
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 (Post 1055025)
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?

DontWannaName 01-14-2010 17:58

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

Matthias Vance 01-15-2010 03:48

Re: ImageMap
 
You can use map decals for that! That functionality is coming in the next version.


All times are GMT -4. The time now is 09:10.

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