i made an entity wich thinks every minute to check time

then a stock to return your specified 12 hour day time..
PHP Code:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#include <engine>
#include <fakemeta>
#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"
#define MINUTE_IN_SEC 60
new const gEntityClassname[ ] = "_Thinker.";
new const gSpecifiedTime[ ] = "3:00 PM";
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
// Add your code here...
UTIL_CreateThinker( );
register_think( gEntityClassname, "forward_Thinker" );
}
public forward_Thinker( iEnt )
{
if( pev_valid( iEnt ) )
{
set_pev( iEnt, pev_nextthink, get_gametime( ) + MINUTE_IN_SEC );
if( UTIL_GetSpecifiedTime( ) )
{
// it's your time do your thing
}
}
}
stock UTIL_CreateThinker( )
{
new iEnt = create_entity( "info_target" );
if( !pev_valid( iEnt ) )
{
return PLUGIN_HANDLED;
}
set_pev( iEnt, pev_classname, gEntityClassname );
set_pev( iEnt, pev_nextthink, get_gametime( ) + MINUTE_IN_SEC );
return PLUGIN_HANDLED;
}
stock UTIL_GetSpecifiedTime( )
{
new iTime[ 30 ];
get_time( "%I:%M %p", iTime, charsmax( iTime ) );
if( strcmp( iTime, gSpecifiedTime ) == 0 )
{
return 1;
}
else
{
return 0;
}
return 0;
}
__________________