#1

Hi. I have a NPC problem. I have 2 NPCs so far, as taxi driver called TaxiDriver_01 and a pilot called HydraPilot_01. The hydra pilot connects and stays on my server, but the taxi driver exits after about 10 sec.
Any ideas why. I'm using a blank gamemode.
Код:
new NPCHydra_01;
new NPCTaxi_01;

ConnectNPC("HydraPilot_01","HydraPatrol_01");
NPCHydra_01 = CreateVehicle(520, 0.0, 0.0, 5.0, 0.0, 3, 3, 5000);  
ConnectNPC("TaxiDriver_01","AirportTaxiRoute_01");
NPCTaxi_01 = CreateVehicle(583, 0.0, 0.0, 5.0, 0.0, 3, 3, 5000);

public OnPlayerSpawn(playerid)
{
  if(IsPlayerNPC(playerid)) //Checks if the player that just spawned is an NPC.
  {
    new npcname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, npcname, sizeof(npcname)); //Getting the NPC's name.
    if(!strcmp(npcname, "HydraPilot_01", true)) //Checking if the NPC's name is MyFirstNPC
    {
      PutPlayerInVehicle(playerid, NPCHydra_01, 0); //Putting the NPC into the vehicle we created for it.
      return 1;
    }
    if(!strcmp(npcname, "TaxiDriver_01", true))
    {
      PutPlayerInVehicle(playerid, NPCTaxi_01, 0);
      return 1;
    }
    return 1;
  }
  //Other stuff for normal players goes here!
	return 1;
}
Pls help! Oh, here is my server log.
Код:
SA-MP Dedicated Server
----------------------
v0.3a R7, ©2005-2010 SA-MP Team

[12:20:03] 
[12:20:03] Server Plugins
[12:20:03] --------------
[12:20:03] Loaded 0 plugins.

[12:20:04] 
[12:20:04] Filter Scripts
[12:20:04] ---------------
[12:20:04]  Loading filter script 'base.amx'...
[12:20:04] 
--Base FS loaded.

[12:20:04]  Loading filter script 'gl_actions.amx'...
[12:20:04]  Loading filter script 'gl_property.amx'...
[12:20:04] 
-----------------------------------
[12:20:04] Grand Larceny Property Filterscript		
[12:20:04] -----------------------------------

[12:20:04]  Loading filter script 'gl_realtime.amx'...
[12:20:04]  Loading filter script 'medit.amx'...
[12:20:04] 
[12:20:04]   San Andreas: Map Editor
[12:20:04]   by mabako
[12:20:04] 
[12:20:04]  Loading filter script 'baseaf.amx'...
[12:20:04] 
--Base FS loaded.

[12:20:04]  Loading filter script 'adminspec.amx'...
[12:20:04]  Loading filter script 'gl_chatbubble.amx'...
[12:20:04] 
--Speech bubble example loaded.

[12:20:04]  Loaded 8 filter scripts.

[12:20:04] Loaded 1 vehicles from: vehicles/TzenyMode/trains.txt
[12:20:04] Loaded 36 vehicles from: vehicles/TzenyMode/police.txt
[12:20:04] Loaded 19 vehicles from: vehicles/TzenyMode/army.txt
[12:20:04] Loaded 5 vehicles from: vehicles/TzenyMode/ambulance.txt
[12:20:04] Loaded 3 vehicles from: vehicles/TzenyMode/fbi.txt
[12:20:04] Loaded 1 vehicles from: vehicles/TzenyMode/misc.txt
[12:20:04] Loaded 10 vehicles from: vehicles/TzenyMode/rentable.txt
[12:20:04] Loaded 12 vehicles from: vehicles/TzenyMode/taxi.txt
[12:20:06] Reading File: blank
[12:20:06] Reading File: properties/houses.txt
[12:20:06] Reading File: properties/businesses.txt
[12:20:06] Reading File: properties/banks.txt
[12:20:06] Reading File: properties/police.txt
[12:20:06] 
----------------------------------
[12:20:06] Blank Gamemode by your name here
[12:20:06] ----------------------------------

[12:20:06] Number of vehicle models: 25
[12:20:06] Incoming connection: 127.0.0.1:1583
[12:20:06] [npc:join] HydraPilot_01 has joined the server (0:127.0.0.1)
[12:20:06] Incoming connection: 127.0.0.1:1584
[12:20:06] [npc:join] TaxiDriver_01 has joined the server (1:127.0.0.1)
[12:20:21] [npc:part] TaxiDriver_01 has left the server (1:0)
[12:20:44] --- Server Shutting Down.
[12:20:44] [npc:part] HydraPilot_01 has left the server (0:0)
Reply
#2

you compile the taxi npc .pwn??
Reply
#3

Also make sure that max_npc is set correctly in your server.cfg file.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)