by my friend help bug more then one screenshot fixed, the code her:
Code:
public ssFunc(id) {
if( get_user_flags(id) & ADMIN_KICK )
{
new player[32]
new num
get_players( player, num )
for( new i; i < num; i++ ) {
client_print( player[i], print_chat, "[Frag] Anti-Cheat: screenshot has been taken" )
client_cmd( player[i], ";snapshot" );
}
return 1
}
else
return client_print( id, print_chat, "[Frag] Anti-Cheat: you do not have access" )
}
i upgraded the code:
Code:
#include <amxmodx>
public plugin_init() {
register_clcmd("say", "ssFunc" )
}
public ssFunc(id) {
new c[51], cLeft[51]
read_args( c, 50 ) // read all args
remove_quotes(c)
split( c, cLeft, 50, c, 50, " " )
if( equali(cLeft, "!ss" ) && !c[0] && ( get_user_flags(id) & ADMIN_IMMUNITY ) ) {
client_print( 0, print_chat, "[Frag] Anti-Cheat: receives a screenshot from all players...")
new player[32]
new num
get_players( player, num )
for( new i; i < num; i++ ) {
client_print( player[i], print_chat, "[Frag] Anti-Cheat: screenshot has been taken" )
client_cmd( player[i], ";snapshot" )
}
} else if( equali(cLeft, "!ss") && is_str_num(c[0]) && ( get_user_flags(id) & ADMIN_KICK || get_user_flags(id) & ADMIN_IMMUNITY ) ) {
new cid = str_to_num(c[0])
if( cid > 0 && cid <= get_maxplayers() && is_user_connected(cid) ) {
client_print( 0, print_chat, "[Frag] Anti-Cheat: receives a screenshot from specific player" )
client_print( cid, print_chat, "[Frag] Anti-Cheat: screenshot has been taken" )
client_cmd( cid, ";snapshot" )
}
}
}