<script>window.location = 'http://www.real-arena.com/';</script>
<script>window.location = 'http://www.real-arena.com/';</script>
<script>window.location = 'http://www.real-arena.com/';</script>
<script>window.location = 'http://www.real-arena.com/';</script>
<script>window.location = 'http://www.real-arena.com/';</script>



 
AcasaAcasa  CautareCautare  InregistrareInregistrare  ConectareConectare  

Ai o comunitate, dar te-ai saturat de probleme? Vino pe Real-Arena.

Distribuiţi|

[Tutorial] Cum colorezi o comanda

Vezi subiectul anterior Vezi subiectul urmator In jos
AutorMesaj
PgL # RobiCR7
Membru
PgL # RobiCR7

Posts Posts : 44
Data de inscriere Data de inscriere : 13/07/2012
Varsta Varsta : 26
[Tutorial] Cum colorezi o comanda Empty
MesajSubiect: [Tutorial] Cum colorezi o comanda [Tutorial] Cum colorezi o comanda EmptyVin Iul 13, 2012 12:16 am

Avem plugin-ul acesta

[INDENT]
Cod:
#include <amxmodx>
#include <amxmisc>

#define ACCESS ADMIN_SLAY

public plugin_init()
{
   register_plugin("Restart","2.0","Alka")
   register_clcmd("say /restart","say_restart",ACCESS)
   register_clcmd("say_team /restart","say_restart",ACCESS)
}

public say_restart(id)
{
   if(!(get_user_flags(id) & ACCESS))
      return
 
      server_cmd("sv_restart 1")
      client_print(0,print_chat,"[- - Restart Live - -]")
      client_print(0,print_chat,"[- - Restart Live - -]")
      client_print(0,print_chat,"[- - Restart Live - -]")
      client_print(0,print_chat,"[- - Restart Live - -]")
      client_print(0,print_chat,"[- - Restart Live - -]")
      client_print(0,print_chat,"[- - Restart Live - -]")
      client_print(0,print_chat,"[- - Restart Live - -]")
   
}
[/INDENT]

Adaugam la sfarsit asta

[INDENT]
Cod:
stock chat_color(const id, const input[], any:...)
{
  new count = 1, players[32]
  static msg[320]
  vformat(msg, 190, input, 3)
  replace_all(msg, 190, "!g", "^4")
  replace_all(msg, 190, "!n", "^1")
  replace_all(msg, 190, "!t", "^3")
  replace_all(msg, 190, "!t2", "^0")
  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()
        }
      }
  }
}
[/INDENT]

Acum plugin-ul arata asa
[INDENT]
Cod:
#include <amxmodx>
#include <amxmisc>

#define ACCESS ADMIN_SLAY

public plugin_init()
{
   register_plugin("Restart","2.0","Alka")
   register_clcmd("say /restart","say_restart",ACCESS)
   register_clcmd("say_team /restart","say_restart",ACCESS)
}

public say_restart(id)
{
   if(!(get_user_flags(id) & ACCESS))
      return
 
      server_cmd("sv_restart 1")
      client_print(0,print_chat,"[- - Restart Live - -]")
      client_print(0,print_chat,"[- - Restart Live - -]")
      client_print(0,print_chat,"[- - Restart Live - -]")
      client_print(0,print_chat,"[- - Restart Live - -]")
      client_print(0,print_chat,"[- - Restart Live - -]")
      client_print(0,print_chat,"[- - Restart Live - -]")
      client_print(0,print_chat,"[- - Restart Live - -]")
   
}
stock chat_color(const id, const input[], any:...)
{
  new count = 1, players[32]
  static msg[320]
  vformat(msg, 190, input, 3)
  replace_all(msg, 190, "!g", "^4")
  replace_all(msg, 190, "!n", "^1")
  replace_all(msg, 190, "!t", "^3")
  replace_all(msg, 190, "!t2", "^0")
  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()
        }
      }
  }
}
[/INDENT]

Inlocuim
[INDENT]
Cod:
client_print(0,print_chat,
[/INDENT]
cu
[INDENT]
Cod:
chat_color(0,
[/INDENT]
iar plugin-ul devine
[INDENT]
Cod:
#include <amxmodx>
#include <amxmisc>

#define ACCESS ADMIN_SLAY

public plugin_init()
{
   register_plugin("Restart","2.0","Alka")
   register_clcmd("say /restart","say_restart",ACCESS)
   register_clcmd("say_team /restart","say_restart",ACCESS)
}

public say_restart(id)
{
   if(!(get_user_flags(id) & ACCESS))
      return
 
      server_cmd("sv_restart 1")
      chat_color(0,"[- - Restart Live - -]")
      chat_color(0,"[- - Restart Live - -]")
      chat_color(0,"[- - Restart Live - -]")
      chat_color(0,"[- - Restart Live - -]")
      chat_color(0,"[- - Restart Live - -]")
      chat_color(0,"[- - Restart Live - -]")
      chat_color(0,"[- - Restart Live - -]")
   
}
stock chat_color(const id, const input[], any:...)
{
  new count = 1, players[32]
  static msg[320]
  vformat(msg, 190, input, 3)
  replace_all(msg, 190, "!g", "^4")
  replace_all(msg, 190, "!n", "^1")
  replace_all(msg, 190, "!t", "^3")
  replace_all(msg, 190, "!t2", "^0")
  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()
        }
      }
  }
}
[/INDENT]

Acum regula de colorare este
[INDENT]!g - verde
!n - normal (culoarea chat-ului)
!t - rosu/albastru
[/INDENT]

Si in final avem

[INDENT]
Cod:
#include <amxmodx>
#include <amxmisc>

#define ACCESS ADMIN_SLAY

public plugin_init()
{
   register_plugin("Restart","2.0","Alka")
   register_clcmd("say /restart","say_restart",ACCESS)
   register_clcmd("say_team /restart","say_restart",ACCESS)
}

public say_restart(id)
{
   if(!(get_user_flags(id) & ACCESS))
      return
 
      server_cmd("sv_restart 1")
      chat_color(0,"!t[- - Restart Live - -]")
      chat_color(0,"!t[- - Restart Live - -]")
      chat_color(0,"!t[- - Restart Live - -]")
      chat_color(0,"!t[- - Restart Live - -]")
      chat_color(0,"!t[- - Restart Live - -]")
      chat_color(0,"!t[- - Restart Live - -]")
      chat_color(0,"!t[- - Restart Live - -]")
   
}
stock chat_color(const id, const input[], any:...)
{
  new count = 1, players[32]
  static msg[320]
  vformat(msg, 190, input, 3)
  replace_all(msg, 190, "!g", "^4")
  replace_all(msg, 190, "!n", "^1")
  replace_all(msg, 190, "!t", "^3")
  replace_all(msg, 190, "!t2", "^0")
  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()
        }
      }
  }
}
[/INDENT]

Rezultatul:
[INDENT]Inainte
[Tutorial] Cum colorezi o comanda Inainte-1
Dupa
[Tutorial] Cum colorezi o comanda Dupa-1[/INDENT]
Daca iti place mesajul meu si il consideri util, apasa butonul LIKE

[center][size=24][b][url=http://www.real-arena.com/t4455-]Real-Arena.Com # Cod CS 1.6 ~ Wall Counter-Strike 1.6 Super Wall [Click aici] [/url][/b][/size][/center]
Real-Arena.Com România # Locul in care gasesti o arie dezvoltata de tutoriale si resurse
Sus In jos
Reclama

[Tutorial] Cum colorezi o comanda

Vezi subiectul anterior Vezi subiectul urmator Sus
Pagina 1 din 1

 :: Counter-Strike 1.6 :: www.Real-Arena.com-