20.10.2015, 18:39
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:
to this:
but when I compile it, it says "error 029: invalid expression, assumed zero"

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);
}
Код:
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);
}

