/count - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: /count (
/showthread.php?tid=281798)
/count -
RBTDM - 07.09.2011
Can anybody give me a /count cmd? only 3 counts.
thank you
Re: /count -
RBTDM - 08.09.2011
Help plz
Re: /count -
=WoR=Varth - 08.09.2011
pawn Код:
new Count;
CMD:count(playerid,params[])
{
Count++;
if(Count == 3)
{
//3 cout
}
return 1;
}
Re: /count -
RBTDM - 08.09.2011
it is not working....
Re: /count -
=WoR=Varth - 08.09.2011
Quote:
Originally Posted by RBTDM
it is not working.... 
|
What do you mean by not working?
Re: /count -
RBTDM - 08.09.2011
When i try the cmd , nothing is showing..
Re: /count -
Horrible - 08.09.2011
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
Re: /count -
Basicz - 08.09.2011
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;
}
Re: /count -
=WoR=Varth - 08.09.2011
In that case, I suggest you to use switch.
https://sampwiki.blast.hk/wiki/Control_Structures#switch_2
Basicz told ya already.
Re: /count -
cessil - 08.09.2011
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