NPCs Keep getting kicked
#1

I have a NPC script but the NPCs keep getting kicked before the server starts. How to I allow them to bypass the login system?

then this happens


I do have a login system and from what I have been reading I need to change this:
Код:
public OnPlayerConnect(playerid)
{
	new string[256], Query[200];
	GetPlayerName(playerid, PlayerInfo[playerid][pName], 128);
	GetPlayerIp(playerid, PlayerInfo[playerid][pIP], 50);

	ResetAllPlayerStats(playerid);
	SetPlayerColor(playerid, COLOR_DEAD);

    if (IsPlayerNPC(playerid))
	{
     format(string, sizeof(string), "* NPC %s (%i) Has Joined The Server.",PlayerInfo[playerid][pName],playerid);
		SendClientMessageToOthers(playerid, COLOR_DEAD, string);
   	}
to this:

Код:
public OnPlayerConnect(playerid)
{
	new string[256], Query[200];
	GetPlayerName(playerid, PlayerInfo[playerid][pName], 128);
	GetPlayerIp(playerid, PlayerInfo[playerid][pIP], 50);

	ResetAllPlayerStats(playerid);
	SetPlayerColor(playerid, COLOR_DEAD);

    if(IsPlayerNPC(playerid)) return 1;
	{
     format(string, sizeof(string), "* NPC %s (%i) Has Joined The Server.",PlayerInfo[playerid][pName],playerid);
		SendClientMessageToOthers(playerid, COLOR_DEAD, string);
   	}
but when I compile it, it says "error 029: invalid expression, assumed zero"
Reply
#2

Maybe the problem on Max_IP or Max players from one IP
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)