Can't connect to server
#1

Hey..
I have been testing my GM on localhost..
It can't connect,it just says connecting to 127.0.0.1:7777..
Server doesn't accepts connection.
Here is OnPlayer Connect Callback
PHP код:

public OnPlayerConnect(playerid)
{
    if(! 
IsPlayerNPC(playerid))
    {
        new 
string[128], Name[MAX_PLAYER_NAME];
        
GetPlayerName(playeridNamesizeof(Name));
        
format(stringsizeof(string), "Accounts/%s.ini"Name);
        
Reset(playerid);
        
SetPlayerColor(playeridGREY);
        
TotalConnections++;
        
PlayersOn++;
        if(
PlayersOn MaxVisitors)
        {
            
MaxVisitors PlayersOn;
            
UpdateAnalysis();
        }
        
TextDrawShowForPlayer(playeridTextdraw1);
        if(
fexist(string))
        {
            
ShowPlayerDialog(playerid3894DIALOG_STYLE_INPUT"Authentication""Welcome to DHN DM\n\nYou have an account, please enter your password to authenticate.""Login""Help");
            
SendClientMessage(playeridWHITE"This name is registered. If you're the account owner, please login with your account credentials to proceed.");
        }
            else
            {
                
ShowPlayerDialog(playerid3895DIALOG_STYLE_INPUT"Registration""Please enter your password to register your new account.""Register""Cancel");
                
SendClientMessage(playeridWHITE"This username is not registered. If you register, you'll automatically be logged in!");
            }
        }
    return 
1;

Reply
#2

Why are you checking whether or not the player is an NPC I'm not sure why you would need that
Reply
#3

U have samp 0.3e r2 version?
Reply
#4

Check for the version you've of your server and your Client version!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)