Заявки за цветен Timeleft!

Ако искате да поръчате да ви намерим определено нещо, без да става дума за коментиране, пишете тук.
User avatar
HIGHTER
Потребител
Потребител
Posts: 7
Joined: 09 Sep 2016, 14:28

Re: Заявки за цветен Timeleft!

Post by HIGHTER »

[Cs-Express] - Ostavashto vreme 30 Minuti
И да е според отбора цветовете!
User avatar
JackEyedJones
РЕКЛАМАТОР
РЕКЛАМАТОР
Posts: 332
Joined: 18 Apr 2014, 06:17
Skype: voltouch180
CS Nick: <Not Good Simply KoreaN>
Favorite version: CS: 1.6
Location: Plovdiv, Bulgaria, Europe, Entire World
Contact:

Re: Заявки за цветен Timeleft!

Post by JackEyedJones »

HIGHTER wrote:[Cs-Express] - Ostavashto vreme 30 Minuti
И да е според отбора цветовете!
timeleft.rar
(2.7 KiB) Downloaded 201 times
User avatar
sladura_1687
Потребител
Потребител
Posts: 7
Joined: 21 Nov 2016, 23:43

Re: Заявки за цветен Timeleft!

Post by sladura_1687 »

[Cs-Virus.Info] Ostavat 30 Minuti Do Kraq Na Mapa!
Last edited by sladura_1687 on 02 Dec 2016, 20:58, edited 1 time in total.
User avatar
INCR3DIBLE
NEVER GIVE UP
NEVER GIVE UP
Posts: 155
Joined: 16 Oct 2015, 12:37

Re: Заявки за цветен Timeleft!

Post by INCR3DIBLE »

[ABSOLUTE-GAME] Timeleft - T
[ABSOLUTE-GAME] Timeleft - CT
User avatar
Unity Man
VIP
VIP
Posts: 1118
Joined: 12 Oct 2015, 20:21
CS Nick: BiTurbu
Favorite version: CS: Global Offensive

Re: Заявки за цветен Timeleft!

Post by Unity Man »

Imagination wrote:[ABSOLUTE-GAME] Timeleft - T
[ABSOLUTE-GAME] Timeleft - CT

Code: Select all

#include <amxmodx>

new g_TimeSet[32][2]
new g_LastTime
new g_CountDown
new g_Switch

public plugin_init()
{
   register_plugin("TimeLeft", AMXX_VERSION_STR, "AMXX Dev Team")
   register_dictionary("timeleft.txt")
   register_cvar("amx_time_voice", "1")
   register_srvcmd("amx_time_display", "setDisplaying")
   register_cvar("amx_timeleft", "00:00", FCVAR_SERVER|FCVAR_EXTDLL|FCVAR_UNLOGGED|FCVAR_SPONLY)
   register_clcmd("say timeleft", "sayTimeLeft", 0, "- displays timeleft")
   register_clcmd("say thetime", "sayTheTime", 0, "- displays current time")
   
   set_task(0.8, "timeRemain", 8648458, "", 0, "b")
}

public sayTheTime(id)
{
   if (get_cvar_num("amx_time_voice"))
   {
      new mhours[6], mmins[6], whours[32], wmins[32], wpm[6]
      
      get_time("%H", mhours, 5)
      get_time("%M", mmins, 5)
      
      new mins = str_to_num(mmins)
      new hrs = str_to_num(mhours)
      
      if (mins)
         num_to_word(mins, wmins, 31)
      else
         wmins[0] = 0
      
      if (hrs < 12)
         wpm = "am "
      else
      {
         if (hrs > 12) hrs -= 12
         wpm = "pm "
      }

      if (hrs)
         num_to_word(hrs, whours, 31)
      else
         whours = "twelve "
      
      client_cmd(id, "spk ^"fvox/time_is_now %s_period %s%s^"", whours, wmins, wpm)
   }
   
   new ctime[64]
   
   get_time("%m/%d/%Y - %H:%M:%S", ctime, 63)
   ColorMessage(0, "^4[ABSOLUTE-GAME] ^3%L: ^3%s", LANG_PLAYER, "THE_TIME", ctime)
   
   return PLUGIN_CONTINUE
}

public sayTimeLeft(id)
{
   if (get_cvar_float("mp_timelimit"))
   {
      new a = get_timeleft()
      
      if (get_cvar_num("amx_time_voice"))
      {
         new svoice[128]
         setTimeVoice(svoice, 127, 0, a)
         client_cmd(id, "%s", svoice)
      }
      ColorMessage(0, "^4[ABSOLUTE-GAME] ^3%L: ^1%d:%02d", LANG_PLAYER, "TIME_LEFT", (a / 60), (a % 60))
   }
   else
      ColorMessage(0, "^4[ABSOLUTE-GAME] ^3%L", LANG_PLAYER, "NO_T_LIMIT")
   
   return PLUGIN_CONTINUE
}

setTimeText(text[], len, tmlf, id)
{
   new secs = tmlf % 60
   new mins = tmlf / 60
   
   if (secs == 0)
      format(text, len, "%d %L", mins, id, (mins > 1) ? "MINUTES" : "MINUTE")
   else if (mins == 0)
      format(text, len, "%d %L", secs, id, (secs > 1) ? "SECONDS" : "SECOND")
   else
      format(text, len, "%d %L %d %L", mins, id, (mins > 1) ? "MINUTES" : "MINUTE", secs, id, (secs > 1) ? "SECONDS" : "SECOND")
}

setTimeVoice(text[], len, flags, tmlf)
{
   new temp[7][32]
   new secs = tmlf % 60
   new mins = tmlf / 60
   
   for (new a = 0;a < 7;++a)
      temp[a][0] = 0

   if (secs > 0)
   {
      num_to_word(secs, temp[4], 31)
      
      if (!(flags & 8))
         temp[5] = "seconds "   
   }
   
   if (mins > 59)
   {
      new hours = mins / 60
      
      num_to_word(hours, temp[0], 31)
      
      if (!(flags & 8))
         temp[1] = "hours "
      
      mins = mins % 60
   }
   
   if (mins > 0)
   {
      num_to_word(mins, temp[2], 31)
      
      if (!(flags & 8))
         temp[3] = "minutes "
   }
   
   if (!(flags & 4))
      temp[6] = "remaining "
   
   return format(text, len, "spk ^"vox/%s%s%s%s%s%s%s^"", temp[0], temp[1], temp[2], temp[3], temp[4], temp[5], temp[6])
}

findDispFormat(time)
{
   for (new i = 0; g_TimeSet[i][0]; ++i)
   {
      if (g_TimeSet[i][1] & 16)
      {
         if (g_TimeSet[i][0] > time)
         {
            if (!g_Switch)
            {
               g_CountDown = g_Switch = time
               remove_task(8648458)
               set_task(1.0, "timeRemain", 34543, "", 0, "b")
            }
            
            return i
         }
      }
      else if (g_TimeSet[i][0] == time)
      {
         return i
      }
   }
   
   return -1
}

public setDisplaying()
{
   new arg[32], flags[32], num[32]
   new argc = read_argc() - 1
   new i = 0

   while (i < argc && i < 32)
   {
      read_argv(i + 1, arg, 31)
      parse(arg, flags, 31, num, 31)
      
      g_TimeSet[i][0] = str_to_num(num)
      g_TimeSet[i][1] = read_flags(flags)
      
      i++
   }
   g_TimeSet[i][0] = 0
   
   return PLUGIN_HANDLED
}

public timeRemain(param[])
{
   new gmtm = get_timeleft()
   new tmlf = g_Switch ? --g_CountDown : gmtm
   new stimel[12]
   
   format(stimel, 11, "%02d:%02d", gmtm / 60, gmtm % 60)
   set_cvar_string("amx_timeleft", stimel)
   
   if (g_Switch && gmtm > g_Switch)
   {
      remove_task(34543)
      g_Switch = 0
      set_task(0.8, "timeRemain", 8648458, "", 0, "b")
      
      return
   }

   if (tmlf > 0 && g_LastTime != tmlf)
   {
      g_LastTime = tmlf
      new tm_set = findDispFormat(tmlf)
      
      if (tm_set != -1)
      {
         new flags = g_TimeSet[tm_set][1]
         new arg[128]
         
         if (flags & 1)
         {
            new players[32], pnum
            
            get_players(players, pnum, "c")
            
            for (new i = 0; i < pnum; i++)
            {
               setTimeText(arg, 127, tmlf, players[i])
               
               if (flags & 16)
                  set_hudmessage(255, 255, 255, -1.0, 0.85, 0, 0.0, 1.1, 0.1, 0.5, -1)
               else
                  set_hudmessage(255, 255, 255, -1.0, 0.85, 0, 0.0, 3.0, 0.0, 0.5, -1)
               
               show_hudmessage(players[i], "%s", arg)
            }
         }

         if (flags & 2)
         {
            setTimeVoice(arg, 127, flags, tmlf)
            client_cmd(0, "%s", arg)
         }
      }
   }
}

/*START - ColorChat */
stock ColorMessage(const id, const input[], any:...){
    new count = 1, players[32];
    static msg[ 191 ];
    vformat(msg, 190, input, 3);
    if (id) players[0] = id; else get_players(players , count , "ch"); {
        for (new i = 0; i < count; i++){
            if (is_user_connected(players[i])){
                message_begin(MSG_ONE_UNRELIABLE , get_user_msgid("SayText"), _, players[i]);
                write_byte(players[i]);
                write_string(msg);
                message_end();}}}
} 

Ако не знаеш как се компилира, ето ти го готов - > http://dox.bg/files/dw?a=de375ec6c7
User avatar
Reddeyes
Потребител
Потребител
Posts: 149
Joined: 18 Feb 2015, 19:49
Favorite version: CS: 1.6

Re: Заявки за цветен Timeleft!

Post by Reddeyes »

[BG|War3] Timeleft: 29;35(цвят на таймера според отбора)

:)
User avatar
Lautverbindungen
Потребител
Потребител
Posts: 6
Joined: 17 Dec 2016, 22:58
Favorite version: CS: 1.6

Re: Заявки за цветен Timeleft!

Post by Lautverbindungen »

ambrose wrote:[BG|War3] Timeleft: 29;35(цвят на таймера според отбора)

:)
Линк за сваляне : http://dox.bg/files/dw?a=3e127fbf28
User avatar
4SkuLL
VIP
VIP
Posts: 69
Joined: 08 Sep 2016, 20:13
Skype: ЛС!
CS Nick: MadaFackaZ
Favorite version: CS: Global Offensive
Location: Края на Света.
Contact:

Re: Заявки за цветен Timeleft!

Post by 4SkuLL »

[Game-Strike] TimeLeft - T / CT
User avatar
Lautverbindungen
Потребител
Потребител
Posts: 6
Joined: 17 Dec 2016, 22:58
Favorite version: CS: 1.6

Re: Заявки за цветен Timeleft!

Post by Lautverbindungen »

4SkuLL wrote:[Game-Strike] TimeLeft - T / CT
Линк за сваляне : http://dox.bg/files/dw?a=7b04cc1416
User avatar
Reddeyes
Потребител
Потребител
Posts: 149
Joined: 18 Feb 2015, 19:49
Favorite version: CS: 1.6

Re: Заявки за цветен Timeleft!

Post by Reddeyes »

Big Easy wrote:
ambrose wrote:[BG|War3] Timeleft: 29;35(цвят на таймера според отбора)

:)
Линк за сваляне : http://dox.bg/files/dw?a=3e127fbf28
Ще го направиш ли да пише [BG|Deathmatch] пак с същите цветове като предния ? И ако може .SMA
User avatar
asusbg
Потребител
Потребител
Posts: 57
Joined: 20 Nov 2014, 12:40
Skype: ,,,
CS Nick: asusbg
Favorite version: CS: 1.6
Location: Добрич

Re: Заявки за цветен Timeleft!

Post by asusbg »

ambrose wrote:
Big Easy wrote:
ambrose wrote:[BG|War3] Timeleft: 29;35(цвят на таймера според отбора)

:)
Линк за сваляне : http://dox.bg/files/dw?a=3e127fbf28
Ще го направиш ли да пише [BG|Deathmatch] пак с същите цветове като предния ? И ако може .SMA
-->

Code: Select all

#include <amxmodx>

new g_TimeSet[32][2]
new g_LastTime
new g_CountDown
new g_Switch

public plugin_init()
{
   register_plugin("TimeLeft", AMXX_VERSION_STR, "AMXX Dev Team")
   register_dictionary("timeleft.txt")
   register_cvar("amx_time_voice", "1")
   register_srvcmd("amx_time_display", "setDisplaying")
   register_cvar("amx_timeleft", "00:00", FCVAR_SERVER|FCVAR_EXTDLL|FCVAR_UNLOGGED|FCVAR_SPONLY)
   register_clcmd("say timeleft", "sayTimeLeft", 0, "- displays timeleft")
   register_clcmd("say thetime", "sayTheTime", 0, "- displays current time")
   
   set_task(0.8, "timeRemain", 8648458, "", 0, "b")
}

public sayTheTime(id)
{
   if (get_cvar_num("amx_time_voice"))
   {
      new mhours[6], mmins[6], whours[32], wmins[32], wpm[6]
      
      get_time("%H", mhours, 5)
      get_time("%M", mmins, 5)
      
      new mins = str_to_num(mmins)
      new hrs = str_to_num(mhours)
      
      if (mins)
         num_to_word(mins, wmins, 31)
      else
         wmins[0] = 0
      
      if (hrs < 12)
         wpm = "am "
      else
      {
         if (hrs > 12) hrs -= 12
         wpm = "pm "
      }

      if (hrs)
         num_to_word(hrs, whours, 31)
      else
         whours = "twelve "
      
      client_cmd(id, "spk ^"fvox/time_is_now %s_period %s%s^"", whours, wmins, wpm)
   }
   
   new ctime[64]
   
   get_time("%m/%d/%Y - %H:%M:%S", ctime, 63)
   ColorMessage(0, "^3[BG|Deathmatch] ^4%L: ^3%s", LANG_PLAYER, "THE_TIME", ctime)
   
   return PLUGIN_CONTINUE
}

public sayTimeLeft(id)
{
   if (get_cvar_float("mp_timelimit"))
   {
      new a = get_timeleft()
      
      if (get_cvar_num("amx_time_voice"))
      {
         new svoice[128]
         setTimeVoice(svoice, 127, 0, a)
         client_cmd(id, "%s", svoice)
      }
      ColorMessage(0, "^3[BG|Deathmatch] ^4%L: ^3%d:%02d", LANG_PLAYER, "TIME_LEFT", (a / 60), (a % 60))
   }
   else
      ColorMessage(0, "^3[BG|Deathmatch] ^4%L", LANG_PLAYER, "NO_T_LIMIT")
   
   return PLUGIN_CONTINUE
}

setTimeText(text[], len, tmlf, id)
{
   new secs = tmlf % 60
   new mins = tmlf / 60
   
   if (secs == 0)
      format(text, len, "%d %L", mins, id, (mins > 1) ? "MINUTES" : "MINUTE")
   else if (mins == 0)
      format(text, len, "%d %L", secs, id, (secs > 1) ? "SECONDS" : "SECOND")
   else
      format(text, len, "%d %L %d %L", mins, id, (mins > 1) ? "MINUTES" : "MINUTE", secs, id, (secs > 1) ? "SECONDS" : "SECOND")
}

setTimeVoice(text[], len, flags, tmlf)
{
   new temp[7][32]
   new secs = tmlf % 60
   new mins = tmlf / 60
   
   for (new a = 0;a < 7;++a)
      temp[a][0] = 0

   if (secs > 0)
   {
      num_to_word(secs, temp[4], 31)
      
      if (!(flags & 8))
         temp[5] = "seconds "   
   }
   
   if (mins > 59)
   {
      new hours = mins / 60
      
      num_to_word(hours, temp[0], 31)
      
      if (!(flags & 8))
         temp[1] = "hours "
      
      mins = mins % 60
   }
   
   if (mins > 0)
   {
      num_to_word(mins, temp[2], 31)
      
      if (!(flags & 8))
         temp[3] = "minutes "
   }
   
   if (!(flags & 4))
      temp[6] = "remaining "
   
   return format(text, len, "spk ^"vox/%s%s%s%s%s%s%s^"", temp[0], temp[1], temp[2], temp[3], temp[4], temp[5], temp[6])
}

findDispFormat(time)
{
   for (new i = 0; g_TimeSet[i][0]; ++i)
   {
      if (g_TimeSet[i][1] & 16)
      {
         if (g_TimeSet[i][0] > time)
         {
            if (!g_Switch)
            {
               g_CountDown = g_Switch = time
               remove_task(8648458)
               set_task(1.0, "timeRemain", 34543, "", 0, "b")
            }
            
            return i
         }
      }
      else if (g_TimeSet[i][0] == time)
      {
         return i
      }
   }
   
   return -1
}

public setDisplaying()
{
   new arg[32], flags[32], num[32]
   new argc = read_argc() - 1
   new i = 0

   while (i < argc && i < 32)
   {
      read_argv(i + 1, arg, 31)
      parse(arg, flags, 31, num, 31)
      
      g_TimeSet[i][0] = str_to_num(num)
      g_TimeSet[i][1] = read_flags(flags)
      
      i++
   }
   g_TimeSet[i][0] = 0
   
   return PLUGIN_HANDLED
}

public timeRemain(param[])
{
   new gmtm = get_timeleft()
   new tmlf = g_Switch ? --g_CountDown : gmtm
   new stimel[12]
   
   format(stimel, 11, "%02d:%02d", gmtm / 60, gmtm % 60)
   set_cvar_string("amx_timeleft", stimel)
   
   if (g_Switch && gmtm > g_Switch)
   {
      remove_task(34543)
      g_Switch = 0
      set_task(0.8, "timeRemain", 8648458, "", 0, "b")
      
      return
   }

   if (tmlf > 0 && g_LastTime != tmlf)
   {
      g_LastTime = tmlf
      new tm_set = findDispFormat(tmlf)
      
      if (tm_set != -1)
      {
         new flags = g_TimeSet[tm_set][1]
         new arg[128]
         
         if (flags & 1)
         {
            new players[32], pnum
            
            get_players(players, pnum, "c")
            
            for (new i = 0; i < pnum; i++)
            {
               setTimeText(arg, 127, tmlf, players[i])
               
               if (flags & 16)
                  set_hudmessage(255, 255, 255, -1.0, 0.85, 0, 0.0, 1.1, 0.1, 0.5, -1)
               else
                  set_hudmessage(255, 255, 255, -1.0, 0.85, 0, 0.0, 3.0, 0.0, 0.5, -1)
               
               show_hudmessage(players[i], "%s", arg)
            }
         }

         if (flags & 2)
         {
            setTimeVoice(arg, 127, flags, tmlf)
            client_cmd(0, "%s", arg)
         }
      }
   }
}

/*START - ColorChat */
stock ColorMessage(const id, const input[], any:...){
    new count = 1, players[32];
    static msg[ 191 ];
    vformat(msg, 190, input, 3);
    if (id) players[0] = id; else get_players(players , count , "ch"); {
        for (new i = 0; i < count; i++){
            if (is_user_connected(players[i])){
                message_begin(MSG_ONE_UNRELIABLE , get_user_msgid("SayText"), _, players[i]);
                write_byte(players[i]);
                write_string(msg);
                message_end();}}}
}
/*END - ColorChat */
Просто променяте един текст нищо сложно,в случая намери в кода BG|Deathmatch това ти е префикса на съобщението,цветовете са:
^1- Жълто(обикновено)
^3- Според отбора
^4- Зелено
User avatar
bayern93
Потребител
Потребител
Posts: 76
Joined: 25 Nov 2015, 14:06
Skype: Фред Флинтстоун
CS Nick: f0rsaken
Favorite version: CS: 1.6
Steam Community ID: f0rsa93
Location: jail_crime
Contact:

Re: Заявки за цветен Timeleft!

Post by bayern93 »

[BALKAN-CS] ако може цветовете да са според отбора :) и ако може да е компилиран
User avatar
Lautverbindungen
Потребител
Потребител
Posts: 6
Joined: 17 Dec 2016, 22:58
Favorite version: CS: 1.6

Re: Заявки за цветен Timeleft!

Post by Lautverbindungen »

bayern93 wrote:[BALKAN-CS] ако може цветовете да са според отбора :) и ако може да е компилиран
Цък или тука цъкни

Следващият път не чакай на готово!
User avatar
lifeisshort
Потребител
Потребител
Posts: 5
Joined: 07 Jan 2017, 14:33
Skype: miroslavw.ivanov4
CS Nick: ivan0w
Favorite version: CS: 1.6

Re: Заявки за цветен Timeleft!

Post by lifeisshort »

T - [EL PATRON]Time Left 25:10
CT - [EL PATRON] Time Left 25:10
според отбора
User avatar
Ivanov305
V.I.P.
V.I.P.
Posts: 91
Joined: 07 Jul 2012, 18:19
Favorite version: CS: 1.6
Steam Community ID: ivanov305

Re: Заявки за цветен Timeleft!

Post by Ivanov305 »

lifeisshort wrote:T - [EL PATRON]Time Left 25:10
CT - [EL PATRON] Time Left 25:10
според отбора
Заповядай
lifeisshort.rar
(9.42 KiB) Downloaded 173 times
Post Reply

Return to “Заявки”