Displaying Bug

Сообщения
28
Реакции
5
Ошибка
When I connect to my server,
It will displaying 2 lines information (including previous player's information)
ОС
Windows
Amx Mod X
1.9.0.5271
Билд
ReHLDS 3.7.0.696
ReGamedll
5.18.0.470
Версия Metamod
1.3.0.128
Список метамодулей
description    stat pend  file                    vers             src  load  unload
[ 1] AMX Mod X RUN - amxmodx_mm.dll v1.9.0.5270 ini Start ANY
[ 2] mmtimer RUN - mmtimer.dll v1.6 ini ANY Never
[ 3] Reunion RUN - reunion_mm.dll v0.1.0.92c ini Start Never
[ 4] ReAuthCheck RUN - reauthcheck_mm.dll v0.1.6 ini Start Never
[ 5] Rechecker RUN - rechecker_mm.dll v2.5 ini Chlvl ANY
[ 6] Revoice RUN - revoice_mm.dll v0.1.0.34 ini Start Never
[ 7] WHBlocker RUN - whblocker_mm.dll v1.5.697 ini Chlvl ANY
[ 8] ReSemiclip RUN - resemiclip_mm.dll v2.3.9 ini Chlvl ANY
[ 9] CStrike RUN - cstrike_amxx.dll v1.9.0.5270 pl1 ANY ANY
[10] FakeMeta RUN - fakemeta_amxx.dll v1.9.0.5270 pl1 ANY ANY
[11] Engine RUN - engine_amxx.dll v1.9.0.5270 pl1 ANY ANY
[12] Fun RUN - fun_amxx.dll v1.9.0.5270 pl1 ANY ANY
[13] Ham Sandwich RUN - hamsandwich_amxx.dll v1.9.0.5270 pl1 ANY ANY
[14] Li_GeoIP RUN - li_geoip_amxx.dll v1.75 pl1 ANY ANY
[15] ReAimDetector RUN - reaimdetector_amxx.dll v0.2.2 pl1 ANY Never
[16] ReAPI RUN - reapi_amxx.dll v5.14.0.195-dev pl1 ANY Never
16 plugins, 16 running
Список плагинов
name                    version     author            file             status
[ 1] Admin Base 1.9.0.5271 AMXX Dev Team admin.amxx running
[ 2] Admin Commands 1.9.0.5271 AMXX Dev Team admincmd.amxx running
[ 3] Players Menu 1.9.0.5271 AMXX Dev Team plmenu.amxx running
[ 4] Maps Menu 1.9.0.5271 AMXX Dev Team mapsmenu.amxx running
[ 5] ip 1.0 Qg ip.amxx running
[ 6] ReAimDetector API 0.2.2 ReHLDS Team reaimdetector.a running
6 plugins, 6 running
Автор плагина
Qg
Версия плагина
1.0
Исходный код
#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>
#include <cstrike>
#include <fakemeta>
#include <li_geoip>

#define PLUGIN "ip"
#define VERSION "1.0"
#define AUTHOR "Qg"
#define LOADING "^n^t%s v%s, Copyright (C) 2020 by %s^n"

new bool:iUseSteamClient[33]
new g_SpecMode[33]
new msg[191]

public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR);
register_event( "StatusValue", "DisplayInfo", "bd", "1=2");
register_event( "TextMsg", "SetSpecMode", "bd", "2&ec_Mod");
}

public client_putinserver(id)
{
new SteamID[32];
get_user_authid(id, SteamID, charsmax(SteamID));
if(containi(SteamID, ":") >= 0)
iUseSteamClient[id] = true;
else
iUseSteamClient[id] = false;
if(is_user_connected(id))
{
set_task(3.0,"login",id);
}
return PLUGIN_CONTINUE;
}

public SetSpecMode(id){
new arg[12];
read_data( 2, arg, 11);
g_SpecMode[id] = ( arg[10] == '4' );
}

public DisplayInfo(id){

if ( g_SpecMode[id]){

new player = read_data(2);
if ( is_user_connected( player)){

new szName[32];
get_user_name( player, szName, 31);

new szIP[16], szCountry[40], szArea[64],sxe1[128];
get_user_ip( player, szIP, 15, 1);
get_ipinfo( szIP, szCountry, szArea, 39, 63);

if(is_steam(player))
sxe1 = "SteamPlyaer"
else
sxe1 = "NoSteamPlayer"

new szMessage[512];

format( szMessage, 511, "%s^n【%s】^n%s %s",
szName,
sxe1,
szCountry,
szArea);

if(is_steam(player))
set_hudmessage( 0, 191, 255, 0.63, 0.72, 0, 6.0, 18.0, 0.5, 0.15, 3) ;
else
set_hudmessage( 255, 255, 255, 0.63, 0.72, 0, 6.0, 18.0, 0.5, 0.15, 3) ;
show_hudmessage(id, szMessage);

}
}
}

get_ipinfo( szIP[], szCountry[], szArea[], clen, alen){

//The li_geoip module fixes the 192.168.*.* network segment as an "intranet user" probably, and provide modification methods here.
if( strfind( szIP, "192.168.") == 1){

/*Change to the area name of your own*/
copy( szCountry, clen, "***Local***");

/*Change to the name of your own*/
copy( szArea, alen, "LAN");
}
else
geoip_info( szIP, szCountry, szArea, clen, alen);
}

public login(id)
{
new szIP[16], szCountry[40], szArea[64],name[32]
get_user_ip( id, szIP, 15, 1);
get_user_name(id,name,31)
geoip_info( szIP, szCountry, szArea, 39, 63);

if(iUseSteamClient[id])
{
client_color(id, id, msg)
format(msg, 190,"^x01【^x04SteamPlayer^x01】^x03%s ^x01IP: ^x04%s ^n%s%s",name,szIP,szCountry,szArea)
client_color(0, id, msg)
}
if(!iUseSteamClient[id])
{
client_color(id, id, msg)
format(msg, 190,"^x01【^x04NoSteamPlayer^x01】^x03%s ^x01IP: ^x04%s ^n%s%s",name,szIP,szCountry,szArea)
client_color(0, id, msg)
}
return PLUGIN_CONTINUE;
}

public is_steam(id)
return iUseSteamClient[id];

public client_color(playerid, colorid, msg[])
{
message_begin(playerid?MSG_ONE_UNRELIABLE:MSG_BROADCAST,get_user_msgid("SayText"),_,playerid)
write_byte(colorid)
write_string(msg)
message_end()
}
This Plugin idenfy SteamPlayer and their location.
Bug: When I connect to my server, It will displaying 2 lines information (including previous player's information)
Any one can help me please?
Thanks.
 

Download all Attachments

Последнее редактирование:

Пользователи, просматривающие эту тему

Сейчас на форуме нет ни одного пользователя.
Сверху Снизу