I like to tell when connect , player,vip,owner with flag normaly player default,vip with kick acess and owner with rcon acces
P.S [Connect Info] Player nick connect in server from [country][city]
P.S [Connect Info] V.I.P nick connect in server from [country][city]
P.S [Connect Info] Owner nick connect in server from [country][city]
Код за потвърждение: Избери целия код
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <geoip>
//YOUR SERVER PREFIX HERE
#define PREFIX "DeathMatch Konektimi"
#define DP_AUTH_NONE 0
#define DP_AUTH_DPROTO 1
#define DP_AUTH_STEAM 2
#define DP_AUTH_STEAMEMU 3
#define DP_AUTH_REVEMU 4
#define DP_AUTH_OLDREVEMU 5
#define DP_AUTH_HLTV 6
#define DP_AUTH_SC2009 7
#define DP_AUTH_AVSMP 8
#define DP_AUTH_SXEI 9
#define DP_AUTH_REVEMU2013 10
#define DP_AUTH_SSE3 11
new g_iMsgSayText;
new connect;
new pcv_dp_r_protocol
new pcv_dp_r_id_provider
public plugin_init() {
register_plugin("Connect, "1.0", "aNoool");
// ColorChat
g_iMsgSayText = get_user_msgid("SayText");
// Enable and disable cvars
connect = register_cvar("amx_connect_message", "1");
pcv_dp_r_protocol = get_cvar_pointer ("dp_r_protocol")
pcv_dp_r_id_provider = get_cvar_pointer ("dp_r_id_provider")
}
public client_putinserver(id){
if(get_pcvar_num(connect) == 0)
return PLUGIN_HANDLED
set_task(2.0,"ShowMsg",id);
return PLUGIN_HANDLED
}
public client_disconnect(id)
{
if(task_exists(id))
remove_task(id);
}
public ShowMsg(id)
{
if(!is_user_connected(id))
return PLUGIN_HANDLED
static name[32];
static ip[16];
static country[45];
static city[45];
static region[45]
// DPROTO
server_cmd("dp_clientinfo %d", id)
server_exec()
new proto = get_pcvar_num(pcv_dp_r_protocol)
new authprov = get_pcvar_num(pcv_dp_r_id_provider)
new auth_prov_str[32]
switch (authprov)
{
case DP_AUTH_NONE: copy(auth_prov_str, 32, "N/A") //slot is free
case DP_AUTH_DPROTO: copy(auth_prov_str, 32, "Non-Steam")
case DP_AUTH_STEAM: copy(auth_prov_str, 32, "Steam")
case DP_AUTH_STEAMEMU: copy(auth_prov_str, 32, "Non-Steam")
case DP_AUTH_REVEMU: copy(auth_prov_str, 32, "Non-Steam")
case DP_AUTH_OLDREVEMU: copy(auth_prov_str, 32, "Non-Steam")
case DP_AUTH_HLTV: copy(auth_prov_str, 32, "HLTV")
case DP_AUTH_SC2009: copy(auth_prov_str, 32, "Non-Steam")
case DP_AUTH_AVSMP: copy(auth_prov_str, 32, "Non-Steam")
case DP_AUTH_SXEI: copy(auth_prov_str, 32, "Non-Steam")
case DP_AUTH_REVEMU2013: copy(auth_prov_str, 32, "Non-Steam")
case DP_AUTH_SSE3: copy(auth_prov_str, 32, "Non-Steam")
default: copy(auth_prov_str, 32, "Erroneous") //-1 if slot id is invalid
}
get_user_name(id, name, charsmax(name));
get_user_ip(id, ip, charsmax(ip), 1);
geoip_country(ip, country, charsmax(country));
geoip_city(ip, city, charsmax(city));
geoip_region_name(ip,region,sizeof region,id)
if(equal(city,"") || equali(city,"error") )
{
ChatColor(0, "!n[!g%s!n] Lojtari !g%s!n hyri nga !g%s!g",PREFIX , name, country);
}
else if(equal(region,""))
{
ChatColor(0, "!n[!g%s!n] Lojtari !g%s!n hyri nga !g%s!g, !t%s",PREFIX , name, country, city);
}
else
{
ChatColor(0, "!n[!g%s!n] Lojtari !g%s!n hyri nga [!g%s!n]!g, !n[!g%s!n]!g, !n[!g%s!n]",PREFIX, name, country, region, city);
}
return PLUGIN_HANDLED
}
// ColorChat
stock ChatColor(const id, const input[], any:...)
{
new count = 1, players[32]
static msg[191]
vformat(msg, 190, input, 3)
replace_all(msg, 190, "!g", "^4") // Green Color
replace_all(msg, 190, "!n", "^1") // Default Color
replace_all(msg, 190, "!t", "^3") // Team Color
if (id) players[0] = id; else get_players(players, count, "ch")
{
for (new i = 0; i < count; i++)
{
if (is_user_connected(players[i]))
{
message_begin(MSG_ONE_UNRELIABLE, g_iMsgSayText, _, players[i])
write_byte(players[i]);
write_string(msg);
message_end();
}
}
}
}