#1

Hello all, i try to make NPC on my server, i think is good what i make, but when press TAB not show me the NPC
PHP код:
#define RECORDING "NewNpc" //This is the filename of your recording without the extension.
#define RECORDING_TYPE 1 //1 for in vehicle and 2 for on foot.
#include <a_npc>
main(){}
public 
OnRecordingPlaybackEnd() StartRecordingPlayback(RECORDING_TYPERECORDING);
#if RECORDING_TYPE == 1
  
public OnNPCEnterVehicle(vehicleidseatidStartRecordingPlayback(RECORDING_TYPERECORDING);
  public 
OnNPCExitVehicle() StopRecordingPlayback();
#else
  
public OnNPCSpawn() StartRecordingPlayback(RECORDING_TYPERECORDING);
#endif 
I have record file.

PS: OnGameModeInit: ConnectNPC("john","NewNpc");
Reply
#2

anybody ?
Reply
#3

Did you compile the .pwn script from npcmodes? Any connect/disconnect message in the console? Probably your register system kicks him.
Reply
#4

Yes i compile in .amx file , is connected, i cand see it, but not show like a player, like me
PHP код:
----------
Loaded log file"server_log.txt".
----------
SA-MP Dedicated Server
----------------------
v0.3.7, (C)2005-2015 SA-MP Team
[19:44:53
[
19:44:53Server Plugins
[19:44:53] --------------
[
19:44:53]  Loading pluginfilemanager
[19:44:53] ******************
[
19:44:53] ** FILE MANAGER **
[
19:44:53] **    Loaded    **
[
19:44:53] ** Version 1.1 **
[
19:44:53] ******************
[
19:44:53]   Loaded.
[
19:44:53]  Loaded 1 plugins.
[
19:44:53
[
19:44:53Filterscripts
[19:44:53] ---------------
[
19:44:53]   Loading filterscript 'NpcGenerator.amx'...
[
19:44:53
--------------------------------------
[
19:44:53]  NPC Generator Loaded
[19:44:53] --------------------------------------
[
19:44:53]   Loading filterscript 'knpc.amx'...
[
19:44:53
----------------------------------
[
19:44:53InGame NPC editor by Kurence loaded!
[
19:44:53] ----------------------------------
[
19:44:53] [connection127.0.0.1:2627 requests connection cookie.
[
19:44:53] [connection127.0.0.1:2628 requests connection cookie.
[
19:44:54] [connection127.0.0.1:2629 requests connection cookie.
[
19:44:54] [connection127.0.0.1:2630 requests connection cookie.
[
19:44:54] [connection127.0.0.1:2631 requests connection cookie.
[
19:44:54]   Loaded 2 filterscripts.
[
19:44:54] [connection127.0.0.1:2632 requests connection cookie.
[
19:44:54Loaded 3 vehicles fromvehicles/trains.txt
[19:44:54Loaded 3 vehicles fromvehicles/pilots.txt
[19:44:54Loaded 15 vehicles fromvehicles/lv_law.txt
[19:44:54Loaded 39 vehicles fromvehicles/lv_airport.txt
[19:44:54Loaded 255 vehicles fromvehicles/lv_gen.txt
[19:44:54Loaded 38 vehicles fromvehicles/sf_law.txt
[19:44:54Loaded 35 vehicles fromvehicles/sf_airport.txt
[19:44:54Loaded 353 vehicles fromvehicles/sf_gen.txt
[19:44:54Loaded 24 vehicles fromvehicles/ls_law.txt
[19:44:54] [connection127.0.0.1:2633 requests connection cookie.
[
19:44:54Loaded 37 vehicles fromvehicles/ls_airport.txt
[19:44:54Loaded 98 vehicles fromvehicles/ls_gen_inner.txt
[19:44:54Loaded 389 vehicles fromvehicles/ls_gen_outer.txt
[19:44:54Loaded 71 vehicles fromvehicles/whetstone.txt
[19:44:54Loaded 168 vehicles fromvehicles/bone.txt
[19:44:54Loaded 61 vehicles fromvehicles/flint.txt
[19:44:54Loaded 96 vehicles fromvehicles/tierra.txt
[19:44:54Loaded 96 vehicles fromvehicles/red_county.txt
[19:44:54Total vehicles from files1781
[19:44:54
---------------------------------------
[
19:44:54Running Grand Larceny by the SA-MP team
[19:44:54] ---------------------------------------
[
19:44:54Number of vehicle models173
[19:44:54Incoming connection127.0.0.1:2627 id0
[19:44:54Incoming connection127.0.0.1:2628 id1
[19:44:55Incoming connection127.0.0.1:2629 id2
[19:44:55Incoming connection127.0.0.1:2630 id3
[19:44:55Incoming connection127.0.0.1:2631 id4
[19:44:55Incoming connection127.0.0.1:2632 id5
[19:44:55] [npc:joinKurence0 has joined the server (0:127.0.0.1)
[
19:44:55Incoming connection127.0.0.1:2633 id6
[19:44:55] [npc:joinKurence1 has joined the server (1:127.0.0.1)
[
19:44:55] [npc:joinKurence2 has joined the server (2:127.0.0.1)
[
19:44:55] [npc:joinKurence3 has joined the server (3:127.0.0.1)
[
19:44:55] [npc:joinKurence4 has joined the server (4:127.0.0.1)
[
19:44:55] [npc:joinKurence5 has joined the server (5:127.0.0.1)
[
19:44:55] [npc:joinJohn has joined the server (6:127.0.0.1)
[
19:44:58] --- Server Shutting Down.
[
19:44:58
--------------------------------------
[
19:44:58]  NPC Generator Unloaded
[19:44:58] --------------------------------------
[
19:44:58
------------------------------------
[
19:44:58InGame NPC editor by Kurence unloaded!
[
19:44:58] ------------------------------------
[
19:44:58] [npc:partKurence0 has left the server (0:2)
[
19:44:58] [npc:partKurence1 has left the server (1:2)
[
19:44:58] [npc:partKurence2 has left the server (2:2)
[
19:44:58] [npc:partKurence3 has left the server (3:2)
[
19:44:58] [npc:partKurence4 has left the server (4:2)
[
19:44:58] [npc:partKurence5 has left the server (5:2)
[
19:44:58] [npc:partJohn has left the server (6:0
Reply
#5

Add this to your script and try again:
PHP код:
public OnPlayerConnect (playerid) {
    if (
IsPlayerNPC(playerid)) return 1;
    
/* All your code here. */
    
return 1;

Keep checking the disconnect reasons here while you run your tests.
Reply
#6

Quote:
Originally Posted by [DOG]irinel1996
Посмотреть сообщение
Add this to your script and try again:
PHP код:
public OnPlayerConnect (playerid) {
    if (
IsPlayerNPC(playerid)) return 1;
    
/* All your code here. */
    
return 1;

What code ?
Reply
#7

Add your code if you have any, I mean, if you have any code in OnPlayerConnect put it below this condition:
PHP код:
if (IsPlayerNPC(playerid)) return 1
Show me how you connect the NPC.
Reply
#8

O yeh i put, but not appear like me in TAB

It's possible ? sorry
Reply
#9

look the NPC is connected but like i say, not show in TAB like a player







Reply
#10

How i connect NPC
PHP код:
public OnGameModeInit()
{
    
SetGameModeText("Grand Larceny");
    
ShowPlayerMarkers(PLAYER_MARKERS_MODE_GLOBAL);
    
ShowNameTags(1);
    
SetNameTagDrawDistance(40.0);
    
EnableStuntBonusForAll(0);
    
DisableInteriorEnterExits();
    
SetWeather(2);
    
SetWorldTime(11);
    
ConnectNPC("John","NewNpc");
// all code here // 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)