if(StolInfo[id][stolStatus] != 0)
{
switch(StolInfo[id][stolStatus])
{
case 1:
{
if(StolInfo[id][stolTime] != 0)
{
f(global_str, 256,"[ Стол №%d ]\n\
{9ACD32}Ожидание игроков:{FFFFFF} %d/6\n\
{9ACD32}Ставка:{FFFFFF} %d фишек\n\n\
{9ACD32}Сесть за стол - F\n\
{9ACD32}Дурак подкидной\n\
{9ACD32}Начало через {FFFFFF}%d сек",id+1,StolInfo[id][stolPlayers],StolInfo[id][stolBet], StolInfo[id][stolTime]);
UpdateDynamic3DTextLabelText(stolText[id],COLOR_WHITE, global_str);
}
else
{
StolInfo[id][stolStatus] = 2;
StolInfo[id][stolTime] = 60;
///
StolInfo[id][stolCardBan][0] = StolInfo[id][stolKoriz] = random(36)+1;
StolInfo[id][stolCards] --;
StolInfo[id][stolXod] = 0;
StolInfo[id][stolBit] = 1;
//
for(new d; d != StolInfo[id][stolPlayers]; d++)
{
if(StolInfo[id][stolPlayer][d] != INVALID_PLAYER_ID) CardAddForPlayer(StolInfo[id][stolPlayer][d]),SelectTextDraw(StolInfo[id][stolPlayer][d],0xff8c8c00),DeleteItem(StolInfo[id][stolPlayer][d], 316, StolInfo[id][stolBet]);
}
GameTextForPlayer(StolInfo[id][stolPlayer][StolInfo[id][stolXod]],"~g~ YOU ATTACK", 700, 3);
GameTextForPlayer(StolInfo[id][stolPlayer][StolInfo[id][stolBit]],"~r~ YOU ATTACKED", 700, 3);
}
}
case 2:
{
if(StolInfo[id][stolTime] < 1)
{
StolInfo[id][stolXod]++;
if(StolInfo[id][stolXod] >= StolInfo[id][stolPlayers]) StolInfo[id][stolXod] = 0;
StolInfo[id][stolBit] = StolInfo[id][stolXod]+1;
if(StolInfo[id][stolBit] >= StolInfo[id][stolPlayers]) StolInfo[id][stolBit] = 0;
GameTextForPlayer(StolInfo[id][stolPlayer][StolInfo[id][stolXod]],"~g~ YOU ATTACK", 700, 3);
GameTextForPlayer(StolInfo[id][stolPlayer][StolInfo[id][stolBit]],"~r~ YOU ATTACKED", 700, 3);
StolInfo[id][stolTime] = 60;
}
//
static karta[50]; new num = StolInfo[id][stolKoriz];
switch(CardInfo[num][cardValue])
{
case 0..10: f(karta, sizeof karta,"%d [ %s ]",CardInfo[num][cardValue],CardInfo[num][cardMast]);
case 11: f(karta, sizeof karta,"Валет [ %s ]",CardInfo[num][cardMast]);
case 12: f(karta, sizeof karta,"Дама [ %s ]",CardInfo[num][cardMast]);
case 13: f(karta, sizeof karta,"Король [ %s ]",CardInfo[num][cardMast]);
case 14: f(karta, sizeof karta,"Туз [ %s ]",CardInfo[num][cardMast]);
}
if(!StolInfo[id][stolBitCard][0])
{
f(global_str, 256,"\
{FFFFFF}[ Стол %d ]\n\
{9ACD32}Козырь:{FFFFFF} %s\n\
{AFAFAF}(в колоде %d карт)\n\n\
{9ACD32}Таймер хода:{FFFFFF} %d сек\n\
{AFAFAF}%s{9ACD32} ходит на игрока {AFAFAF}%s",id+1,karta,StolInfo[id][stolCards],StolInfo[id][stolTime],
PN(StolInfo[id][stolPlayer][StolInfo[id][stolXod]]),
PN(StolInfo[id][stolPlayer][StolInfo[id][stolBit]]));//,PN(StolInfo[i][stolPlayer][StolInfo[i][stolXod]+1]));
UpdateDynamic3DTextLabelText(stolText[id],COLOR_WHITE, global_str);
}
else
{
f(global_str, 256,"\
{FFFFFF}[ Стол %d ]\n\
{9ACD32}Козырь:{FFFFFF} %s\n\
{AFAFAF}(в колоде %d карт)\n\n\
{9ACD32}Таймер хода:{FFFFFF} %d сек\n\
{AFAFAF}%s{9ACD32} отбивается",id+1,karta,StolInfo[id][stolCards],StolInfo[id][stolTime],
PN(StolInfo[id][stolPlayer][StolInfo[id][stolBit]]));//,PN(StolInfo[i][stolPlayer][StolInfo[i][stolXod]+1]));
UpdateDynamic3DTextLabelText(stolText[id],COLOR_WHITE,global_str);
}
}
}
StolInfo[id][stolTime] --;
}
}