[Tutorial]Colorare Comenzi folosind Stock

Tutoriale pentru Counter-Strike aprobate de eXtream!

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Post Reply
User avatar
h4wk
Fost moderator
Fost moderator
Posts: 3806
Joined: 22 Sep 2009, 13:10
Detinator Steam: Da
Reputatie: Fost eXtream Mod
Nume anterior : DaZ , zimpe , Dan eXtream
Location: Iasi
Has thanked: 306 times
Been thanked: 321 times
Contact:

05 Jun 2012, 22:08

Autor: C

Incepem :)

Folosim un plugin simplu de restart..

Code: Select all

#include <amxmodx>
#include <amxmisc>
 
public plugin_init()
{
 register_plugin("Restart", "1.0", "C")
 
 register_concmd("say .restart","rr",ADMIN_KICK,"-Da Restart")
 
}
public rr(){
 client_print(0, print_chat, "Live Live Live")
 client_print(0, print_chat, "Live Live Live")
 client_print(0, print_chat, "Live Live Live")
 client_print(0, print_chat, "Live Live Live")
 client_print(0, print_chat, "Live Live Live")
 client_print(0, print_chat, "Live Live Live")
 
 server_cmd("sv_restart 1");
 return PLUGIN_HANDLED;
}
Adaugam jos in sma Codu asta:

Code: Select all

stock chat_color(const id, const input[], any:...)
{
 new count = 1, players[32]
 static msg[191]
 vformat(msg, 190, input, 3)
 
 replace_all(msg, 190, "!g", "^4")
 replace_all(msg, 190, "!y", "^1")
 replace_all(msg, 190, "!team", "^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();
   }
  }
 }
}
 
Pana acuma avem asa :-"

Code: Select all

#include <amxmodx>
#include <amxmisc>
public plugin_init()
{
 register_plugin("Restart", "1.0", "C")
 
 register_concmd("say /restart","rr5",ADMIN_KICK,"-Da Restart")
        
}
public rr5(){
 client_print(0, print_chat, "gLive Live Live")
 client_print(0, print_chat, "Live Live Live")
 client_print(0, print_chat, "Live Live Live")
 client_print(0, print_chat, "Live Live Live")
 client_print(0, print_chat, "Live Live Live")
 client_print(0, print_chat, "Live Live Live")
 
 
 server_cmd("sv_restart 1");
 return PLUGIN_HANDLED;
}
stock chat_color(const id, const input[], any:...)
{
 new count = 1, players[32]
 static msg[191]
 vformat(msg, 190, input, 3)
 
 replace_all(msg, 190, "!g", "^4")
 replace_all(msg, 190, "!y", "^1")
 replace_all(msg, 190, "!team", "^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();
   }
  }
 }
}

In loc de

client_print(0, print_chat, "

punem

chat_color(0,"

Culori :[/b]

!g este Verde
!y este Galben
!team este Rosu la Terro si Albastru la CT

Si uitati un exemplu:

Code: Select all

#include <amxmodx>
#include <amxmisc>
public plugin_init()
{
 register_plugin("Restart", "1.0", "C")
 
 register_concmd("say /restart","rr5",ADMIN_KICK,"-Da Restart")
        
}
public rr5(){
 chat_color(0,"!gLive Live Live")
 chat_color(0,"!yLive Live Live")
 chat_color(0,"!teamLive Live Live")
 chat_color(0,"!gLive Live Live")
 chat_color(0,"!yLive Live Live")
 chat_color(0,"!teamLive Live Live")
 
 server_cmd("sv_restart 1");
 return PLUGIN_HANDLED;
}
stock chat_color(const id, const input[], any:...)
{
 new count = 1, players[32]
 static msg[191]
 vformat(msg, 190, input, 3)
 
 replace_all(msg, 190, "!g", "^4")
 replace_all(msg, 190, "!y", "^1")
 replace_all(msg, 190, "!team", "^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();
   }
  }
 }
}

Poze

Code: Select all

"Daca ai culoare nu inseamna ca esti mai presus ca un utilizator. Culoare e un fel de "rasplata" pentru ca te implici in "ridicarea" acestei comunitati.
Unii nu realizeaza ca daca ai culoare nu inseamna ca esti smecher." -- by Alexey
:troll :troll

Spui ceva,dar faci altceva !
RoyalServer
RORSCH!
Membru, skill +2
Membru, skill +2
Posts: 641
Joined: 23 Feb 2012, 12:44
Detinator Steam: Da
Reputatie: Fost webdesigner eXtream
Fost moderator
Nume anterioare:
newlifezm, d3L, E.A.Graphics, Rorschach
Location: Temesvár
Has thanked: 76 times
Been thanked: 36 times
Contact:

06 Jun 2012, 07:34

Trebuie sa fi batut in cap sa te chinui ca prostu' la fiecare plugin.Nu crezi ca daca faceai asta cu admincmd rezolvai tot ? putin din lang modificai si ceau.
Dar bineinteles, tu ai copiat si ai postat aici, n-ai de unde sa sti... :) (macar ai pus autorul, bravo)
User avatar
BuSy.
Membru, skill 0
Membru, skill 0
Posts: 23
Joined: 07 Mar 2012, 15:41
Detinator Steam: Da
CS Status: Si eu pe aici :)
Detinator server CS: Nu
SteamID: Privat
Location: Constanta
Has thanked: 1 time
Contact:

08 Jun 2012, 04:27

Auzi , dar stau si ma intreb , pe tine te doare mana sa faci asa ceva ? Sau cautati numai mocangeala ?:> Eu zic ca a 2-a varianta :) Puneti-va ma mintea la contributie umpic . El ti-a oferit un tutorial , ia incearca si foloseste-l in loc sa astepti sa-ti faca altii munca ;)
Respecta si vei fi respectat :)
User avatar
FaSt3R
Membru, skill 0
Membru, skill 0
Posts: 26
Joined: 15 Feb 2012, 13:02
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Detinator server CS: Furien.Lunetistii.Ro
Has thanked: 1 time
Been thanked: 1 time
Contact:

09 Jun 2012, 09:29

newlifezm wrote:Trebuie sa fi batut in cap sa te chinui ca prostu' la fiecare plugin.Nu crezi ca daca faceai asta cu admincmd rezolvai tot ? putin din lang modificai si ceau.
Dar bineinteles, tu ai copiat si ai postat aici, n-ai de unde sa sti... :) (macar ai pus autorul, bravo)
A dat un exemplu pentru aceste pluginuri ,dar poti folosi acest tutorial pentru alte pluginuri ,la pluginul knife mod cand iti arata mesajele poti sa folosesti si sa colorezi mesajele daca doresti ,nu e simplu ,dar exista si alta metoda.....
Image
Nume: FaSteR
Y&M: [email protected]
Server: Furien.DynamicSpace.Ro

Image
User avatar
KrAiD.
Fost moderator
Fost moderator
Posts: 866
Joined: 15 Jun 2013, 12:14
Detinator Steam: Da
CS Status: Cat de cat activ :D
Detinator server CS: Nu
Reputatie: Fost Moderator ajutator
0.7 / 3
Has thanked: 14 times
Been thanked: 131 times
Contact:

03 Nov 2013, 12:30

Mutat in sectiunea corespunzatoare !
OWNX
Utilizator restrictionat
Utilizator restrictionat
Posts: 247
Joined: 24 Aug 2013, 00:09
Detinator Steam: Da
CS Status: [email protected]
Detinator server CS: Server Privat
SteamID: Privat
Reputatie: Utilizator Restrictionat: WishExec
Location: Bragadiru
Has thanked: 10 times
Been thanked: 24 times

03 Nov 2013, 12:39

off : Eu zic sa terminati cu "Hateareala" , macar omu' a incercat sa ii ajute pe cei care nu stiu ... ati uitat ca va batea la inceput colorchat acum sunteti mari scripteri , aroganti si credeti ca le stiti pe toate ...

scopu' in viata nu e sa te crezi perfect si sa fi arogant ... ma rog o parere personala

on : Un tutorial folositor bravo ...
Email :[/color] [email protected]


* Privat War3FT V5.0 ( 10 Euro AMXX + SMA ) : http://www.extreamcs.com/forum/anunturi ... 15532.html
DEMO : 93.119.26.151
* Privat UWC3X V4.0 ( 15 Euro AMXX ) : http://www.extreamcs.com/forum/anunturi ... l#p1810595
DEMO : 89.39.13.139

Accept Oferte si Negocieri prin PM
Post Reply

Return to “Tutoriale”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 11 guests