Author Topic: count command by me(not that count down in gups)  (Read 4510 times)

0 Members and 1 Guest are viewing this topic.

Offline VC[88]PD

  • Wiseguy
  • **
  • Posts: 52
    • View Profile
count command by me(not that count down in gups)
« 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.

Offline aledark24

  • Made Man
  • ***
  • Posts: 206
  • I am a scripter and you have celous of me....so you crashed my servers
    • View Profile
Re: count command by me(not that count down in gups)
« Reply #1 on: December 28, 2012, 04:18:57 pm »
  :o :o
I am a great scripter and you are celous of my works
.....

Vice City Life Multiplayer By Saint

Offline Fuzzy168

  • VC:MP Veteran
  • *****
  • Posts: 729
  • Programming since 2011
    • View Profile
Re: count command by me(not that count down in gups)
« Reply #2 on: December 29, 2012, 08:11:10 am »
Great job but it has been done.. Nothing special about it.
I'm beginning to feel like a Lag God, Lag God

Offline NeskWriter

  • Crime Boss
  • ****
  • Posts: 355
    • View Profile
Re: count command by me(not that count down in gups)
« Reply #3 on: December 29, 2012, 10:25:37 am »
GOD
DAMN
WHAT
IS
IT???    :o :o :o


-Funniest quotes-

Quote from: asad3man
i cant able to understand

Offline stormeus

  • VC:MP Developer
  • VC:MP Veteran
  • *
  • Posts: 1122
    • View Profile
Re: count command by me(not that count down in gups)
« Reply #4 on: December 29, 2012, 12:56:23 pm »
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]
Do not PM me for support.




Offline heekz.shadow

  • LU testers
  • Made Man
  • *
  • Posts: 249
    • View Profile
Re: count command by me(not that count down in gups)
« Reply #5 on: December 29, 2012, 01:47:31 pm »
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.
Code: [Select]
[20:23] <habi> later only i heard that lu chatbox is customizable. On my first visit, it appeared ugly.
[20:23] <habi> May be that also be the reason why lu has no players

Offline sseebbyy

  • VC:MP Veteran
  • *****
  • Posts: 774
  • Immortal VC:MP Player
    • View Profile
    • Zombie Invasion => Server Forum [DEAD PROJECT]
Re: count command by me(not that count down in gups)
« Reply #6 on: December 29, 2012, 02:07:55 pm »
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:

Code: [Select]
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)
« Last Edit: December 29, 2012, 02:11:25 pm by sseebbyy »

Quote
Painful/Noob scripters acts like: I Am The Best Scripter Because I Announce My Releases With Big Font Size Without Giving Too Much Info' In The Hope They All Will Download And Check It. I Ignore Bad Replies, Replies That I Could Learn From, And Replies With So Much Text.



Offline VC[88]PD

  • Wiseguy
  • **
  • Posts: 52
    • View Profile
Re: count command by me(not that count down in gups)
« Reply #7 on: January 03, 2013, 06:05:44 pm »
I don't know how to reply someone but thanks a lot sseebbyy !

Offline sseebbyy

  • VC:MP Veteran
  • *****
  • Posts: 774
  • Immortal VC:MP Player
    • View Profile
    • Zombie Invasion => Server Forum [DEAD PROJECT]
Re: count command by me(not that count down in gups)
« Reply #8 on: January 03, 2013, 09:26:49 pm »
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.

Quote
Painful/Noob scripters acts like: I Am The Best Scripter Because I Announce My Releases With Big Font Size Without Giving Too Much Info' In The Hope They All Will Download And Check It. I Ignore Bad Replies, Replies That I Could Learn From, And Replies With So Much Text.



Offline VC[88]PD

  • Wiseguy
  • **
  • Posts: 52
    • View Profile
Re: count command by me(not that count down in gups)
« Reply #9 on: January 04, 2013, 11:08:53 am »
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.