Curent Version: v1.0
Description:
Force a Player to read & agree the Rules (overlay) on connect. 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.6)
// ConVars for plugin "rulesoverlays.smx"
// Path to overlay without extensions at the end and materials folder at the beginning. Without starting slash!
// -
// Default: "overlays/rulesoverlays/rules"
sm_ro_path "overlays/rulesoverlays/rules"
// Trigger to agree rules
// -
// Default: "!agree"
sm_ro_triggeragree "!agree"
// Alternative Trigger to agree rules
// -
// Default: "!согласен"
sm_ro_triggeragree2 "!согласен"
// Trigger to show rules
// -
// Default: "!rules"
sm_ro_triggerrules "!rules"
// Version of RulesOverlays plugin
// -
// Default: "1.0"
sm_rulesoverlays "1.0"
Commands:
sm_ro
reset - Force all clients disagree the rules (root flag required)
!agree - Stops showing rules (no flag required) (default)
!rules - Shows rules overlay (no flag required)
To install:
Unzip in cstike/
Edit convar sm_ro_path as you wish.
The path should not contain anything other that paths to overlay. The overlay should be placed in materials folder.
Example of sm_ro_path:
Code:
sm_ro_path "overlays/rulesoverlays/rules"
Real paths of file would be:
Code:
materials/overlays/rulesoverlays/rules.vmt
materials/overlays/rulesoverlays/rules.vtf
NOTE THE DIFFERENCE IN convar AND REAL PATHS. THE PLUGIN AUTOMATICALLY adds 2 files (vmt and vtf) from that 1 line in ads.txt. Moreover do not write "materials/" part in your overlay path!
Overlays Tutorial:
Basically you need a transparent image (1024x1024 sized), then you can add layers with your rules.
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.
I used this example, you need to change only path to file:
example.vmt:
Code:
"UnlitGeneric"
{
// Original shader: BaseTimesVertexColorAlphaBlendNoOverbright
"$translucent" 1
"$basetexture" "overlays\rulesoverlays\rules"
//"$vertexcolor" 1
"$no_fullbright" 1
"$ignorez" 1
}
Credits:
If anyone can make a good overlay example I will update the plugin and give credits. Also see
[ANY] AdsOverlays [v.1.1]