Motd Say ( 0.2 )
Pagina 1 din 1
Motd Say ( 0.2 )
Descriere:
Acest plugin trimite un mesaj motd jucatorilor, poti formata mesajul in html direct din consola, exemplu mesaj: <font size=3 color=red> Fara surf dmg!</font> .
Q: Dc se numeste comanda "amx_msay" ? M- Motd format, Say - pentru ca ii zice ceva prin format motd.
Comenzi Admin:
Info:
Versiune: 1.0
Link Official: https://forums.alliedmods.net/showthread.php?t=278124
Autor: Fuffy
Descarcare:
Sursa:
Toate versiunile(sursa si amxx file sunt postate de la ultima versiune): https://github.com/fufy/Admin-Motd-Message
Module necesare: AMXmisc , CStrike.
Imagini:
Cine vrea sa faca?
ChangeLog:
Acest plugin trimite un mesaj motd jucatorilor, poti formata mesajul in html direct din consola, exemplu mesaj: <font size=3 color=red> Fara surf dmg!</font> .
Q: Dc se numeste comanda "amx_msay" ? M- Motd format, Say - pentru ca ii zice ceva prin format motd.
Comenzi Admin:
- Cod:
// Display to all tero:
amx_msay #T "The message" "Title of the motd window"
amx_msay #TE "The message" "Title of the motd window"
amx_msay #TERO "The message" "Title of the motd window"
amx_msay #TERROR "The message" "Title of the motd window"
amx_msay #TERRORIST "The message" "Title of the motd window"
// Display to all ct:
amx_msay #C "The message" "Title of the motd window"
amx_msay #CT "The message" "Title of the motd window"
amx_msay #COUNTER "The message" "Title of the motd window"
// Display to all spectators:
amx_msay #S "The message" "Title of the motd window"
amx_msay #SPEC "The message" "Title of the motd window"
amx_msay #SPECTATOR "The message" "Title of the motd window"
amx_msay #SPECTATORS "The message" "Title of the motd window"
// Display to all players:
amx_msay #A "The message" "Title of the motd window"
amx_msay #ALL "The message" "Title of the motd window"
// Display only to all admins:
amx_msay #AD "The message" "Title of the motd window"
amx_msay #ADMIN "The message" "Title of the motd window"
amx_msay #ADMINS "The message" "Title of the motd window"
// Display to only one single player:
amx_msay Player "<b> The </b> message." "Title of the motd window"
Info:
Versiune: 1.0
Link Official: https://forums.alliedmods.net/showthread.php?t=278124
Autor: Fuffy
Descarcare:
Sursa:
- Spoiler:
- #include <amxmisc>
#include <cstrike>
new const PLUGIN[] = "Admin Motd Message",
VERSION[] = "0.4",
AUTHOR[] = "Craxor";
public plugin_init( )
{
register_plugin
(
.plugin_name = PLUGIN,
.version = VERSION,
.author = AUTHOR
)
register_concmd("amx_msay", "motdcmd", ADMIN_KICK, "<name> <motd message> <motd title>" );
}
public motdcmd( id, level, cid )
{
if( !cmd_access( id, level, cid, 3 ) )
return PLUGIN_HANDLED;
new Arg1[34];
new Arg2[255];
new Arg3[34];
read_argv( 1, Arg1, charsmax( Arg1 ) );
read_argv( 2, Arg2, charsmax( Arg2 ) );
read_argv( 3, Arg3, charsmax( Arg3 ) );
if( Arg3[0] == EOS )
formatex( Arg3, charsmax( Arg3 ), "* Admin Private Motd Message *" );
if( Arg2[0] == EOS )
{
client_print( id, print_console, "< Name > < Motd Message > < Motd Title >" );
return PLUGIN_HANDLED;
}
new szName[32];
get_user_name( id, szName, charsmax( szName ) );
new buffer[255];
formatex( buffer, charsmax( buffer ), "<center> <b> <font size = 5 color = blue >Message from admin</font><font size = 4 color = green> %s</font> </b> <p><b><u><font size = 2 color white ></center>Message</u></b>: %s", szName, Arg2 );
new Players[32], num;
if( Arg1[0] == '#' )
{
if( equali( Arg1[1], "T" ) || equali( Arg1[1], "TE" ) || equali( Arg1[1], "TERO" )|| equali( Arg1[1], "TERROR" )|| equali( Arg1[1], "TERRORIST" ) )
{
get_players(Players,num,"ceh","TERRORIST");
for (new i=0; i<num; i++)
show_motd( Players[i], buffer, Arg3 );
return PLUGIN_HANDLED;
}
else if( equali( Arg1[1], "C" ) || equali( Arg1[1], "CT" ) || equali( Arg1[1], "COUNTER" ) )
{
get_players(Players,num,"ceh","CT");
for (new i=0; i<num; i++)
show_motd( Players[i], buffer, Arg3 );
return PLUGIN_HANDLED;
}
else if( equali( Arg1[1], "A" ) || equali( Arg1[1], "ALL" ) )
{
get_players(Players,num,"ceh");
for (new i=0; i<num; i++)
show_motd( Players[i], buffer, Arg3 );
return PLUGIN_HANDLED;
}
else if( equali( Arg1[1], "AD" ) || equali( Arg1[1], "ADMIN" ) || equali( Arg1[1], "ADMINS" ) )
{
get_players(Players,num,"ceh");
for (new i=0; i<num; i++)
if( is_user_admin( Players[i] ) )
show_motd( Players[i], buffer, Arg3 );
return PLUGIN_HANDLED;
}
else if( equali( Arg1[1], "S" ) || equali( Arg1[1], "SPEC" ) || equali( Arg1[1], "SPECTATOR" ) || equali( Arg1[1], "SPECTATORS" ) )
{
get_players(Players,num,"ceh");
for (new i=0; i<num; i++)
if( cs_get_user_team( Players[i] ) == CS_TEAM_SPECTATOR )
show_motd( Players[i], buffer, Arg3 );
return PLUGIN_HANDLED;
}
else
{
client_print( id, print_console, "Incorect format!" );
return PLUGIN_HANDLED;
}
}
else
{
new Player = cmd_target(id, Arg1, CMDTARGET_ALLOW_SELF );
if( !Player || !is_user_connected( Player ) )
return PLUGIN_HANDLED;
show_motd( Player, buffer, Arg3 );
return PLUGIN_HANDLED;
}
return PLUGIN_HANDLED;
}
Toate versiunile(sursa si amxx file sunt postate de la ultima versiune): https://github.com/fufy/Admin-Motd-Message
Module necesare: AMXmisc , CStrike.
Imagini:
Cine vrea sa faca?
ChangeLog:
V0.2:
+ Add an "prevent" if the player will not use Arg3 will be used the default tag.
+Code optimization
+Added more tags.
V0.1: First release.
CelRau- Registered user
- Mesaje : 184
Data de inscriere : 26/11/2016
Pagina 1 din 1
Permisiunile acestui forum:
Nu puteti raspunde la subiectele acestui forum
|
|