puma153, держи
[pwn]// -- Simple CountDown Filterscript --
// -- By Donny / Donny_K (2007) -- // -- It has basic protection against duel counts and negative numbers
// -- being used in the /count command....
#include <a_samp>
//Credit to DracoBlue and Y_Less for DCMD (http://forum.sa-mp.com/index.php?topic=1858.0)
#define dcmd(%1,%2,%3) if ((strcmp((%3)[1], #%1, true, (%2)) == 0) && ((((%3)[(%2) + 1] == 0) && (dcmd_%1(playerid, "")))||(((%3)[(%2) + 1] == 32) && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
new Counting;
dcmd_count(playerid, params[])
{
if (!strlen(params)) return SendClientMessage(playerid, 0xafafafff, " Ïèøèòå: /count [Êîë.Ñåê, íå áîëüøå 10!]"); //Grey colour
if (!IsNumeric(params)) return SendClientMessage(playerid, 0xafafafff, " Íåïðàâèëüíî óêàçàíî [Êîë.Ñåê]"); //Grey colour
if (strval(params) < 1) return SendClientMessage(playerid, 0xafafafff, " [Êîë.Ñåê] Íåäîëæíî áûòü íèæå 1"); //Grey colour
if (Counting) return SendClientMessage(playerid, 0xafafafff, " Îòñ÷¸ò óæå çàïóùåí âàìè èëè äðóãèì èãðîêîì! 2 îòñ÷¸òà îäíîâðåììåíî íåâîçìîæíî."); //Grey colour
Counting = true;
new ii = strval(params);
do
{
SetTimerEx("CountDown", (strval(params) - ii) * 1000, false, "i", ii);
ii --;
}
while (ii != -1);
SendClientMessage(playerid, 0xffe600ff, " Âû íà÷àëè îòñ÷¸ò"); //yellow (yolk) colour
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
dcmd(count, 5, cmdtext);
return 0;
}
forward CountDown(num);
public CountDown(num)
{
new str[2];
if (num)
{
format(str, sizeof(str), "%i", num);
GameTextForAll(str, 1001, 4); //Orange/bronze colour (standard for style 4)
}
else
{
GameTextForAll("~g~Go Go Go", 4000, 4); //Green colour
Counting = false;
}
}
IsNumeric(const string[]) //By Mike (samp-dev) (http://forum.sa-mp.com/index.php?topic=638.msg6610;topicseen#msg6610)
{
for (new i = 0, j = strlen(string); i < j; i++)
{
if (string[i] > '9' || string[i] < '0') return 0;
}
return 1;
}[/pwn]
ЗЫ: С тебя + 