Counter-Strike 1.6 Download Forum

Counter-Strike Server RSS Feed atom+xml Counter-Strike Server RSS Feed Counter-Strike Server CsBesTiaL Top 100 BesTiaL Autentificare Inregistrare Profil Mesaje private FAQ Grupuri Counter-Strike
 Servere-le de Counter-Strike CsBesTiaL sunt Pornite
cs bestial
Custom Search
Get our toolbar! Download Counter-Strike 1.6 andoird application
Timeleft In HostName [ AMXX ] hlds
Du-te la pagina despre counter-strike
 
Creaza un subiect nou   Raspunde la subiect
Mesaj
Happines11
Vizitator





Mesaj

2011-11-11    cstrike Timeleft In HostName [ AMXX ] hlds


Desrecrie:Acest plugin arata timpul ramas in HostName

CODE:#include <amxmodx>
#include <engine>

#pragma semicolon 1

#define UPDATE_TIME 1.0
#define ENTITY_CLASS "env_host_timeleft"

new bool:g_timerRunning = false;
new g_MsgServerName;
new g_szHostname[ 64 ];
new g_pointerTimelimit;
new g_pointerHostname;
new g_cvarEnabled;
new g_cvarStyle;

public plugin_init() {
register_plugin( "Hostname Timeleft", "1.0", "xPaw" );

g_cvarEnabled = register_cvar( "sv_hostname_timeleft", "1" );
g_cvarStyle = register_cvar( "sv_hostname_style", "3" );
g_pointerTimelimit = get_cvar_pointer( "mp_timelimit" );
g_pointerHostname = get_cvar_pointer( "hostname" );

g_MsgServerName = get_user_msgid( "ServerName" );

// Give delay to load configs...
set_task( 2.5, "checkTimeleft" );
}

public plugin_end( )
if( g_timerRunning )
if( strlen( g_szHostname ) )
set_pcvar_string( g_pointerHostname, g_szHostname );

public checkTimeleft( ) {
get_pcvar_string( g_pointerHostname, g_szHostname, 63 );

if( get_pcvar_num( g_cvarEnabled ) != 1 ) {
g_timerRunning = false;

return;
} else
register_think( ENTITY_CLASS, "fwdThink_Updater" );

g_timerRunning = true;

// initialize thinking entity...
new iEntityTimer = create_entity( "info_target" );
entity_set_string( iEntityTimer, EV_SZ_classname, ENTITY_CLASS );
entity_set_float( iEntityTimer, EV_FL_nextthink, get_gametime() + UPDATE_TIME );
}

public fwdThink_Updater( iEntity ) {
static szHostname[ 64 ], iStyle;
iStyle = get_pcvar_num( g_cvarStyle );

if( get_pcvar_float( g_pointerTimelimit ) ) {
static iHours, iMinutes, iSeconds;

iSeconds = get_timeleft( );
iMinutes = iSeconds / 60;
iHours = iMinutes / 60;
iSeconds = iSeconds - iMinutes * 60;
iMinutes = iMinutes - iHours * 60;


if( iHours ) {
switch( iStyle ) {
case 1: formatex( szHostname, 63, "%s (Timeleft %d:%02d:%02d)", g_szHostname, iHours, iMinutes, iSeconds );
case 2, 4: formatex( szHostname, 63, "%s (%d:%02d:%02d)", g_szHostname, iHours, iMinutes, iSeconds );
case 3, 5: formatex( szHostname, 63, "(%d:%02d:%02d) %s", iHours, iMinutes, iSeconds, g_szHostname );
}
} else {
switch( iStyle ) {
case 1: formatex( szHostname, 63, "%s (Timeleft %d:%02d)", g_szHostname, iMinutes, iSeconds );
case 2, 4: formatex( szHostname, 63, "%s (%d:%02d)", g_szHostname, iMinutes, iSeconds );
case 3, 5: formatex( szHostname, 63, "(%d:%02d) %s", iMinutes, iSeconds, g_szHostname );
}
}
} else {
switch( iStyle ) {
case 1: formatex( szHostname, 63, "%s (No time limit)", g_szHostname );
case 2, 4: formatex( szHostname, 63, "%s (--:--)", g_szHostname );
case 3, 5: formatex( szHostname, 63, "(--:--) %s", g_szHostname );
}
}

if( iStyle < 4 )
set_pcvar_string( g_pointerHostname, szHostname );

message_begin( MSG_BROADCAST, g_MsgServerName );
write_string( szHostname );
message_end( );

entity_set_float( iEntity, EV_FL_nextthink, get_gametime() + UPDATE_TIME );

return PLUGIN_CONTINUE;
}




Instalare:
1. Fisierul HostnameTimeleft.sma il puneti in addons/amxmodx/scripting
2. Fisierul HostnameTimeleft.amxx il puneti in addons/amxmodx/plugins
3. Intrati in fisierul addons/amxmodx/configs/plugins.ini si adaugati la urma:
CODE:HostnameTimeleft.amxx


Stilul Time Left
Stilul 1
Code:hostname (Timeleft: 35:20)
hostname (No timelimit)

Stilul 2, 4
Code:hostname (35:20)
hostname (--:--)

Stilul 3, 5
Code:(35:20) hostname
(--:--) hostname

Cvars: (se adauga in fisierul amxmodx\configs\amxx.cfg):
sv_hostname_timeleft 0/1 - Activeaza/Dezactiveaza pluginul.
sv_hostname_style 1-5 - Stilul Time Left (Default: 3)
Cs Forum
WwW.PlacePuB.Ro
WwW.PlacePuB.Ro
placepub




Mesaj

2011-11-11    cstrike




Cs Forum
Afiseaza mesajele despre Counter-Strike pentru a le previzualiza:    
Creaza un subiect nou   Raspunde la subiect    Counter Strike Forum - Tutoriale Counter-Strike 1.6 download -> Pluginuri Counter - Strike 1.6 cstrike Ora este GMT + 2 ore
Du-te la pagina despre counter-strike
Pagina 1 din 0

 
Mergi direct la pagina de counter-strike 1.6:  
Nu puteti crea un subiect nou In acest forum despre counter-strike
Nu puteti raspunde In subiectele acestui forum despre counter-strike
Nu puteti modifica mesajele proprii din acest forum despre counter-strike
Nu puteti sterge mesajele proprii din acest forum despre counter-strike
Nu puteti vota In chestionarele din acest forum despre counter-strike

Privacy Policy | Politica de Confidentialitate



 Safe Site

By Bogdan Maxim. Published in the Counter-strike 1.6 Download category