Burgershot
  • Home
  • Members
  • Team
  • Help
  • Search
  • Register
  • Login
  • Home
  • Members
  • Help
  • Search
Burgershot SA-MP Pawn Scripting [Pawn] [SOLVED] spawned NPC just stands normally like an actor AFK in general

 
  • 0 Vote(s) - 0 Average
Pawn [SOLVED] spawned NPC just stands normally like an actor AFK in general
PutuSuhartawan
Offline

Burgershot Member
Posts: 120
Threads: 52
Joined: Nov 2020
Reputation: 1
Location: Indonesia
#1
2021-03-14, 11:13 AM (This post was last modified: 2021-04-16, 05:08 AM by PutuSuhartawan.)
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.
Virsenas
Offline

Burgershot Member
Posts: 47
Threads: 0
Joined: Feb 2021
Reputation: 6
#2
2021-03-14, 12:23 PM
(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?
PutuSuhartawan
Offline

Burgershot Member
Posts: 120
Threads: 52
Joined: Nov 2020
Reputation: 1
Location: Indonesia
#3
2021-03-14, 04:48 PM (This post was last modified: 2021-03-14, 04:51 PM by PutuSuhartawan.)
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?
Radical
Offline

Burgershot Member
Posts: 148
Threads: 21
Joined: Dec 2020
Reputation: 16
#4
2021-03-14, 05:33 PM (This post was last modified: 2021-03-14, 05:34 PM by Radical.)
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.
PutuSuhartawan
Offline

Burgershot Member
Posts: 120
Threads: 52
Joined: Nov 2020
Reputation: 1
Location: Indonesia
#5
2021-03-14, 06:56 PM
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
« Next Oldest | Next Newest »



  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Burgershot - Powered by our Community and MyBB Original Theme by Emerald

Linear Mode
Threaded Mode