02.09.2014, 16:55
Quote:
Hi , I know what is the problem , Public "OnPlayerRequestClass"
add this: Код:
if(IsPlayerNPC(playerid)) return 1; |
What you have to do, is force the NPC to spawn because they can't press the spawn button / login / whatever, themselves. You have to make them do it. So modify your code under the relevant callback so it looks something like this:
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
if(IsPlayerNPC(playerid))
{
SpawnPlayer(playerid);
}
return 1;
}
public OnPlayerRequestSpawn(playerid)
{
if(IsPlayerNPC(playerid))
{
SpawnPlayer(playerid);
}
return 1;
}
pawn Код:
public OnPlayerSpawn(playerid)
{
if(IsPlayerNPC(playerid))
{
//code
}
return 1;
}