/count
#1

Can anybody give me a /count cmd? only 3 counts.
thank you
Reply
#2

Help plz
Reply
#3

pawn Код:
new Count;

CMD:count(playerid,params[])
{
    Count++;
    if(Count == 3)
    {
        //3 cout
    }
    return 1;
}
Reply
#4

it is not working....
Reply
#5

Quote:
Originally Posted by RBTDM
Посмотреть сообщение
it is not working....
What do you mean by not working?
Reply
#6

When i try the cmd , nothing is showing..
Reply
#7

pawn Код:
CMD:count(playerid,params[])
{
new Count;    
Count++;
    if(Count == 1)
    {
        SendClientMessageToAll(-1,"Admin Count : 1");
    }
if(Count == 2)
    {
        SendClientMessageToAll(-1,"Admin Count : 2");
    }
if(Count == 3)
    {
        SendClientMessageToAll(-1,"Admin Count : 3");
        SendClientMessageToAll(-1,"Admin Count : GO!");
}
    if(Count > 3)
    {
        Count = 0;
    }

return 1;
}
if not work use Basicz pawn code
Reply
#8

zcmd
pawn Код:
new
    iCurrCounts,
    timerCount
;

COMMAND:count( playerid, params[ ] )
{
    if ( iCurrCounts > 0 )
       return SendClientMessage( playerid, -1, "A countdown is already started." );

    timerCount = SetTimer( "countDownInit", 1000, true );

    SendClientMessageToAll( -1, "SERVER: Countdown started" );

    return 1;
}

forward countDownInit( );
public countDownInit( )
{
    new s[ 10 ];

    if ( iCurrCounts > 3 )
        GameTextForAll( "~w~GO!", 750, 3 ), KillTimer( timerCount );

    iCurrCounts ++;

    switch ( iCurrCounts )
    {
        case 1: s = "~r~3";
        case 2: s = "~g~2";
        case 3: s = "~b~1";
    }

    GameTextForAll( s, 750, 3 );

    return 1;
}
Reply
#9

In that case, I suggest you to use switch.
https://sampwiki.blast.hk/wiki/Control_Structures#switch_2

Basicz told ya already.
Reply
#10

varthshenon and Horrible's scripts will never reach 3 since the commands create a variable, increase it by one, then check if it equals x then the variable is discarded.

next time be more clear with what you want and paste any attempts that you've made
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)