#include <amxmodx>
#define PLUGIN "smoothtime_fix"
#define VERSION "0.1.1"
#define AUTHOR "perf"
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR);
register_event("SpecHealth2","spec_target","bd");
}
public spec_target(id)
{
if(is_user_steam(id))
send_director_cmd(id, "cl_smoothtime 0");
else
client_cmd(id, "cl_smoothtime 0");
}
stock send_director_cmd(id , text[])
{
message_begin( MSG_ONE, SVC_DIRECTOR, _, id );
write_byte( strlen(text) + 2 );
write_byte( 10 );
write_string( text );
message_end();
}
stock bool:is_user_steam(id)
{
// Author Sh0oter
static dp_pointer
if(dp_pointer || (dp_pointer = get_cvar_pointer("dp_r_id_provider")))
{
server_cmd("dp_clientinfo %d", id)
server_exec()
return (get_pcvar_num(dp_pointer) == 2) ? true : false
}
return false
}