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

[ANY] AdsOverlays [v.1.1]


Post New Thread Reply   
 
Thread Tools Display Modes
Author
animalnots
Senior Member
Join Date: Dec 2012
Plugin ID:
3428
Plugin Version:
1.1
Plugin Category:
General Purpose
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Show advertisments(ads) via overlays while player is dead or spectating
    Old 12-26-2012 , 13:55   [ANY] AdsOverlays [v.1.1]
    Reply With Quote #1

    Curent Version: v1.1
    [Dec 26, 2012]
    V1.1 - Changed all entries of Adds -> Ads.

    Description:
    Show advertisments(ads) via overlays while player is dead or spectating. Made for CSS but should work on other mods as well.
    Example Screenshot:
    Edit: Need an overlay example ))...

    Requirements:
    morecolors

    Translations :
    *Russian
    *English
    pm with translation to add

    Cvars:
    Automade on first load.
    Code:
    Code:
    // This file was auto-generated by SourceMod (v1.4.5-dev)
    // ConVars for plugin "adsoverlays.smx"
    
    
    // Version of AdsOverlays plugin
    // -
    // Default: "1.1"
    sm_adsoverlays "1.1"
    
    // Show ads to vips or root
    // -
    // Default: "0"
    // Minimum: "0.000000"
    // Maximum: "1.000000"
    sm_ao_showtovip "0"
    
    // How often ads change
    // -
    // Default: "10.0"
    sm_ao_time "10.0"
    
    // Trigger to stop showing ads
    // -
    // Default: "!stop"
    sm_ao_triggerstop "!stop"
    Commands:
    sm_ao number - Shows mentioned ad to root
    !stop - Stops showing ads (no flag required)

    To install:
    Unzip in cstike/
    Edit ads.txt

    Ad overlays paths in adons/sourcemod/configs/ads.txt. It should not contain anything other that paths to overlays. 1 line 1 path. All overlays should be placed in materials folder

    Example of ads.txt:
    Code:
    overlays/adsoverlays/ad1
    overlays/adsoverlays/ad2
    overlays/youmaychangethis/ad3
    eventhis/adsoverlays/vip
    NOTE THE DIFFERENCE IN ads.txt AND REAL PATHS. THE PLUGIN AUTOMATICALLY adds 2 files (vmt and vtf) from that 1 line in ads.txt. Moreover omit "materials/" part in path to overlay!
    Real paths of files would be:
    Code:
    materials/overlays/adsoverlays/ad1.vmt
    materials/overlays/adsoverlays/ad1.vtf
    materials/overlays/adsoverlays/ad2.vmt
    materials/overlays/adsoverlays/ad2.vtf
    materials/overlays/youmaychangethis/ad3.vmt
    materials/overlays/youmaychangethis/ad3.vtf
    materials/eventhis/adsoverlays/vip.vmt
    materials/eventhis/adsoverlays/vip.vtf
    Note the difference, in ads.txt there's only 1 line per path and no need to mention extensions.

    Overlays Tutorial:
    Basically you need a transparent image (1024x1024 sized), then you can add layers with you ad.
    I made a grid in Photoshop and highlighted some spots that can be used for placing your ads onto them. See attachments. Note that probably you should transform your ad (change from 100% to 75% of original wide) to make it look good. Then, when you have a 1024x1024 png or tga image, you should use a png\tga to vtf converter. A plugin for Paint.net can be found here http://nemesis.thewavelength.net/index.php?c=225 , it works ). When you got vtf, you need vmt.
    VTF:
    1. Download and install paint.net - http://www.getpaint.net/download.html
    2. Install VTF Plug-In for Paint.NET - http://nemesis.thewavelength.net/index.php?c=225
    3. Follow instructions - http://**************/photo/my-images/11/vtfe.png/
    VMT:
    It's just a simple txt file with vmt extension. Download example.vmt from attachments and open it with text editor.
    You will see this:
    Code:
    "UnlitGeneric"
    {
    	// Original shader: BaseTimesVertexColorAlphaBlendNoOverbright
    	"$translucent" 1
    	  "$basetexture" "overlays\addsoverlays\example"
    	//"$vertexcolor" 1
    	"$no_fullbright" 1
    	"$ignorez" 1
    }
    Now change overlays\addsoverlays\example to path to your overlay if needed. Don't write materials\overlays\addsoverlays\example (materials folder is already in plugin). Save the file.
    Now put VMT and VTF file in folder you mentioned above(so 2 files will be in materials\overlays\addsoverlays\ folder).
    ads.txt:
    Edit ads.txt and replace example with name you mentioned (if needed).
    Code:
    overlays/adsoverlays/example
    Credits:
    If anyone can make a good overlay example I will update the plugin and give credits.
    Attached Files
    File Type: zip adsoverlays v.1.1.zip (23.3 KB, 595 views)
    File Type: sp Get Plugin or Get Source (adsoverlays.sp - 697 views - 11.1 KB)
    File Type: zip gridv2.zip (268.6 KB, 499 views)
    File Type: zip example_vmt_and_vtf.zip (157.0 KB, 582 views)
    __________________
    STEAM is the best of the west
    Quote:
    Never argue with an idiot. He lowers you to his level and then wins on experience!

    Last edited by animalnots; 12-28-2012 at 13:46. Reason: Attached files
    animalnots is offline
    MPQC
    SourceMod Donor
    Join Date: Dec 2011
    Old 12-26-2012 , 14:01   Re: [CSS] AddsOverlays
    Reply With Quote #2

    You need to include the plugin.
    __________________
    MPQC is offline
    captaindeterprimary
    AlliedModders Donor
    Join Date: Sep 2012
    Old 12-26-2012 , 19:47   Re: [ANY] AddsOverlays [v.1.0]
    Reply With Quote #3

    Ima try this right now!
    Also I will post a video if it works...
    __________________
    Last edited by ; Today at 08:20 AM. Reason: Get rid of s
    captaindeterprimary is offline
    CuriousG
    Senior Member
    Join Date: Feb 2012
    Old 12-26-2012 , 19:52   Re: [ANY] AddsOverlays [v.1.0]
    Reply With Quote #4

    The correct spelling is "ads", FYI.
    CuriousG is offline
    Unreal1
    AlliedModders Donor
    Join Date: Dec 2010
    Old 12-26-2012 , 22:29   Re: [ANY] AddsOverlays [v.1.0]
    Reply With Quote #5

    Can you make a car for which dmin flasgs are considered VIPs?
    Unreal1 is offline
    animalnots
    Senior Member
    Join Date: Dec 2012
    Old 12-26-2012 , 22:48   Re: [ANY] AddsOverlays [v.1.0]
    Reply With Quote #6

    Quote:
    Originally Posted by CuriousG View Post
    The correct spelling is "ads", FYI.
    Crap ) Don't know though it's double D ) Will be corrected next ver! Thank you! V1.1. Released !
    Quote:
    Originally Posted by Unreal1 View Post
    Can you make a car for which dmin flasgs are considered VIPs?
    Cvar to change vip flags?
    Quote:
    Originally Posted by vman315 View Post
    Ima try this right now!
    Also I will post a video if it works...
    That's awesome ! Ask if any!
    __________________
    STEAM is the best of the west
    Quote:
    Never argue with an idiot. He lowers you to his level and then wins on experience!

    Last edited by animalnots; 12-27-2012 at 02:00.
    animalnots is offline
    Roundcat
    Senior Member
    Join Date: Feb 2012
    Old 12-27-2012 , 10:42   Re: [ANY] AdsOverlays [v.1.1]
    Reply With Quote #7

    Anyone know what this looks like yet?
    __________________
    I know not my ar*e from its elbow.
    Roundcat is offline
    animalnots
    Senior Member
    Join Date: Dec 2012
    Old 12-27-2012 , 11:21   Re: [ANY] AdsOverlays [v.1.1]
    Reply With Quote #8

    It can look like this:
    Attached Thumbnails
    Click image for larger version

Name:	ex.jpg
Views:	1461
Size:	89.3 KB
ID:	113666  
    __________________
    STEAM is the best of the west
    Quote:
    Never argue with an idiot. He lowers you to his level and then wins on experience!

    Last edited by animalnots; 12-27-2012 at 11:22.
    animalnots is offline
    captaindeterprimary
    AlliedModders Donor
    Join Date: Sep 2012
    Old 12-27-2012 , 14:31   Re: [ANY] AdsOverlays [v.1.1]
    Reply With Quote #9

    Okay well I got sidetracked, however I installed it, the problem is that it tries to download
    Code:
    materials/materials/sb/overlays/sweetie.vtf.vmt
    materials/materials/sb/overlays/sweetie.vmt.vmt
    instead of
    Code:
    materials/sb/overlays/sweetie.vtf
    materials/sb/overlays/sweetie.vmt
    __________________
    Last edited by ; Today at 08:20 AM. Reason: Get rid of s
    captaindeterprimary is offline
    animalnots
    Senior Member
    Join Date: Dec 2012
    Old 12-27-2012 , 14:50   Re: [ANY] AdsOverlays [v.1.1]
    Reply With Quote #10

    Quote:
    Originally Posted by vman315 View Post
    Okay well I got sidetracked, however I installed it, the problem is that it tries to download
    Code:
    materials/materials/sb/overlays/sweetie.vtf.vmt
    materials/materials/sb/overlays/sweetie.vmt.vmt
    instead of
    Code:
    materials/sb/overlays/sweetie.vtf
    materials/sb/overlays/sweetie.vmt
    Write this in ads.txt
    Code:
    sb/overlays/sweetie
    Nothing more just 1 line above.
    __________________
    STEAM is the best of the west
    Quote:
    Never argue with an idiot. He lowers you to his level and then wins on experience!

    Last edited by animalnots; 12-27-2012 at 14:51.
    animalnots 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 08:43.


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