Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var y = Render.GetScreenSize()[1];
- function HSVtoRGB(h, s, v)
- {
- var r, g, b, i, f, p, q, t;
- i = Math.floor(h * 6);
- f = h * 6 - i;
- p = v * (1 - s);
- q = v * (1 - f * s);
- t = v * (1 - (1 - f) * s);
- switch (i % 6)
- {
- case 0: r = v, g = t, b = p; break;
- case 1: r = q, g = v, b = p; break;
- case 2: r = p, g = v, b = t; break;
- case 3: r = p, g = q, b = v; break;
- case 4: r = t, g = p, b = v; break;
- case 5: r = v, g = p, b = q; break;
- }
- return { r: Math.round(r * 255), g: Math.round(g * 255), b: Math.round(b * 255) };
- }
- var oldTick = Global.Tickcount()
- var ticksToDelay = 1
- function main(){
- var tickcount = Global.Tickcount() * 2.1;
- var alpha = 255
- var min_alpha = 255
- var font = Render.GetFont( "Verdana.ttf", 20, true);
- var font3 = Render.GetFont( "Verdana.ttf", 70, true);
- var font2 = Render.GetFont( "boxrocket.ttf", 65, true);
- var me = Entity.GetLocalPlayer();
- var health = Entity.GetProp(me,"CBasePlayer", "m_iHealth");
- var armor = Entity.GetProp(Entity.GetLocalPlayer(), "CCSPlayerResource", "m_iArmor");
- var healthtext = ""+ health;
- var armortext = ""+ armor;
- var max1 = [ 0, 0, 0, 80];
- var max2 = [ 255, 150, 0 , 255];
- var server = World.GetServerString();
- var colors = HSVtoRGB(tickcount % 350 / 350, 1, 1, 1, 255);
- if(server == ""){
- Render.FilledRect( 430+270, y-150, 250, 85, [ 0, 0, 0, 0] );
- Render.String (445+280, y - 105, 0, "SUIT", [ 255, 150, 0 , 0],font);
- Render.String (560+270, y - 145, 0, armortext, [ 255, 150, 0 , 0],font2);
- Render.FilledRect( 430, y-150, 250, 85, [ 255, 0, 0, 0] );
- Render.String (445, y - 105, 0, "HEALTH", [ 255, 150, 0 , 0],font);
- Render.String (560, y - 145, 0, healthtext, [ 255, 150, 0 , 0],font2);
- }else{
- if(armortext == 0){
- Render.FilledRect( 430+270, y-150, 250, 85, [ 0, 0, 0, 0] );
- Render.String (445+280, y - 105, 0, "SUIT", [ 255, 150, 0 , 0],font);
- Render.String (560+270, y - 145, 0, armortext, [ 255, 150, 0 , 0],font2);
- }else{
- Render.FilledRect( 430+270, y-150, 250, 85, [ 0, 0, 0, 80] );
- Render.String (445+280, y - 105, 0, "SUIT", [ 255, 150, 0 , 255],font);
- Render.String (560+270, y - 145, 0, armortext, [ 255, 150, 0 , 255],font2);
- }
- if(healthtext <=30){
- Render.FilledRect( 430, y-150, 250, 85, [ 255, 0, 0, 80] );
- Render.String (445, y - 105, 0, "HEALTH", [ 255, 150, 0 , 255],font);
- Render.String (560, y - 145, 0, healthtext, [ 255, 150, 0 , 255],font2);
- }else{
- Render.FilledRect( 430, y-150, 250, 85, [ 0, 0, 0, 80] );
- Render.String (445, y - 105, 0, "HEALTH", [ 255, 150, 0 , 255],font);
- Render.String (560, y - 145, 0, healthtext, [ 255, 150, 0 , 255],font2);
- }
- if(healthtext ==0){
- Render.String (445+550, y - 155, 0, "FAILURE", [ colors.r, colors.g, colors.b, 255 ],font3);
- }
- }
- }
- Cheat.RegisterCallback("Draw", "main")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement