02.09.2014, 16:58
Quote:
First of all, that's not correct because you're not doing anything with the NPC, second of all, OnPlayerRequestClass is obviously not the only callback that's called upon when a player, or in this instance - an NPC joins the server.
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 Код:
pawn Код:
|
dude if you don't know how to script don't help
PHP код:
Common problems
My NPC leaves my server after it joins
Your script is forcing the NPC to login, or you have an anti-cheat / ping kicker that is interfering with your NPC. You can add...
pawn Code:
if(IsPlayerNPC(playerid)) return 1;
... as the first line of any callbacks that bots will use, e.g. OnPlayerRequestClass or OnPlayerRequestSpawn. For an efficient, simple way of excluding NPCs from loops, check out foreach by ******.
https://sampforum.blast.hk/showthread.php?tid=95034
OnPlayerRequestClass or OnPlayerRequestSpawn
and don't say somting you don't know please.