⭐🚀 TkyNET | Blacklist ve Profesyonel DDoS Korumalı TeamSpeak 3 Sunucuları 🚀⭐
Sponsor Görsel
Server ip : 95.173.173.2 || Ts3 : LCAPRO www.lcapro.net
Sponsor Görsel 2
SponsorSponsor

Zeyphrus Store & Connection Logs plugin Warning hataları

Konu

#1
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.
#2
Eke dosya gelmemiş, ek dosyayı yükle butonunuza basmadınız sanırım yoruma dosyayı iletirmisiniz.
MawiŞ*
#3
Yada kendiniz çözmek istiyorsanız üstteki bölüm için GetClientAuthString komutu yerine GetClientAuthId komutunu kullanın
#4
@ITenGriTR Kendim çözmeye çalıştım ancak yapamadım.
#5
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_SMg_sFilePathsizeof(g_sFilePath), "logs/connections/");
    
    if (!
DirExists(g_sFilePath))
    {
        
CreateDirectory(g_sFilePath511);
        
        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_VERSIONPLUGIN_NAMEFCVAR_NOTIFY);
    
    
HookEvent("player_connect"Event_PlayerConnectEventHookMode_Post);
    
HookEvent("player_disconnect"Event_PlayerDisconnectEventHookMode_Pre);
}

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

public 
Action:LogConnectionInfo(Handle:timerany: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.0LogConnectionInfoUserID);    //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(clientPlayerName64);
                
GetClientAuthId(clientAuthId_Steam2Authid64);
        
GetClientIP(clientIPAddress64);
        
FormatTime(FormatedTime64"%X"GetTime())
        
        if(!
GeoipCountry(IPAddressCountry64))
            
Format(Country64"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(clientPlayerName64);
        
GetClientIP(clientIPAddress64);
        
FormatTime(FormatedTime64"%X"GetTime());
        
GetEventString(event"reason"Reason128);
        
        if (!
GetClientAuthId(clientAuthId_Steam2Authid64))
            
Format(Authid64"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);
    }

#6
86. satır için 

PHP Kod:
GetClientAuthString(clientAuthid64); 
bu kısmı

PHP Kod:
GetClientAuthId(clientAuthId_Steam2Authid64); 
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.
#7
@Anıl Can @ITenGriTR teşekkürler logconnections eklentisini şuanda derleyebildim. Zeyphrus store için yardımcı olabilir misiniz ?
#8
Az önce güncelledim yorumumu ona bakarsan daha iyi olur
Son Düzenleme: 25-07-2020, 16:55, Düzenleyen: Anıl Can.
#9
@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
#10
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