Can't connect to server - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Can't connect to server (
/showthread.php?tid=385079)
Can't connect to server -
jotan. - 14.10.2012
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(playerid, Name, sizeof(Name));
format(string, sizeof(string), "Accounts/%s.ini", Name);
Reset(playerid);
SetPlayerColor(playerid, GREY);
TotalConnections++;
PlayersOn++;
if(PlayersOn > MaxVisitors)
{
MaxVisitors = PlayersOn;
UpdateAnalysis();
}
TextDrawShowForPlayer(playerid, Textdraw1);
if(fexist(string))
{
ShowPlayerDialog(playerid, 3894, DIALOG_STYLE_INPUT, "Authentication", "Welcome to DHN DM\n\nYou have an account, please enter your password to authenticate.", "Login", "Help");
SendClientMessage(playerid, WHITE, "This name is registered. If you're the account owner, please login with your account credentials to proceed.");
}
else
{
ShowPlayerDialog(playerid, 3895, DIALOG_STYLE_INPUT, "Registration", "Please enter your password to register your new account.", "Register", "Cancel");
SendClientMessage(playerid, WHITE, "This username is not registered. If you register, you'll automatically be logged in!");
}
}
return 1;
}
Re: Can't connect to server -
NewerthRoleplay - 14.10.2012
Why are you checking whether or not the player is an NPC I'm not sure why you would need that
Re: Can't connect to server -
DeTix - 14.10.2012
U have samp 0.3e r2 version?
Re: Can't connect to server -
BlueSky_ - 14.10.2012
Check for the version you've of your server and your Client version!