⭐🚀 TkyNET | Blacklist ve Profesyonel DDoS Korumalı TeamSpeak 3 Sunucuları 🚀⭐
Sponsor Görsel
⭐ Buraya kendi metin reklamınızı vererek binlerce kişiye ulaşın! ⭐
Sponsor Görsel 2
SponsorSponsor

Zeyphrus Store &Amp; Connection Logs Plugin Warning Hataları

Zeyphrus Store & Connection Logs plugin Warning hataları
Merhaba,
Sourcemod 1.10 son sürümünü kullanıyorum. Zeyphrus Store 1.1 ve Connection Logs pluginlerini compile ederken warning hatası alıyorum.
Aldığım warning görüntüleri: https://ibb.co/cDGtpK3
Log connections eklentisini eke koydum. Zeyphrus store 1.1 pluginide aratınca direkt çıkıyor.
Çözebilecek olan varsa çok memnun olurum.
RE: Zeyphrus Store & Connection Logs plugin Warning hataları
Eke dosya gelmemiş, ek dosyayı yükle butonunuza basmadınız sanırım yoruma dosyayı iletirmisiniz.
MawiŞ*
RE: Zeyphrus Store & Connection Logs plugin Warning hataları
Yada kendiniz çözmek istiyorsanız üstteki bölüm için GetClientAuthString komutu yerine GetClientAuthId komutunu kullanın
RE: Zeyphrus Store & Connection Logs plugin Warning hataları
@ITenGriTR Kendim çözmeye çalıştım ancak yapamadım.
RE: Zeyphrus Store & Connection Logs plugin Warning hataları
dene bakalım
PHP Kod:
#include <sourcemod>
#include <geoip>

#define PLUGIN_VERSION "1.1"
#define PLUGIN_NAME "Log Connections"

public Plugin:myinfo =
{
    
name = PLUGIN_NAME,
    
author = "Xander (Player 1)",
    
description = "This plugin logs players' connect and disconnect times along with their Name, SteamID, and IP Address to a text file at /sourcemod/logs/connections/ seperate from the server logs.",
    
version = PLUGIN_VERSION,
    
url = "https://forums.alliedmods.net/showthread.php?p=1845362"
}

new 
String:g_sFilePath[PLATFORM_MAX_PATH];

public 
OnPluginStart()
{
    
BuildPath(Path_SM, g_sFilePath, sizeof(g_sFilePath), "logs/connections/");
    
    if (!
DirExists(g_sFilePath))
    {
        
CreateDirectory(g_sFilePath, 511);
        
        if (!
DirExists(g_sFilePath))
            
SetFailState("Failed to create directory at /sourcemod/logs/connections - Please manually create that path and reload this plugin.");
    }
    
    
CreateConVar("sm_log_connections_version", PLUGIN_VERSION, PLUGIN_NAME, FCVAR_NOTIFY);
    
    
HookEvent("player_connect", Event_PlayerConnect, EventHookMode_Post);
    
HookEvent("player_disconnect", Event_PlayerDisconnect, EventHookMode_Pre);
}

public 
OnMapStart()
{
    
decl String:FormatedTime[100],
        
String:MapName[100];
        
    new 
CurrentTime = GetTime();
    
    
GetCurrentMap(MapName, 100);
    
FormatTime(FormatedTime, 100, "%d_%b_%Y", CurrentTime); //name the file 'day month year'
    
    
BuildPath(Path_SM, g_sFilePath, sizeof(g_sFilePath), "/logs/connections/%s.txt", FormatedTime);
    
    new 
Handle:FileHandle = OpenFile(g_sFilePath, "a+");
    
    
FormatTime(FormatedTime, 100, "%X", CurrentTime);
    
    
WriteFileLine(FileHandle, "");
    
WriteFileLine(FileHandle, "%s - ===== Map change to %s =====", FormatedTime, MapName);
    
WriteFileLine(FileHandle, "");
    
    
CloseHandle(FileHandle);
}
        
public 
Action:Event_PlayerConnect(Handle:event, const String:name[], bool:dontBroadcast)
{
    
CreateTimer(5.0, LogConnectionInfo, GetEventInt(event, "userid"));
}

public 
Action:LogConnectionInfo(Handle:timer, any:UserID)
{
    new 
client = GetClientOfUserId(UserID); //will return 0 if the client quits, even if a new player takes his slot
    
    
if (!client)
    {}
    
    else if (
IsFakeClient(client))
    {}
    
    else if (!
IsClientAuthorized(client))
        
CreateTimer(5.0, LogConnectionInfo, UserID);    //client's steamid isn't known yet; retry in 5 seconds
    
    
else
    {
        
decl String:PlayerName[64],
            
String:Authid[64],
            
String:IPAddress[64],
            
String:Country[64],
            
String:FormatedTime[64];
        
        
GetClientName(client, PlayerName, 64);
                
GetClientAuthId(client, AuthId_Steam2, Authid, 64);
        
GetClientIP(client, IPAddress, 64);
        
FormatTime(FormatedTime, 64, "%X", GetTime())
        
        if(!
GeoipCountry(IPAddress, Country, 64))
            
Format(Country, 64, "Unknown");
        
        new 
Handle:FileHandle = OpenFile(g_sFilePath, "a+");
        
        
WriteFileLine(FileHandle, "%s - <%s> <%s> <%s> CONNECTED from <%s>",
                                
FormatedTime,
                                
PlayerName,
                                
Authid,
                                
IPAddress,
                                
Country);

        
CloseHandle(FileHandle);
    }
}

public 
Action:Event_PlayerDisconnect(Handle:event, const String:name[], bool:dontBroadcast)
{
    new 
client = GetClientOfUserId(GetEventInt(event, "userid"));
    
    if (!
client)
    {}
    
    else if (
IsFakeClient(client))
    {}
    
    else
    {
        new 
ConnectionTime = -1,
            
Handle:FileHandle = OpenFile(g_sFilePath, "a+");
        
        
decl String:PlayerName[64],
            
String:Authid[64],
            
String:IPAddress[64],
            
String:FormatedTime[64],
            
String:Reason[128];
        
        
GetClientName(client, PlayerName, 64);
        
GetClientIP(client, IPAddress, 64);
        
FormatTime(FormatedTime, 64, "%X", GetTime());
        
GetEventString(event, "reason", Reason, 128);
        
        if (!
GetClientAuthId(client, AuthId_Steam2, Authid, 64))
            
Format(Authid, 64, "Unknown SteamID");
        
        if (
IsClientInGame(client))
            
ConnectionTime = RoundToCeil(GetClientTime(client) / 60);
        
        
        
WriteFileLine(FileHandle, "%s - <%s> <%s> <%s> DISCONNECTED after %d minutes. <%s>",
                                
FormatedTime,
                                
PlayerName,
                                
Authid,
                                
IPAddress,
                                
ConnectionTime,
                                
Reason);
        
        
CloseHandle(FileHandle);
    }
} 
RE: Zeyphrus Store & Connection Logs plugin Warning hataları
86. satır için 

PHP Kod:
GetClientAuthString(client, Authid, 64); 
bu kısmı

PHP Kod:
GetClientAuthId(client, AuthId_Steam2, Authid, 64); 
Bu şekilde yaparsan düzelecektir. Diğer satırıda aynı matıkla çözersin ama yapamazsın düzeltip atarım sana

Store işine gelirsek o store 1.10 ile çalısmıyor 

https://github.com/Kxnrl/Store

bu store Zeyphrus storun bugların düzeltilmiş hali bunu denersen daha sağlıklı olur.Bu arada zyprusun modulleri bu store ile de çalışır sıkıntı etme
Son Düzenleme: 25-07-2020, 16:51, Düzenleyen: Anıl Can
RE: Zeyphrus Store & Connection Logs plugin Warning hataları
@Anıl Can @ITenGriTR teşekkürler logconnections eklentisini şuanda derleyebildim. Zeyphrus store için yardımcı olabilir misiniz ?
RE: Zeyphrus Store & Connection Logs plugin Warning hataları
Az önce güncelledim yorumumu ona bakarsan daha iyi olur
Son Düzenleme: 25-07-2020, 16:55, Düzenleyen: Anıl Can
RE: Zeyphrus Store & Connection Logs plugin Warning hataları
@Anıl Can yukarıdaki attığınız plugini test sunucumda denedim ancak çalıştıramadım. Mysql ile ilgili problemler çıkartıyordu diye hatırlıyorum
RE: Zeyphrus Store & Connection Logs plugin Warning hataları
Bu marketin fixlenmesi için işlerimin bitmesi lazım. Çünkü bugları aşırı fazla. Fakat yakın zamanda öyle bir vaktim yok ben yerel sunucumda direk smx dosyasını kullanıyorum.Ama ileride bu bugları fixleyip paylaşacağım ama yakın bir gelecekte zor.
Son Düzenleme: 25-07-2020, 19:41, Düzenleyen: Anıl Can

Bir hesap oluşturun veya yorum yapmak için giriş yapın

Yorum yapmak için üye olmanız gerekiyor

ya da
Konuyu Okuyanlar: 1 Ziyaretçi