AMX MOD X
Суббота, 03.01.2026, 09:34:49



Приветствую Вас Гость | RSS
[ Главная ] [ Проблема с set_task - AMX Mod X Форум ] [ Регистрация ] [ Вход ]
[ Новые сообщения · Участники · Правила форума · Поиск · RSS ]

Вниманию участников! Данный форум теперь является архивом и вскором времени здесь нельзя будет создавать новых тем! Просьба всем для общения и создания новых тем перейти на наш новый форум: http://amxmodx.su/

  • Страница 1 из 1
  • 1
Модератор форума: slogic, AlMod  
Проблема с set_task
arqawaДата: Пятница, 07.03.2008, 22:56:27 | Сообщение # 1
Рядовой
Группа: Пользователи
Сообщений: 15
Репутация: 0
Статус: Не в сети
Вот в этом кусочке косяк
Code

if(ready_ct == 1 && ready_t == 1){
    match_status = 2
    server_cmd("exec match.cfg")
    hltv_rec()
    set_task(0.5,"server_cmd(say [-- GAME LIVE on 3 restarts --])")
    set_task(0.6,"server_cmd(say [-- 1st restart --])")
    set_task(0.7,"server_cmd(sv_restart 1)")
    set_task(1.7,"server_cmd(say [-- 2nd restart --])")
    set_task(1.8,"server_cmd(sv_restart 1)")
    set_task(2.8,"server_cmd(say [-- 3rd restart --])")
    set_task(2.9,"server_cmd(say [-- BE READY --])")
    set_task(3.0,"server_cmd(sv_restart 3)")
    set_task(6.0,"server_cmd(say [-- LIVE --])")
    set_task(6.1,"server_cmd(say [--- LIVE -])")
    set_task(6.2,"server_cmd(say [---- LIVE ])")
    set_task(6.3,"server_cmd(say [ ---- LIVE])")
    set_task(6.4,"server_cmd(say [E ---- LIV])")
    set_task(6.5,"server_cmd(say [VE ---- LI])")
    set_task(6.6,"server_cmd(say [IVE ---- L])")
    set_task(6.7,"server_cmd(say [LIVE ---- ])")
    set_task(6.8,"server_cmd(say [ LIVE ----])")
    set_task(6.9,"server_cmd(say [- LIVE ---])")
    set_task(7.0,"server_cmd(say [-- LIVE --])")
    set_task(7.1,"server_cmd(say [-- GOOD LUCK TEAMS! --])")
   }
 
DaTaДата: Суббота, 08.03.2008, 02:38:15 | Сообщение # 2
Генерал-полковник
Группа: Cупер-модеры
Сообщений: 1025
Репутация: 16
Статус: Не в сети
омг, задачи вообще советуют не применять, так как они едят ресурсы CPU
это раз

а во вторых

Quote
native set_task(Float:time,const function[],id = 0,parameter[]="",len = 0,flags[]="", repeat = 0);

второй параметр имя функции, а не вызов функции(про строки в кавычках я промолчу blink ), бинарники amx'а не знают pawn'а))

в третих
даже если ты вызовешь server_cmd, то сможешь передать ей только айди задачи, строки не передаются через set_task

ну вообщем сделай как-то так(в отступах длинной в 0.1 секунды не вижу смысла):

Code

//..
if(ready_ct == 1 && ready_t == 1){
     match_status = 2
     server_cmd("exec match.cfg")
     hltv_rec()
     set_task(0.5,"start_game")
}
//..
public start_game(id)
{
     switch(id)
     {
         case default:
         {
                 client_print(0, print_chat, "[-- GAME LIVE on 3 restarts --]")
                 client_print(0, print_chat, "[-- 1st restart --]")
                 server_cmd("sv_restart 1")
                 set_task(1.0,"start_game", 1)
         }
          
         case 1:
         {
              client_print(0, print_chat, "[-- 2nd restart --]")
              server_cmd("sv_restart 1")
              set_task(1.0,"start_game", 2)
         }
          
         case 2:
         {
              client_print(0, print_chat, "[-- 3rd restart --]")
              client_print(0, print_chat, "[-- BE READY --]")
              server_cmd("sv_restart 3")
              set_task(3.0,"start_game", 3)
          }
           
          case 3:
          {
              client_print(0, print_chat, "[-- LIVE --]")
              client_print(0, print_chat, "[--- LIVE -]")
              client_print(0, print_chat, "[---- LIVE ]")
              client_print(0, print_chat, "[ ---- LIVE]")
              client_print(0, print_chat, "[E ---- LIV]")
              client_print(0, print_chat, "[VE ---- LI]")
              client_print(0, print_chat, "[IVE ---- L]")
              client_print(0, print_chat, "[LIVE ---- ]")
              client_print(0, print_chat, "[ LIVE ----]")
              client_print(0, print_chat, "[- LIVE ---]")
              client_print(0, print_chat, "[-- LIVE --]")
              client_print(0, print_chat, "[-- GOOD LUCK TEAMS! --]")
     }
}

еще проще будет создать 3 конфига и запускать их
Code

[code]
//..
if(ready_ct == 1 && ready_t == 1){
     match_status = 2
     server_cmd("exec match.cfg")
     hltv_rec()
     set_task(0.5,"start_game")
}
//..
public start_game(id)
{
     switch(id)
     {
         case default:
         {
                 server_cmd("exec restart1.cfg")
                 set_task(1.0,"start_game", 1)
         }
          
         case 1:
         {
              server_cmd("exec restart2.cfg")
              set_task(1.0,"start_game", 2)
         }
          
         case 2:
         {
              server_cmd("exec restart3.cfg")
              set_task(3.0,"start_game", 3)
          }
           
          case 3:server_cmd("exec goodluckchat.cfg")     
}
 
  • Страница 1 из 1
  • 1
Поиск:

AMX Mod X Russian Community © 2006-2026