#include <amxmodx>
#include <cstrike>
#include <hamsandwich>
#define MSG_MODE // DHUD/HUD
#define SOUND // INFO SOUND
#define MSG "!~ You have the bomb C4 ~!"
#define IsPlayer(%1) (1 <= %1 <= players)
new players;
new const C4_Info_Sound[] = "events/tutor_msg.wav";
public plugin_init(){
register_plugin("C4 Info", "1.0", "SCHOCKKWAVE");
register_event("HLTV", "event_NewRound", "a", "1=0", "2=0")
players = get_maxplayers();
}
public event_NewRound(id) set_task(1.0, "C4_Info", id)
public C4_Info()
{
for(new i = 1; i <= players; i++) {
if( is_user_connected( i ) && cs_get_user_team( i ) == CS_TEAM_T && user_has_weapon(i, CSW_C4) ) {
#if defined MSG_MODE
set_dhudmessage(i, 255, 255, -1.0, -0.70, 0, 6.0, 0.1, 0.01, 1.5 )
show_dhudmessage(i, MSG)
#else
set_hudmessage(i, 255, 255, -1.0, -0.70, 1, 0.0, 4.0, 0.0, 0.0, 1)
show_hudmessage(i, MSG)
#endif
#if defined SOUND
client_cmd(i, "spk %s", C4_Info_Sound)
#endif
}
}
}
#include <amxmodx>
#include <reapi>
#define MSG_MODE // DHUD/HUD
#define SOUND // INFO SOUND
new const g_szInfoMessage[] = "!~ You have the bomb C4 ~!"
#define IsPlayer(%0) (1 <= %0 <= MaxClients)
new const g_szInfoSound[] = "events/tutor_msg.wav"
public plugin_init() {
register_plugin("C4 Info", "2.0 [ReAPI]", "SCHOCKKWAVE & CHEL74")
RegisterHookChain(RG_CBasePlayer_MakeBomber, "MakeBomber_Post", true)
}
public MakeBomber_Post(pPlayer) {
#if defined MSG_MODE
set_dhudmessage(pPlayer, 255, 255, 255, -1.0, -0.70, 0, 6.0, 0.1, 0.01, 1.5)
show_dhudmessage(pPlayer, g_szInfoMessage)
#else
set_hudmessage(pPlayer, 255, 255, 255, -1.0, -0.70, 1, 0.0, 4.0, 0.0, 0.0, -1)
show_hudmessage(pPlayer, g_szInfoMessage)
#endif
#if defined SOUND
rg_send_audio(pPlayer, g_szInfoSound)
#endif
}