Is there any way to
#1

Is there anyway to see if the RCON connection was successfull or not.. using: https://sampwiki.blast.hk/wiki/Query_Mechanism/Csharp ?
Dunno if right section for this :P
Reply
#2

Bump ^^
Reply
#3

...

pawn Код:
public OnRconLoginAttempt(ip[], password[], success)
{
    return 1;
}
By the way, the rules have changed. You now need to wait 48 hours before bumping your thread!
Reply
#4

yea.. why do shit ?

just use if(!success)

and look on wiki for more examples
Reply
#5

Never used sockets in C# before, but I assume you can detect failure in the contructor of the RCONQuery and Query classes, when the application throws a SocketException:

PHP код:
public RCONQuery(string IPint portstring password)
{
    
qSocket = new Socket(AddressFamily.InterNetworkSocketType.DgramProtocolType.Udp);
    
qSocket.SendTimeout 5000;
    
qSocket.ReceiveTimeout 5000;
    try
    {
        
//Successful connect, we've resolved the address to a host.
        
address Dns.GetHostAddresses(IP)[0];
    }
    catch
    {
        
/* 
            There was an exception with resolving the address,
            therefore it didn't connect properly and there was an error.
        */
        //...
    
}
    
_port port;
    
_password password;

Either that, or check up on Socket.Connected.
Reply
#6

This is for C# not PAWN, which is why i was unsure about the section

@blewert, thanks i'll try.

And woops didnt know about the 48 hour rule now
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)