#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_TYPE, RECORDING);
#if RECORDING_TYPE == 1
  
public OnNPCEnterVehicle(vehicleid, seatid) StartRecordingPlayback(RECORDING_TYPE, RECORDING);
  public 
OnNPCExitVehicle() StopRecordingPlayback();
#else
  
public OnNPCSpawn() StartRecordingPlayback(RECORDING_TYPE, RECORDING);
#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:53] Server Plugins
[19:44:53] --------------
[
19:44:53]  Loading plugin: filemanager
[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:53] Filterscripts
[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:53] InGame NPC editor by Kurence loaded!
[
19:44:53] ----------------------------------
[
19:44:53] [connection] 127.0.0.1:2627 requests connection cookie.
[
19:44:53] [connection] 127.0.0.1:2628 requests connection cookie.
[
19:44:54] [connection] 127.0.0.1:2629 requests connection cookie.
[
19:44:54] [connection] 127.0.0.1:2630 requests connection cookie.
[
19:44:54] [connection] 127.0.0.1:2631 requests connection cookie.
[
19:44:54]   Loaded 2 filterscripts.
[
19:44:54] [connection] 127.0.0.1:2632 requests connection cookie.
[
19:44:54] Loaded 3 vehicles from: vehicles/trains.txt
[19:44:54] Loaded 3 vehicles from: vehicles/pilots.txt
[19:44:54] Loaded 15 vehicles from: vehicles/lv_law.txt
[19:44:54] Loaded 39 vehicles from: vehicles/lv_airport.txt
[19:44:54] Loaded 255 vehicles from: vehicles/lv_gen.txt
[19:44:54] Loaded 38 vehicles from: vehicles/sf_law.txt
[19:44:54] Loaded 35 vehicles from: vehicles/sf_airport.txt
[19:44:54] Loaded 353 vehicles from: vehicles/sf_gen.txt
[19:44:54] Loaded 24 vehicles from: vehicles/ls_law.txt
[19:44:54] [connection] 127.0.0.1:2633 requests connection cookie.
[
19:44:54] Loaded 37 vehicles from: vehicles/ls_airport.txt
[19:44:54] Loaded 98 vehicles from: vehicles/ls_gen_inner.txt
[19:44:54] Loaded 389 vehicles from: vehicles/ls_gen_outer.txt
[19:44:54] Loaded 71 vehicles from: vehicles/whetstone.txt
[19:44:54] Loaded 168 vehicles from: vehicles/bone.txt
[19:44:54] Loaded 61 vehicles from: vehicles/flint.txt
[19:44:54] Loaded 96 vehicles from: vehicles/tierra.txt
[19:44:54] Loaded 96 vehicles from: vehicles/red_county.txt
[19:44:54] Total vehicles from files: 1781
[19:44:54] 
---------------------------------------
[
19:44:54] Running Grand Larceny - by the SA-MP team
[19:44:54] ---------------------------------------
[
19:44:54] Number of vehicle models: 173
[19:44:54] Incoming connection: 127.0.0.1:2627 id: 0
[19:44:54] Incoming connection: 127.0.0.1:2628 id: 1
[19:44:55] Incoming connection: 127.0.0.1:2629 id: 2
[19:44:55] Incoming connection: 127.0.0.1:2630 id: 3
[19:44:55] Incoming connection: 127.0.0.1:2631 id: 4
[19:44:55] Incoming connection: 127.0.0.1:2632 id: 5
[19:44:55] [npc:join] Kurence0 has joined the server (0:127.0.0.1)
[
19:44:55] Incoming connection: 127.0.0.1:2633 id: 6
[19:44:55] [npc:join] Kurence1 has joined the server (1:127.0.0.1)
[
19:44:55] [npc:join] Kurence2 has joined the server (2:127.0.0.1)
[
19:44:55] [npc:join] Kurence3 has joined the server (3:127.0.0.1)
[
19:44:55] [npc:join] Kurence4 has joined the server (4:127.0.0.1)
[
19:44:55] [npc:join] Kurence5 has joined the server (5:127.0.0.1)
[
19:44:55] [npc:join] John 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:58] InGame NPC editor by Kurence unloaded!
[
19:44:58] ------------------------------------
[
19:44:58] [npc:part] Kurence0 has left the server (0:2)
[
19:44:58] [npc:part] Kurence1 has left the server (1:2)
[
19:44:58] [npc:part] Kurence2 has left the server (2:2)
[
19:44:58] [npc:part] Kurence3 has left the server (3:2)
[
19:44:58] [npc:part] Kurence4 has left the server (4:2)
[
19:44:58] [npc:part] Kurence5 has left the server (5:2)
[
19:44:58] [npc:part] John 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)