Raised This Month: $248 Target: $400
 62% 

[ANY] Paint (v1.3, 15/5/2020)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
hmmmmm
Great Tester of Whatever
Join Date: Mar 2017
Location: ...
Plugin ID:
5763
Plugin Version:
1.1
Plugin Category:
General Purpose
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
    17 
    Plugin Description:
    all
    Old 08-15-2017 , 02:16   [ANY] Paint (v1.3, 15/5/2020)
    Reply With Quote #1

    Description
    Was looking for this kind of plugin for my server and couldn't find anything. Pretty useful to mark certain spots on map until it changes.
    Has only been tested on CSGO but I think it would work on other games

    Lets players "paint" on walls by using +paint command.

    The paint decal is from the Momentum Mod game. Thanks to Cabbage McGravel of the Momentum Mod team for making the texture.



    Uses g flag for +paint command. Override +paint to change/remove the flag.

    Features
    Let's users add paint (more like dots) on map, with different colours and sizes. To remove current paints from your screen you can use r_cleardecals.

    Command List
    • +paint - When held down places paint where client is looking
    • sm_paintcolour/sm_paintcolor - Opens menu that lets client choose from various colours
    • sm_paintsize - Opens menu that lets client choose from sizes

    Changelog
    • 1.0 - Initial release
    • 1.1 - Added admin flag
    • 1.2 - Code cleanup
    • 1.3 - Improved textures & easier colours configuration

    Installation instructions
    Add the .smx to plugins folder and add the decal textures (.vmt and .vtf) to materials/decals/paint

    Modifying/adding paints
    To add a new paint you need to do 2 things.

    First is to add a VMT file for each size of the paint (small/med/large by default).

    Here's an example of the VMT file for the small orange paint (paint_orange.vmt):
    Code:
    "UnlitGeneric"
    {
        "$basetexture" "decals/paint/paint_decal"
        "$decal" 1
        "$decalscale" 0.14
        "$translucent" 1
        "$color" "{255 165 0}"
    }
    Pretty much every paint will have this same format. The only 2 options you will need to configure are $decalscale (to change the size/scale of the paint) and $color (to change the actual colour of the paint).

    For a given colour you will need to make a VMT file for each size. In the orange paint example above those are paint_orange.vmt, paint_orange_med.vmt, paint_orange_large.vmt.

    Second, the paint.sp plugin needs to be slightly modified:
    Code:
    char g_cPaintColours[][][64] = // Modify this to add/change colours
    {
    	{ "Random", "random" },
    	{ "White", "paint_white" },
    	{ "Black", "paint_black" },
    	{ "Blue", "paint_blue" },
    	{ "Light Blue", "paint_lightblue" },
    	{ "Brown", "paint_brown" },
    	{ "Cyan", "paint_cyan" },
    	{ "Green", "paint_green" },
    	{ "Dark Green", "paint_darkgreen" },
    	{ "Red", "paint_red" },
    	{ "Orange", "paint_orange" },
    	{ "Yellow", "paint_yellow" },
    	{ "Pink", "paint_pink" },
    	{ "Light Pink", "paint_lightpink" },
    	{ "Purple", "paint_purple" },
    };
    An entry needs to be added to this list for the new colour you'd like to add. The first string is the name of the paint and the second is the base filename of the VMT for that paint.

    Plans
    Might make a config file to easily add/change paint textures and sizes

    Credits to Mitchell who made LAZERRRSSSSSS!! (https://forums.alliedmods.net/showthread.php?p=1749220) and to altex who made Paintball (https://forums.alliedmods.net/showthread.php?t=107012). Some code/ideas taken from both.
    Attached Files
    File Type: zip paint.zip (13.6 KB, 129 views)
    File Type: sp Get Plugin or Get Source (paint.sp - 193 views - 7.2 KB)

    Last edited by hmmmmm; 05-15-2020 at 01:14.
    hmmmmm is offline
    lugui
    Senior Member
    Join Date: Feb 2016
    Location: Brasil
    Old 08-15-2017 , 22:30   Re: [ANY] Paint (v1.0, 15/8/2017)
    Reply With Quote #2

    Great plugin, could you please add admin restriction?

    Last edited by lugui; 08-18-2017 at 17:34.
    lugui is offline
    Masterofks
    AlliedModders Donor
    Join Date: Sep 2016
    Location: Poland
    Old 08-21-2017 , 20:17   Re: [ANY] Paint (v1.0, 15/8/2017)
    Reply With Quote #3

    Quote:
    Originally Posted by lugui View Post
    Great plugin, could you please add admin restriction?
    The same request
    Masterofks is offline
    NiagaraDryGuy
    ( ͡ ͜ʖ ͡)
    Previously known as:
    404UNF
    Join Date: Dec 2011
    Location: 🍁
    Old 08-22-2017 , 02:23   Re: [ANY] Paint (v1.0, 15/8/2017)
    Reply With Quote #4

    Quote:
    Originally Posted by lugui View Post
    Great plugin, could you please add admin restriction?
    The same request
    __________________
    Creator of the AlliedModders Discord
    NiagaraDryGuy is offline
    bongotrommler
    Senior Member
    Join Date: Feb 2013
    Location: GG-Elite.Net
    Old 08-22-2017 , 03:02   Re: [ANY] Paint (v1.0, 15/8/2017)
    Reply With Quote #5

    try this... a flag req.
    Attached Files
    File Type: sp Get Plugin or Get Source (paint.sp - 487 views - 6.9 KB)
    File Type: smx paint.smx (8.6 KB, 200 views)
    bongotrommler is offline
    NiagaraDryGuy
    ( ͡ ͜ʖ ͡)
    Previously known as:
    404UNF
    Join Date: Dec 2011
    Location: 🍁
    Old 08-23-2017 , 02:44   Re: [ANY] Paint (v1.0, 15/8/2017)
    Reply With Quote #6

    I could've done it myself, I was just parroting the post before mine for fun.
    __________________
    Creator of the AlliedModders Discord
    NiagaraDryGuy is offline
    hmmmmm
    Great Tester of Whatever
    Join Date: Mar 2017
    Location: ...
    Old 08-23-2017 , 07:19   Re: [ANY] Paint (v1.0, 15/8/2017)
    Reply With Quote #7

    Added
    hmmmmm is offline
    8guawong
    AlliedModders Donor
    Join Date: Dec 2013
    Location: BlackMarke7
    Old 08-23-2017 , 07:41   Re: [ANY] Paint (v1.1, 23/8/2017)
    Reply With Quote #8

    could some1 post a video of this in action?
    8guawong is offline
    vortex.
    AlliedModders Donor
    Join Date: Jan 2017
    Location: OnGameFrame()
    Old 08-23-2017 , 08:27   Re: [ANY] Paint (v1.1, 23/8/2017)
    Reply With Quote #9

    Any video or screenshot please ?
    __________________
    vortex. is offline
    hmmmmm
    Great Tester of Whatever
    Join Date: Mar 2017
    Location: ...
    Old 05-15-2020 , 01:21   Re: [ANY] Paint (v1.3, 15/5/2020)
    Reply With Quote #10

    The paint textures have been updated to be higher quality. The seams around the paint circles are no longer visible and the edges aren't pixelated.

    Before (may need to zoom in to spot seams, not the highest quality picture):


    After:


    Also, all the paint colours now only reference a single VTF texture (paint_decal.vtf) so the number of files the user has to download has been cut significantly. This also makes adding/changing colours much easier, only the $color property of the VMT needs to be changed. I've added more specific details on how to do this to the original post.

    Big thanks to Cabbage McGravel of the Momentum Mod team for making the texture.
    hmmmmm 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 09:24.


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