Liberty Unleashed
Scripting => Script Snippets => Topic started by: 88nateatx on October 25, 2011, 03:03:14 am
-
function onPlayerCommand( player, cmd, text )
{
if ( cmd == "count" )
{
NewTimer( Message, 1000, 1, "=3=", 200, 0, 0 );
NewTimer( Message, 2000, 1, "=2=", 200, 0, 0 );
NewTimer( Message, 3000, 1, "=1=", 200, 200, 0 );
NewTimer( Message, 4000, 1, "=GO!=", 0, 200, 0 );
}
}
Just a colorful little counting script snippet.
Useful for DMs.
-
That snippet wont work :P
You start of with an elseif while you need to use if first.
This should work:
function onPlayerCommand( player, cmd, text )
{
if ( cmd == "count" )
{
NewTimer( Message, 1000, 1, "=3=", 200, 0, 0 );
NewTimer( Message, 2000, 1, "=2=", 200, 0, 0 );
NewTimer( Message, 3000, 1, "=1=", 200, 200, 0 );
NewTimer( Message, 4000, 1, "=GO!=", 0, 200, 0 );
}
}
-
Here's your solution! ( Kinda lazy of me, but who cares? :P )
First add:
function Count ( player )
{
BigMessage( player ,"=3=" , 5000, 3 );
}
function Count2 ( player )
{
BigMessage( player ,"=2=" , 5000, 3 );
}
function Count3 ( player )
{
BigMessage( player ,"=1=" , 5000, 3 );
}
function CountGO ( player )
{
BigMessage( player ,"=GO!=" , 5000, 3 );
}
Then:
function onPlayerCommand( player, cmd, text )
{
if ( cmd == "count" )
{
NewTimer( Count, 1000, 1, player );
NewTimer( Count2, 2000, 1, player );
NewTimer( Count3, 3000, 1, player );
NewTimer( CountGO, 4000, 1, player );
}
}
Enjoy!
BTW, Thijn, got that fixed, thanks for reminding me ;D
-
Here's your solution! ( Kinda lazy of me, but who cares? :P )
First add:
function Count ( player )
{
BigMessage( player ,"=3=" , 5000, 3 );
}
function Count2 ( player )
{
BigMessage( player ,"=2=" , 5000, 3 );
}
function Count3 ( player )
{
BigMessage( player ,"=1=" , 5000, 3 );
}
function CountGO ( player )
{
BigMessage( player ,"=GO!=" , 5000, 3 );
}
Then:
function onPlayerCommand( player, cmd, text )
{
if ( cmd == "count" )
{
NewTimer( Count, 1000, 1, player );
NewTimer( Count2, 2000, 1, player );
NewTimer( Count3, 3000, 1, player );
NewTimer( CountGO, 4000, 1, player );
}
}
Enjoy!
BTW, Thijn, got that fixed, thanks for reminding me ;D
Just use
function onPlayerCommand( player, cmd, text )
{
if ( cmd == "count" )
{
NewTimer( "BigMessage", 1000, 1, player ,"=3=" , 5000, 3 );
NewTimer( "BigMessage", 2000, 1, player ,"=2=" , 5000, 3 );
NewTimer( "BigMessage", 3000, 1, player ,"=1=" , 5000, 3 );
NewTimer( "BigMessage", 4000, 1, player ,"=GO!=" , 5000, 3 );
}
}
-
function onPlayerCommand( player, cmd, text )
{
if ( cmd == "count" )
{
NewTimer( Message, 1000, 1, "=3=", 200, 0, 0 );
NewTimer( Message, 2000, 1, "=2=", 200, 0, 0 );
NewTimer( Message, 3000, 1, "=1=", 200, 200, 0 );
NewTimer( Message, 4000, 1, "=GO!=", 0, 200, 0 );
}
}
Just a colorful little counting script snippet.
Useful for DMs.
I Have Did It Like /count not like /c count
look:
else if ( szCommand == "count" )
{
NewTimer( "BigMessage", 1000, 1, player ,"=3=" , 5000, 3 );
NewTimer( "BigMessage", 2000, 1, player ,"=2=" , 5000, 3 );
NewTimer( "BigMessage", 3000, 1, player ,"=1=" , 5000, 3 );
NewTimer( "BigMessage", 4000, 1, player ,"=GO!=" , 5000, 3 );
}
so when i type /count nothing happens why? do i have to define a pPlayer too?
-
function onPlayerCommand( player, cmd, text )
{
if ( cmd == "count" )
{
NewTimer( Message, 1000, 1, "=3=", 200, 0, 0 );
NewTimer( Message, 2000, 1, "=2=", 200, 0, 0 );
NewTimer( Message, 3000, 1, "=1=", 200, 200, 0 );
NewTimer( Message, 4000, 1, "=GO!=", 0, 200, 0 );
}
}
Just a colorful little counting script snippet.
Useful for DMs.
I Have Did It Like /count not like /c count
look:
else if ( szCommand == "count" )
{
NewTimer( "BigMessage", 1000, 1, player ,"=3=" , 5000, 3 );
NewTimer( "BigMessage", 2000, 1, player ,"=2=" , 5000, 3 );
NewTimer( "BigMessage", 3000, 1, player ,"=1=" , 5000, 3 );
NewTimer( "BigMessage", 4000, 1, player ,"=GO!=" , 5000, 3 );
}
so when i type /count nothing happens why? do i have to define a pPlayer too?
try this
else if ( szCommand == "count" )
{
NewTimer( "BigMessage", 1000, 1, pPlayer ,"=3=" , 5000, 3 );
NewTimer( "BigMessage", 2000, 1, pPlayer ,"=2=" , 5000, 3 );
NewTimer( "BigMessage", 3000, 1, pPlayer ,"=1=" , 5000, 3 );
NewTimer( "BigMessage", 4000, 1, pPlayer ,"=GO!=" , 5000, 3 );
}
-
yea "what ever" GTFO
-
lol