07-27-2011, 13:41
Hello
Another tutorial,
This is about overlays(HUD)
Paste this anywhere in your mod code:
Now, to call a overlay, do this:
Example of use:
I hope this helps,
Another tutorial,
This is about overlays(HUD)
Paste this anywhere in your mod code:
Code:
CreateOverlay( shader_name, start_alpha, color )
{
overlay = newHudElem();
overlay.x = 0;
overlay.y = 0;
overlay setshader( shader_name, 640, 480 );
overlay.alignX = "left";
overlay.alignY = "top";
overlay.sort = 1;
overlay.color = color;
overlay.horzAlign = "fullscreen";
overlay.vertAlign = "fullscreen";
overlay.alpha = start_alpha;
overlay.foreground = true;
return overlay;
}
Now, to call a overlay, do this:
Code:
CreateOverlay( "shader,remember to precache it", alpha(put 1, for a good result) , (red,green,blue));
Example of use:
Code:
Mod() // A random thread name
{
CreateOverlay( "minimap_scanlines", 1 , (0,1,0.2));
}
I hope this helps,