Am nevoie sa imi editati un plugin desigur daca doriti . As dori la pluginu de mai jos sa fie atasate sunetele plantbomb,defuzebomb si explodebomb doresc la pluginu pe care vi l-am dat nu doresc alt plugin ! Multumesc Anticipat !
Code: Select all
#include <amxmodx>
#include <csx>
#define PLUGIN "Bomb Countdown HUD Timer"
#define VERSION "0.2"
#define AUTHOR "SAMURAI"
new g_c4timer, pointnum;
new bool:b_planted = false;
new g_msgsync;
new color_R[]=
{
0,
0,
0,
255,
255
}
new color_G[]=
{
0,
255,
255,
170,
0
}
new color_B[]=
{
255,
255,
0,
0,
0
}
new count, start, color = sizeof color_R
public plugin_init()
{
register_plugin(PLUGIN,VERSION,AUTHOR);
pointnum = get_cvar_pointer("mp_c4timer");
register_logevent("newRound", 2, "1=Round_Start");
register_logevent("endRound", 2, "1=Round_End");
register_logevent("endRound", 2, "1&Restart_Round_");
g_msgsync = CreateHudSyncObj();
}
public newRound()
{
g_c4timer = -1;
remove_task(652450);
b_planted = false;
}
public endRound()
{
g_c4timer = -1;
remove_task(652450);
}
public bomb_planted()
{
b_planted = true;
g_c4timer = get_pcvar_num(pointnum);
dispTime()
set_task(1.0, "dispTime", 652450, "", 0, "b");
}
public bomb_defused()
{
if(b_planted)
{
remove_task(652450);
b_planted = false;
}
}
public bomb_explode()
{
if(b_planted)
{
remove_task(652450);
b_planted = false;
}
}
public dispTime()
{
if(!b_planted)
{
remove_task(652450);
return;
}
if(g_c4timer >= 0)
{
set_hudmessage(color_R[count], color_G[count], color_B[count], -1.0, 0.83, 0, 1.0, 1.0, 0.01, 0.01, -1);
count = start
? count - 1
: count + 1
if (!start && count >= color - 1)
{
count = color -1
start = 1
}
else if (start && count <= color - 1)
{
count = 0
start = 0
}
ShowSyncHudMsg(0, g_msgsync, "[STAR] Bomba explodeaza in: %d secunde!", g_c4timer);
--g_c4timer;
}
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1033\\ f0\\ fs16 \n\\ par }
*/