Liberty Unleashed
Scripting => Script Releases => Topic started by: Mido_Pop on July 28, 2013, 12:42:42 am
-
Hey, This Script For Noobs Players Only ;D.
This Is An Example Of Gui Info By Timers >>
function onScriptLoad()
{
local nPos = VectorScreen( 11, ScreenHeight - 25 );
local nSize = ScreenSize( 100,3 );
nText <- GUILabel( nPos, nSize, "" );
nText.FontName = "Cambria";
nText.FontSize = 12;
AddGUILayer( nText );
nText.Text = "Example1";
nText.TextColour = Colour( 255, 255, 255 );
NewTimer( "Example2", 10000, 1 );
}
function Example2()
{
nText.Text = "Example2";
nText.TextColour = Colour( 255, 255, 255 );
NewTimer( "Example3", 10000, 1 );
}
function Example3()
{
nText.Text = "Example3";
nText.TextColour = Colour( 255, 255, 255 );
NewTimer( "Example4", 10000, 1 );
}
function Example4()
{
nText.Text = "Example4";
nText.TextColour = Colour( 255, 255, 255 );
NewTimer( "Example5", 10000, 1 );
}
function Example5()
{
nText.Text = "Example5";
nText.TextColour = Colour( 255, 255, 255 );
NewTimer( "Example1", 10000, 1 );
}
Change The ( Example ) To Any Text Do You Need, Like This >
nText.Text = "Kill Any One xD";
(http://img96.imageshack.us/img96/4899/l56p.png)
-
Too much timers, also..
NewTimer( "Example1", 0000, 1 );
Please fix it.
-
Looks good aside from the invalid interval in the first timer (interval: 0), but please read this:
http://vcmp.liberty-unleashed.co.uk/forum/index.php?topic=1245.msg7783#msg7783 (http://vcmp.liberty-unleashed.co.uk/forum/index.php?topic=1245.msg7783#msg7783)
This would also be better off as a client message than a persistent GUI entity.
-
Too much timers, also..
NewTimer( "Example1", 0000, 1 );
Please fix it.
Done :D
-
Still, too much timers to accomplish the same task.
-
Still, too much timers to accomplish the same task.
What is The Problem With You Shadow ? :(
-
My problem is that you encourage new scripters to use timers which is not good, also, your timer usage is not good.
Take a look:
function onScriptLoad()
{
local nPos = VectorScreen( 11, ScreenHeight - 25 );
local nSize = ScreenSize( 100,3 );
nText <- GUILabel( nPos, nSize, "" );
nText.FontName = "Cambria";
nText.FontSize = 12;
AddGUILayer( nText );
nText.Text = "Example1";
nText.TextColour = Colour( 255, 255, 255 );
NewTimer( "TextUpdater", 10000, 0 );
}
random_msg <- [
"message1",
"message2",
"message3", // add how many you want
];
function TextUpdater()
{
nText.Text = random_msg[ rand() % random_msg.len() ];
}
See how easy I made everything.
Fixed it for you :)
-
My problem is that you encourage new scripters to use timers which is not good, also, your timer usage is not good.
Take a look:
function onScriptLoad()
{
local nPos = VectorScreen( 11, ScreenHeight - 25 );
local nSize = ScreenSize( 100,3 );
nText <- GUILabel( nPos, nSize, "" );
nText.FontName = "Cambria";
nText.FontSize = 12;
AddGUILayer( nText );
nText.Text = "Example1";
nText.TextColour = Colour( 255, 255, 255 );
NewTimer( "TextUpdater", 10000, 0 );
}
random_msg <- [
"message1",
"message2",
"message3", // add how many you want
];
function TextUpdater()
{
nText.Text = random_msg[ rand() % random_msg.len() ];
}
See how easy I made everything.
Fixed it for you :)
Good Idea But The Timers Better Than This .
I Know It's Make A Crashes But It's Better. :-\
-
Much timers = bad.
My solution doesn't require you to do 20 functions for 20 messages.