Page 1 of 1

NEW PLUGIN 2010

Posted: 08 Sep 2010, 13:39
by sandelu32
as vre asi io un plugin ceas asa sa fie http://img693.imageshack.us/i/deaztec0002ox.png/ va rog mult de culoarea asta mersi

mssssssssssss

Re: NEW PLUGIN 2010

Posted: 08 Sep 2010, 13:49
by iReal.
Descriere: Acest plugin arata cat este ceasul si data pe server sub radar, mesajul este format HUD de culoare rosie
Descarcare: Click
Instalare:
1. Fisierul resetscore.sma il puneti in addons/amxmodx/scripting
2. Fisierul resetscore.amxx il puneti in addons/amxmodx/plugins
3. Intrati in fisierul addons/amxmodx/configs/plugins.ini si adaugati urmatoarea linie

Code: Select all

clock_date.amxx

Re: NEW PLUGIN 2010

Posted: 08 Sep 2010, 14:11
by sandelu32
nu vreau ca il am plizz pune cum ti-am zis data poti uitete pe poza asa vreau io

Re: NEW PLUGIN 2010

Posted: 09 Sep 2010, 08:22
by Arion
Abea stii sa folosesti limba romana, dapai un forum :|

Exista regula generala - Fara dublu post !

Re: NEW PLUGIN 2010

Posted: 09 Sep 2010, 11:39
by Ciprian
Deci tu ce vrei? In loc de numele severului sa fie numele serverului tau?

Re: NEW PLUGIN 2010

Posted: 09 Sep 2010, 13:58
by sandelu32
Da ciprian

Re: NEW PLUGIN 2010

Posted: 09 Sep 2010, 14:35
by Ciprian
sandelu32 wrote:Da 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            -1.0
#define Y_POS            0.00
#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 );
}





/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1033\\ f0\\ fs16 \n\\ par }
*/
 [/code]

Re: NEW PLUGIN 2010

Posted: 09 Sep 2010, 14:39
by sandelu32
ciprian eu vreau asa sa fie sa nu fie altfel http://img693.imageshack.us/i/deaztec0002ox.png/ ma ajuti ori nu??

Re: NEW PLUGIN 2010

Posted: 09 Sep 2010, 15:03
by Ciprian
sandelu32 wrote:ciprian eu vreau asa sa fie sa nu fie altfel http://img693.imageshack.us/i/deaztec0002ox.png/ ma ajuti ori nu??
Esti cumva ironic?
| 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            255
#define X_POS            0.02
#define Y_POS            0.15
#define DURATION        1.1

new g_Message[ ] = "%s^n[ Timpul ramas ] : %d:%02d^n[ Urmatoarea harta ] : %s^n[ Ora ] : %s";

new pCvar_HostName, pCvar_NextMap, s_Arg[ 2 ][ 32 ], g_HudSyncMsg;

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 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 ], i_TimeLeft / 60, i_TimeLeft % 60, s_Arg[ 1 ], s_Timer );
}

/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1033\\ f0\\ fs16 \n\\ par }
*/ [/code]
Sa nu uiti sa dai multumesc.

Re: NEW PLUGIN 2010

Posted: 09 Sep 2010, 15:10
by b[L]u
il poti face sa se vada decat ora ?

Re: NEW PLUGIN 2010

Posted: 09 Sep 2010, 15:25
by Ciprian
b[L]u wrote:il poti face sa se vada decat ora ?
Pai exista deja comanda thetime, sau ia pluginul ora.amxx din addon-ul de aici.

Re: NEW PLUGIN 2010

Posted: 09 Nov 2010, 12:00
by ShAym
iReal. wrote:Descriere: Acest plugin arata cat este ceasul si data pe server sub radar, mesajul este format HUD de culoare rosie
Descarcare: Click
Instalare:
1. Fisierul resetscore.sma il puneti in addons/amxmodx/scripting
2. Fisierul resetscore.amxx il puneti in addons/amxmodx/plugins
3. Intrati in fisierul addons/amxmodx/configs/plugins.ini si adaugati urmatoarea linie

Code: Select all

clock_date.amxx
Ce treaba are resetscore cu clock_date? :-?