Page 1 of 1
Cerere Plugin New
Posted: 31 Aug 2010, 13:11
by sandelu32
Va rog puteti sa ma ajutati cu un sma
as vrea un ceas asa sa arate
Numele Serverului-Scorpion_Zone
Ora-
Urmatoare Harta-
Precedenta Harta-
Timpul Ramas-
va rog ajutatima mult mss
Re: Cerere Plugin New
Posted: 31 Aug 2010, 13:25
by Ciprian
Ai cumva si pluginul last maps?
Re: Cerere Plugin New
Posted: 31 Aug 2010, 14:01
by sandelu32
ciprian n-am da poti sama ajuti si fara folderul ala???
Re: Cerere Plugin New
Posted: 31 Aug 2010, 16:03
by Ciprian
- | Afiseaza codul
[code=php]/* Plugin generated by AMXX-Studio */
#include < amxmodx >
#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "Ciprian"
#define INTERVAL 20
#define RED 255
#define GREEN 255
#define BLUE 0
#define X_POS 0.00
#define Y_POS 0.14
#define DURATION 1.1
new g_Message[ ] = "Numele serverului: %s^nOra: %s^nUrmatoarea harta: %s^nHarta Precedenta: %s^nTimpul ramas: %d:%02d";
new pCvar_HostName, pCvar_NextMap, s_Arg[ 2 ][ 32 ], g_HudSyncMsg, g_LastMap[ 32 ];//, bool: FileExists = false;
public plugin_init ( ) {
register_plugin ( PLUGIN, VERSION, AUTHOR );
pCvar_HostName = get_cvar_pointer ( "hostname" );
pCvar_NextMap = get_cvar_pointer ( "amx_nextmap" );
g_HudSyncMsg = CreateHudSyncObj ( );
get_pcvar_string ( pCvar_HostName, s_Arg[ 0 ], 31 );
get_pcvar_string ( pCvar_NextMap, s_Arg[ 1 ], 31 );
set_task ( 1.0, "task_show_message", _, _, _, "b" );
}
public plugin_cfg ( ) {
new s_ConfigsDir[ 64 ], s_File[ 64 ], g_CurrentMap[ 32 ];
get_localinfo ( "amxx_configsdir", s_ConfigsDir, charsmax ( s_ConfigsDir ) );
formatex ( s_File, charsmax ( s_File ), "%s/last_map.txt", s_ConfigsDir );
get_mapname ( g_CurrentMap, charsmax ( g_CurrentMap ) );
new fp = fopen ( s_File, "rt" );
if ( file_exists ( s_File ) ) {
fgets ( fp, g_LastMap, charsmax ( g_LastMap ) );
fclose ( fp );
}
delete_file ( s_File );
fp = fopen ( s_File, "wt" );
if ( file_exists ( s_File ) )
fputs ( fp, g_CurrentMap );
fclose ( fp );
}
public task_show_message ( ) {
new s_Timer[ 16 ];
get_time ( "%H:%M:%S", s_Timer, charsmax ( s_Timer ) );
new i_TimeLeft = get_timeleft ( );
set_hudmessage ( RED, GREEN, BLUE, X_POS, Y_POS, 0, 6.0, DURATION );
ShowSyncHudMsg ( 0 , g_HudSyncMsg, g_Message, s_Arg[ 0 ], s_Timer, s_Arg[ 1 ], g_LastMap, i_TimeLeft / 60, i_TimeLeft % 60 );
} [/code]
P.S: Va merge numai dupa ce schimbi harta a 2-a oara :)
Re: Cerere Plugin New
Posted: 31 Aug 2010, 16:37
by sandelu32
ciprian da nu poti sa pui ora si toate celalate in stinga sus nu la minjlok poti daca poti pliz afisazami codu plizz
msssssssssssssssssss
Re: Cerere Plugin New
Posted: 31 Aug 2010, 16:42
by Ciprian
sandelu32 wrote:ciprian da nu poti sa pui ora si toate celalate in stinga sus nu la minjlok poti daca poti pliz afisazami codu plizz
msssssssssssssssssss
Dar merge, nu?
Vezi din nou codul de mai sus ca l-am modificat.
Si ai putea sa apesi butonul
:-"