[NPC Poblem] The godfahter
#1

i Have a Question,
iam Using the godfather Gamemode but, i cant get npc's in it :S
Please Can Somebody help me..

Please no comments like: Dont use The godfather or something....
Reply
#2

Remove the registration system and the bots should work fine.
Reply
#3

NPC's wouldn work if you have register/login script...

I supose that you can give npc's password and register it.

About 1h agou 1 man sent me this
Код:
new npcname[MAX_PLAYER_NAME];
 	GetPlayerName(playerid, npcname, sizeof(npcname)); 
if(!strcmp(npcname, "Here you put the name of the player", true)) 
 	{
	 	OnPlayerLogin(playerid, "Here the encrypted password that you can find in the .ini file of the player");
 	}
try to do something with this
Reply
#4

u can leave register system

at OnPlayerSpawn ... before it checks is player logged, put a return function for npc's
Reply
#5

pawn Код:
public OnPlayerConnect(playerid)
{
  if(IsPlayerNPC(playerid))return 1;
  //OTHER stuff
}
Reply
#6

Quote:
Originally Posted by -The_Badger-
pawn Код:
public OnPlayerConnect(playerid)
{
  if(IsPlayerNPC(playerid))return 1;
  //OTHER stuff
}
This guy has the right idea, don't forget to do the same for OnPlayerSpawn if nessicary though
Reply
#7

Quote:
Originally Posted by XGh0stz
Quote:
Originally Posted by -The_Badger-
pawn Код:
public OnPlayerConnect(playerid)
{
  if(IsPlayerNPC(playerid))return 1;
  //OTHER stuff
}
This guy has the right idea, don't forget to do the same for OnPlayerSpawn if nessicary though
if(IsPlayerNPC(playerid))
}
PlayerSpawn or something??
{
return 1;

But what then?
Reply
#8

That line makes it so if they are an NPC, OnPlayerConnect doesn't continue on with them. So they wont get messages saying "Hai welcomes to ma servair" etc.
Reply
#9

Does it connect then get kicked straight away?
Reply
#10

Quote:
Originally Posted by GforceNL
Quote:
Originally Posted by XGh0stz
Quote:
Originally Posted by -The_Badger-
pawn Код:
public OnPlayerConnect(playerid)
{
  if(IsPlayerNPC(playerid))return 1;
  //OTHER stuff
}
This guy has the right idea, don't forget to do the same for OnPlayerSpawn if nessicary though
if(IsPlayerNPC(playerid))
{
PlayerSpawn or something??
}
return 1;

But what then?
Reply


Forum Jump:


Users browsing this thread: