Veteran Member
Join Date: Aug 2013
Location: Nagazora
|
05-12-2021
, 03:22
Re: amx_tempban
|
#12
|
Quote:
Originally Posted by Stefanos
First of all, you are not giving solution for what i need, my server is in top20 in world, i know what i want and WHY i want it like that, i know what im doing obv. Thanks for trying to "help", and fysiks im gonna test it tonight. thank you
|
Sure, "Everyone have they own reason to do something" so I won't try to reasoning any longer. fysiks plugin probably work.
Quote:
Originally Posted by fysiks
That doesn't even make sense, why would anyone do this? amx_ban does both the banning and the kicking already.
|
I checked the old command page before that post, thought he requested also need [time] which amx_ban was shown doesn't have there. So I think you need to addban then kick.
I double-check on admincmd and it does have [time] already. it was my mistake.
Spoiler
PHP Code:
#include <amxmodx> #include <amxmisc>
#define PLUGIN "Quick 15 ban?" #define VERSION "1.0" #define AUTHOR "?"
public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR)
register_concmd("amx_tempban", "cmdBan", ADMIN_BAN, "<name or #userid> [reason]") register_concmd("amx_tempbanip", "cmdBanIP", ADMIN_BAN, "<name or #userid> [reason]") }
public cmdBan(id, level, cid) { if (!cmd_access(id, level, cid, 3)) return PLUGIN_HANDLED
new target[32], reason[64], name[32] read_argv(1, target, 31) read_argv(2, reason, 63)
new player = cmd_target(id, target, CMDTARGET_OBEY_IMMUNITY | CMDTARGET_NO_BOTS | CMDTARGET_ALLOW_SELF) if (!player) return PLUGIN_HANDLED
get_user_name(player, name, 31)
new buffer[64]; formatex(buffer, charsmax(buffer), "^"%s^" 15 ^"%s^"", target, reason) server_cmd("amx_ban", buffer) return PLUGIN_HANDLED }
public cmdBanIP(id, level, cid) { if (!cmd_access(id, level, cid, 3)) return PLUGIN_HANDLED
new target[32], reason[64], name[32] read_argv(1, target, 31) read_argv(2, reason, 63)
new player = cmd_target(id, target, CMDTARGET_OBEY_IMMUNITY | CMDTARGET_NO_BOTS | CMDTARGET_ALLOW_SELF) if (!player) return PLUGIN_HANDLED
get_user_name(player, name, 31)
new buffer[64]; formatex(buffer, charsmax(buffer), "^"%s^" 15 ^"%s^"", name, reason) server_cmd("amx_banip", buffer) return PLUGIN_HANDLED }
__________________
Last edited by Celena Luna; 05-12-2021 at 03:53.
|
|