|
Senior Member
Join Date: Feb 2019
Location: Iran
|
02-18-2020
, 08:48
Re: Warning to the player
|
#7
|
Quote:
Originally Posted by Napoleon_be
Untested
PHP Code:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#define PLUGIN "Warn System"
#define VERSION "1.0"
#define AUTHOR "NapoleoN#"
new const szWords[][] =
{
"Black",
"White",
"Green",
"Brown"
};
new iWarned[33];
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR);
register_clcmd("say", "HandleSay");
}
public client_disconnect(id)
{
iWarned[id] = 0;
}
public HandleSay(id)
{
new szArg[20];
read_args(szArg, charsmax(szArg))
for(new i; i < sizeof(szWords); i++)
{
if(containi(szArg, szWords[i]))
{
client_print(id, print_chat, "You have been warned for saying the word: %s", szWords[i]);
iWarned[id]++;
break;
}
}
if(iWarned[id] == 3)
{
new szAuthid[35];
get_user_authid(id, szAuthid, charsmax(szAuthid));
server_cmd("kick #%d", szAuthid);
}
}
|
That was exactly what I wanted
Thanks big man
|
|
|
|