• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Pawn] [SOLVED] spawned NPC just stands normally like an actor AFK in general
#1
On top of OnPlayerConnect, OnPlayerRequestSpawn, and OnPlayerSpawn callbacks. Check the player is a NPC, then return 1.

PHP Code:

if(IsPlayerNPC(playerid)) return 1;

By doing this you are passing the NPC through the login or register.

That was working at my game mode. Thanks



Sorry, at first I managed to make the PLAYER_RECORDING_TYPE_ONFOOT NPC pawn on the server and it matches the .amx and .rec files in the NPC models. But why doesn't the NPC move like it's supposed to be exactly in the .rec file? But this spawned NPC just stands normally like an actor in general, even though if every teleportation to the NPC only changes its position and has become, sometimes the position is like at the beginning of .rec or in the final position .rec so strangely it looks like there is no animation of the path on the NPC. the.
  Reply
#2
(2021-03-14, 11:13 AM)PutuSuhartawan Wrote: Sorry, at first I managed to make the PLAYER_RECORDING_TYPE_ONFOOT NPC pawn on the server and it matches the .amx and .rec files in the NPC models. But why doesn't the NPC move like it's supposed to be exactly in the .rec file? But this spawned NPC just stands normally like an actor in general, even though if every teleportation to the NPC only changes its position and has become, sometimes the position is like at the beginning of .rec or in the final position .rec so strangely it looks like there is no animation of the path on the NPC. the.



Do you have code that makes NPCs bypass the registration and login codes?
  Reply
#3
I don't give it, sir. because I saw that the NPC could spawn and move its position only when teleported. but I guess I should think it will run like a .rec file? Do you have any suggestions for a script that allows this NPC to bypass the login system and register properly, he will be able to anim move?
  Reply
#4
I have a suggestion for you:
On top of OnPlayerConnect, OnPlayerRequestSpawn, and?OnPlayerSpawn?callbacks. Check the player is a NPC, then return 1.
PHP Code:
if(IsPlayerNPC(playerid)) return 1
By doing this you are passing the NPC through the login or register.
  Reply
#5
On top of OnPlayerConnect, OnPlayerRequestSpawn, and OnPlayerSpawn callbacks. Check the player is a NPC, then return 1.

PHP Code:

if(IsPlayerNPC(playerid)) return 1;

By doing this you are passing the NPC through the login or register.

That was working at my game mode. Thanks
  Reply


Forum Jump: