Can someone add a function to check if any of admins are online & th last time /calladmin has been used at least 10 minutes ago! And if I can get player who called name in the link.
PHP Code:
#include <amxmodx>
#include <amxmisc>
public plugin_init()
{
register_plugin("Call admin", "0.1", "Lawnmoverman")
register_concmd("say /calladmin","cmdCallAdmin", 0, " - Will call call admin to join the server, if he is not sleeping.")
}
public cmdCallAdmin(id)
{
if ((!admin_is_online) && (passed_at_least_10_minutes)) { // Something like this
show_motd(id, "http://www.nozgaming.eu/calladmin.php?name=PLAYER_NAME_HERE") // <--
return PLUGIN_HANDLED
}
else {
client_print(id, print_chat, "There are admins online, or someone has already called an admin. Do not abuse!")
return PLUGIN_HANDLED
}
}