AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Help with Code (https://forums.alliedmods.net/showthread.php?t=229975)

Snitch 11-17-2013 19:11

Help with Code
 
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 floatclampget_pcvar_nummp_roundtime ), 1) ) * 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_hudmessage085255, -1.00.1013.06.0 );
    
show_hudmessage0"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")) > )
        
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



fysiks 11-18-2013 00:11

Re: Help with Code
 
Have you asked your "best friend"?

ConnorMcLeod 11-18-2013 00:24

Re: Help with Code
 
Your title is against forum rules, please edit it before you post again.

Also, please take some times to read rules : https://forums.alliedmods.net/misc.php?do=showrules

Thanks.

Snitch 11-18-2013 01:06

Re: Help with Code
 
i saw the rules, and i asked the friend.

that just not working, can someone fix it for me?


All times are GMT -4. The time now is 23:18.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.