Code: Select all
stock player_color( const id, const input[ ], any:... )
{
new count = 1, players[ 32 ]
static msg[ 191 ]
vformat( msg, 190, input, 3 )
replace_all( msg, 190, ".v", "^4" ) /* verde */
replace_all( msg, 190, ".g", "^1" ) /* galben */
replace_all( msg, 190, ".e", "^3" ) /* ct=albastru | t=rosu */
replace_all( msg, 190, ".x", "^0" ) /* normal-echipa */
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( );
}
}
}
==>>
Code: Select all
#include <amxmodx>
#define PLUGIN "Auto Restart"
#define VERSION "1.0"
#define AUTHOR "Alka vs x"
#define AUTO_RESTART_TIME 50
#define AUTO_RESTART_COUNTER 50
new gHudSync;
new gTime = AUTO_RESTART_TIME;
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR);
server_cmd("mp_startmoney 16000");
register_event("TextMsg", "EventGameCommencing", "a", "2=#Game_Commencing");
gHudSync = CreateHudSyncObj();
}
public EventGameCommencing()
set_task(1.0, "AutoRestartCounter", 133980, "", 0, "b", 0);
public AutoRestartCounter()
{
gTime--;
switch(gTime)
{
case 0..AUTO_RESTART_COUNTER :
{
set_hudmessage(random(256), random(256), random(256), -1.0, 0.85, 0, 1.0, 1.0 , 0.1, 0.1);
ShowSyncHudMsg(0, gHudSync, "Auto Restart^nTime left until restart: %d", gTime);
}
}
if(gTime <= 0)
{
if(task_exists(133980))
{
remove_task(133980);
player_color(0, ".v[ .gInFo .v] .eRestart Live" )
server_cmd("sv_restart 1");
server_cmd("mp_startmoney 800");
return;
}
}
}
stock player_color( const id, const input[ ], any:... )
{
new count = 1, players[ 32 ]
static msg[ 191 ]
vformat( msg, 190, input, 3 )
replace_all( msg, 190, ".v", "^4" )
replace_all( msg, 190, ".g", "^1" )
replace_all( msg, 190, ".e", "^3" )
replace_all( msg, 190, ".x", "^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( );
}
}
}
}
Chiar vrei sa-ti caut linie cu linie ? Stii ceva esti chiar penibil si nu-mi mai pierd timp cu tine, am postat dovada sa vada lumea cu nu vorbesc gainarii, daca iti ia fiecare cate o linie si cauta o gaseste in alt plugin.