Modificare plugin bomb plant 90 secunde

Categoria cu cereri de pluginuri si nu numai.

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Forum rules
Accesează link-ul pentru a putea vedea regulile forumului

Daca doriti sa vi se modifice un plugin, va rugam postati aici .
Post Reply
User avatar
lazlo1234
Membru, skill +1
Membru, skill +1
Posts: 390
Joined: 10 Jul 2012, 00:08
Detinator Steam: Da
CS Status: MISCA MISCA DIN BURIC
Detinator server CS: DA
SteamID: nu am
Location: localhost
Has thanked: 114 times
Been thanked: 7 times
Contact:

10 Dec 2012, 12:37

imi puteti modifica si mie acest plugin
| Afiseaza codul
#include <amxmodx> 
#include <hamsandwich> 
#include <fakemeta> 

#define PLUGIN                 "Bomb Time Set" 
#define VERSION             "1.0" 
#define AUTHOR                 "eXtreamCS.Com" 

#define TASK_CANPLANT            10001 

new bool: g_bCanPlant; 

public plugin_init()  
{ 
    register_plugin( PLUGIN, VERSION, AUTHOR ); 
     
    register_event( "HLTV", "ev_RoundStart", "a", "1=0", "2=0" ); 
    register_event( "TextMsg", "ev_BombMsg", "b", "2=#C4_Plant_At_Bomb_Spot" ); 
     
    RegisterHam( Ham_Weapon_PrimaryAttack, "weapon_c4", "ham_PrimaryAttack_C4" ); 
} 

public ev_RoundStart() 
{ 
    g_bCanPlant = false; 
    remove_task( TASK_CANPLANT ); 
     
    new Float: flTime = get_cvar_num( "mp_freezetime" ) + ( get_cvar_num( "mp_roundtime" ) * 60 ) - 90.0; 
    set_task( flTime, "task_CanPlant", TASK_CANPLANT ); 
} 

public ham_PrimaryAttack_C4( iEnt ) 
{ 
    new id = pev( iEnt, pev_owner ); 
     
    if( !g_bCanPlant ) 
    { 
        client_print( id, print_center, "Nu poti planta bomba decat in ultimele 90 secunde!" ); 
        return HAM_SUPERCEDE; 
    } 
     
    return HAM_IGNORED; 
} 

public ev_BombMsg( id ) 
{ 
    if( !g_bCanPlant ) 
    client_print( id, print_center, "" ); 
} 

public task_CanPlant() 
{ 
    g_bCanPlant = true; 
     
    set_hudmessage( 255, 0, 0, -1.0, 0.35, 1, 0.01, 3.0, 1.0, 1.0 ); 
     
    new iNum, iPlayers[ 32 ]; 
    get_players( iPlayers, iNum, "ae", "TERRORIST" ); 
     
    for( new i ; i < iNum ; i ++ ) 
        show_hudmessage( iPlayers[ i ], "Mai sunt 90 secunde, Bomba poate fi acum plantata!" ); 
}
vreau ca primu mesaj acela cu nu poti planta bomba decat in ultimele 90 secunde vreau sa apara mesaju colorat cu rosu si mai mare ca cel de al doilea mesaj , si sa stea timp de 5 secunde afisat mesajul si la primu si la al 2-lea . Multumesc
RoyalServer
User avatar
DuhuLeTzu ;x
Membru, skill +2
Membru, skill +2
Posts: 649
Joined: 20 Oct 2012, 02:32
Detinator Steam: Da
Detinator server CS: DR.PLAYCS.RO
Has thanked: 5 times
Been thanked: 100 times

10 Dec 2012, 13:08

Code: Select all

#include <amxmodx> 
#include <hamsandwich> 
#include <fakemeta> 

#define PLUGIN                 "Bomb Time Set" 
#define VERSION             "1.0" 
#define AUTHOR                 "eXtreamCS.Com" 

#define TASK_CANPLANT            10001 

new bool: g_bCanPlant; 

public plugin_init()  
{ 
    register_plugin( PLUGIN, VERSION, AUTHOR ); 
     
    register_event( "HLTV", "ev_RoundStart", "a", "1=0", "2=0" ); 
    register_event( "TextMsg", "ev_BombMsg", "b", "2=#C4_Plant_At_Bomb_Spot" ); 
     
    RegisterHam( Ham_Weapon_PrimaryAttack, "weapon_c4", "ham_PrimaryAttack_C4" ); 
} 

public ev_RoundStart() 
{ 
    g_bCanPlant = false; 
    remove_task( TASK_CANPLANT ); 
     
    new Float: flTime = get_cvar_num( "mp_freezetime" ) + ( get_cvar_num( "mp_roundtime" ) * 60 ) - 90.0; 
    set_task( flTime, "task_CanPlant", TASK_CANPLANT ); 
} 

public ham_PrimaryAttack_C4( iEnt ) 
{ 
    new id = pev( iEnt, pev_owner ); 
     
    if( !g_bCanPlant ) 
    { 
        client_print( id, print_center, "Nu poti planta bomba decat in ultimele 90 secunde!" ); 
        return HAM_SUPERCEDE; 
    } 
     
    return HAM_IGNORED; 
} 

public ev_BombMsg( id ) 
{ 
    if( !g_bCanPlant ) 
    client_print( id, print_center, "" ); 
} 

public task_CanPlant() 
{ 
    g_bCanPlant = true; 
     
    set_hudmessage( 255, 0, 0, -1.0, 0.35, 1, 0.01, 3.0, 1.0, 5.0 ); 
     
    new iNum, iPlayers[ 32 ]; 
    get_players( iPlayers, iNum, "ae", "TERRORIST" ); 
     
    for( new i ; i < iNum ; i ++ ) 
        show_hudmessage( iPlayers[ i ], "Mai sunt 90 secunde, Bomba poate fi acum plantata!" ); 
}


Mesajele care apar in centrul ecranului nu poti fi colorate, numai cele HUD pot fi ;)
Image
Image
User avatar
lazlo1234
Membru, skill +1
Membru, skill +1
Posts: 390
Joined: 10 Jul 2012, 00:08
Detinator Steam: Da
CS Status: MISCA MISCA DIN BURIC
Detinator server CS: DA
SteamID: nu am
Location: localhost
Has thanked: 114 times
Been thanked: 7 times
Contact:

10 Dec 2012, 14:40

da vreau sa fie in hud si primu ..culoarea rosie ca al 2-lea sa apara si mai mare sa apara exact cum e al 2-lea numai ca mesaju atata sa fie schimbat m-am expirimat eu gresit inainte
User avatar
DuhuLeTzu ;x
Membru, skill +2
Membru, skill +2
Posts: 649
Joined: 20 Oct 2012, 02:32
Detinator Steam: Da
Detinator server CS: DR.PLAYCS.RO
Has thanked: 5 times
Been thanked: 100 times

10 Dec 2012, 15:54

Code: Select all

#include <amxmodx> 
#include <hamsandwich> 
#include <fakemeta> 

#define PLUGIN                 "Bomb Time Set" 
#define VERSION             "1.0" 
#define AUTHOR                 "eXtreamCS.Com" 

#define TASK_CANPLANT            10001 

new bool: g_bCanPlant; 

public plugin_init()  
{ 
    register_plugin( PLUGIN, VERSION, AUTHOR ); 
     
    register_event( "HLTV", "ev_RoundStart", "a", "1=0", "2=0" ); 
    register_event( "TextMsg", "ev_BombMsg", "b", "2=#C4_Plant_At_Bomb_Spot" ); 
     
    RegisterHam( Ham_Weapon_PrimaryAttack, "weapon_c4", "ham_PrimaryAttack_C4" ); 
} 

public ev_RoundStart() 
{ 
    g_bCanPlant = false; 
    remove_task( TASK_CANPLANT ); 
     
    new Float: flTime = get_cvar_num( "mp_freezetime" ) + ( get_cvar_num( "mp_roundtime" ) * 60 ) - 90.0; 
    set_task( flTime, "task_CanPlant", TASK_CANPLANT ); 
} 

public ham_PrimaryAttack_C4( iEnt ) 
{ 
    new id = pev( iEnt, pev_owner ); 
     
    if( !g_bCanPlant ) 
    { 
        set_hudmessage(255, 0, 0, -1.0, -1.0, 0, 6.0, 5.0)
	    show_hudmessage(id, "Bomba poate fi plantant doar in ultimile 90 de secunde") 
        return HAM_SUPERCEDE; 
    } 
     
    return HAM_IGNORED; 
} 

public ev_BombMsg( id ) 
{ 
    if( !g_bCanPlant ) 
    client_print( id, print_center, "" ); 
} 

public task_CanPlant() 
{ 
    g_bCanPlant = true; 
     
    set_hudmessage( 255, 0, 0, -1.0, 0.35, 1, 0.01, 3.0, 1.0, 1.0 ); 
     
    new iNum, iPlayers[ 32 ]; 
    get_players( iPlayers, iNum, "ae", "TERRORIST" ); 
     
    for( new i ; i < iNum ; i ++ ) 
        show_hudmessage( iPlayers[ i ], "Mai sunt 90 secunde, Bomba poate fi acum plantata!" ); 
}
Image
Image
User avatar
lazlo1234
Membru, skill +1
Membru, skill +1
Posts: 390
Joined: 10 Jul 2012, 00:08
Detinator Steam: Da
CS Status: MISCA MISCA DIN BURIC
Detinator server CS: DA
SteamID: nu am
Location: localhost
Has thanked: 114 times
Been thanked: 7 times
Contact:

10 Dec 2012, 17:19

ms merge
Post Reply

Return to “Cereri”

  • Information