Vice City Multiplayer
VC:MP 0.3 => mIRC/pawn Scripting => Topic started by: VC[88]PD on December 28, 2012, 04:09:23 pm
-
[pawn]else if ( strcmp( cmd, "!count", true ) == 0 )
{
SetTimer( "CountDowns3", 1000, 0 );
SetTimer( "CountDowns2", 2000, 0 );
SetTimer( "CountDowns1", 3000, 0 );
SetTimer( "FinalCount", 4000, 0 );
return 1;
}[/pawn]
and the public:
[pawn]public CountDowns3()
{
new szMsg[ 16 ];
format( szMsg, 16, "== 3 ==");
SendClientMessageToAll( COLOR_GREEN, szMsg );
}
public CountDowns2()
{
new szMsg[ 16 ];
format( szMsg, 16, "== 2 ==");
SendClientMessageToAll( COLOR_GREEN, szMsg );
}
public CountDowns1()
{
new szMsg[ 16 ];
format( szMsg, 16, "== 1 ==");
SendClientMessageToAll( COLOR_GREEN, szMsg );
}
public FinalCount()
{
SendClientMessageToAll(COLOR_GREEN, "== GO! ==" );
GameTextForAll("gogogo!!");
}[/pawn]
Here is it ,thanks.
-
:o :o
-
Great job but it has been done.. Nothing special about it.
-
GOD
DAMN
WHAT
IS
IT??? :o :o :o
-
I can't understand why you use format() here:
[pawn]
public CountDowns3()
{
new szMsg[ 16 ];
format( szMsg, 16, "== 3 ==");
SendClientMessageToAll( COLOR_GREEN, szMsg );
}
public CountDowns2()
{
new szMsg[ 16 ];
format( szMsg, 16, "== 2 ==");
SendClientMessageToAll( COLOR_GREEN, szMsg );
}
public CountDowns1()
{
new szMsg[ 16 ];
format( szMsg, 16, "== 1 ==");
SendClientMessageToAll( COLOR_GREEN, szMsg );
}
[/pawn]
But not here:
[pawn]
public FinalCount()
{
SendClientMessageToAll(COLOR_GREEN, "== GO! ==" );
GameTextForAll("gogogo!!");
}
[/pawn]
-
on top:
[pawn]new repeat = 0;[/pawn]
command:
[pawn]SetTimer( "CountDown", 1000, 3 );[/pawn]
public:
[pawn]public CountDown()
{
switch(repeat)
{
case 0:
SendClientMessageToAll( COLOR_GREEN, "=== 3 ===" );
repeat = 1;
break;
case 1:
SendClientMessageToAll( COLOR_GREEN, "=== 2 ===" );
repeat = 2;
break;
case 2:
SendClientMessageToAll( COLOR_GREEN, "=== 1 ===" );
repeat = 3;
break;
case 3:
SendClientMessageToAll( COLOR_GREEN, "GO! GO! GO!" );
GameTextForAll("gogogo!!");
repeat = 0;
break;
}
}
[/pawn]
Should work better with a single timer, not tested but it should work, long time no see, pawn.
-
Great job but it has been done.. Nothing special about it.
Hmm... can you give me a link to *that* count down system released on this forum ?
I like the idea of encouraging all scripters. (who deserve ofc)
So, good job ! But next time, try to use a single timer. (As heekz showed you)
And how Stormeus says ... Why you use format() on all publics but on the last not ? (you should to the same to all publics, not just for the last)
format() is used when you want to get a float (%f), integer (%i), name (%s) or digital (%d), so is useless here.
I will give you an example:
else if(strcmp(cmd, "myname", true) == 0) {
new string[256];
format(string,sizeof(string),"This is your name: %s",gPlayers[playerid]);
SendClientMessage(playerid,COLOR_YELLOW,string);
return 1;
}
This command will give you a message with your name.
I hope you will understand, Good Luck !
PS: Next time when you release a script, put it in the corect board. (Pawn ShowRoom (http://forum.vicecitymultiplayer.com/index.php?board=29.0))
-
I don't know how to reply someone but thanks a lot sseebbyy !
-
I don't know how to reply someone but thanks a lot sseebbyy !
My pleasure. ;)
All replies have in top-right an button called *Quote* . Click on it and you will reply to that post.
-
I don't know how to reply someone but thanks a lot sseebbyy !
My pleasure. ;)
All replies have in top-right an button called *Quote* . Click on it and you will reply to that post.
;)Ok,thanks again.