NPC Problem
#1

Hi,

I have NPC problem, he spawns but he stays in his Positions its weird, I need help, if I remove the admin script then it works, but I want it with admin script the onlplayerspawn and requestspawn here..

Код:
public OnPlayerRequestSpawn(playerid)
{
  if(PlayerData[playerid][Logged] == 0)
  {
  SendClientMessage(playerid, RED, "You must log into your streetz account to spawn.");
	}
	return 1;
}

public OnPlayerSpawn(playerid)
{
	if(PlayerData[playerid][Muted] == 1)
	{
 	SendClientMessage(playerid, RED, "SERVER MESSAGE: You are still muted by an Administrator");
  	return 1;
	}
 	if(PlayerData[playerid][Prison] == 1)
  {
  SpawnPlayer(playerid);
  GameTextForPlayer(playerid, "~r~Admin Jail", 3000, 3);
  SendClientMessage(playerid, RED, "SERVER MESSAGE: You used /q during admin jail. You have been re-instated inside.");
	SetPlayerInterior(playerid,6);
	SetPlayerPos(playerid,264.6288,77.5742,1001.0391);
	return 1;
	}
	return 0;
}
What's the problem?
Reply
#2

Add

if(IsPlayerNPC(playerid)) return 1;

Under OnPlayerConnect, OnPlayerSpawn and OnPlayerRequestSpawn. It happens because the NPC can't login, and therefor needs sort of a pass straight through so it can spawn.

J
Reply
#3

I did that already it still does not work, they just spawn there and stay.
Reply
#4

is your admin script a filterscript? if so then open that and then

Quote:
Originally Posted by MadnessJohnson
Add

if(IsPlayerNPC(playerid)) return 1;

Under OnPlayerConnect, OnPlayerSpawn and OnPlayerRequestSpawn. It happens because the NPC can't login, and therefor needs sort of a pass straight through so it can spawn.

J
all into the filterscripts and recompile
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)