NPCs Keep getting kicked - 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: NPCs Keep getting kicked (
/showthread.php?tid=592125)
NPCs Keep getting kicked -
Barnicle - 20.10.2015
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"
Re: NPCs Keep getting kicked -
SoFahim - 20.10.2015
Maybe the problem on Max_IP or Max players from one IP