My best friend Gave me Code Auto open cells in 7:00 with song
no warning and plugins running but that not open the cages and not run the mp3
can someone check it?
PHP Code:
#include < amxmodx >
#include < fakemeta >
new Float:g_flRoundStart;
new Float:g_flRoundEnd;
new mp_roundtime;
#define SHIT "sound/4444/fd.mp3"
public plugin_init( ) {
register_logevent( "EventRoundStart", 2, "1=Round_Start" );
register_logevent( "EventRoundEnd", 2, "1=Round_End" );
mp_roundtime = get_cvar_pointer( "mp_roundtime" );
}
public plugin_precache(){
precache_sound(SHIT);
}
public EventRoundStart( ) {
g_flRoundStart = get_gametime( );
g_flRoundEnd = g_flRoundStart + float( clamp( get_pcvar_num( mp_roundtime ), 1, 9 ) ) * 60.0;
set_task(1.0,"aaa",1337,.flags="b");
}
public EventRoundEnd( ) {
g_flRoundEnd = 0.0;
remove_task(1337);
}
public aaa(){
if (GetTimeLeft( ) == 450.0)
{
action_fd( );
remove_task(1337);
}
}
public action_fd(){
set_hudmessage( 0, 85, 255, -1.0, 0.10, 1, 3.0, 6.0 );
show_hudmessage( 0, "Jailbreak - Today is FreeDay"); // how can i add timer to fd? Timeleft: 70 sec?
new ent = -1;
while ((ent == engfunc(EngFunc_FindEntityByString,ent,"classname","func_door")) > 0 )
dllfunc(DLLFunc_Use,ent,0);
client_cmd(0,"mp3 play ^"%s^"",SHIT);
}
stock Float:GetTimeElapsed( ) {
return ( g_flRoundEnd > 0.0 ) ? ( get_gametime( ) - g_flRoundStart ) : -1.0;
}
stock Float:GetTimeLeft( ) {
return ( g_flRoundEnd > 0.0 ) ? ( g_flRoundEnd - get_gametime( ) ) : -1.0;
}