27.10.2013, 10:00
As the title says, the NPC will quit after someone is trying to login. Basically I don't know what the problem is, as I tried everything possible.
Here are the server logs:
And as I mentioned, here is the part of quitting:
I don't really know why it shall leave, but. Don't even know what is creating this.
I bet more on a possible crash, but don't know what may create that 'possible crash'.
OnGameModeInIt part:
OnPlayerConnect part:
I putted it on connecting callback because that's the place where it tries to connect. On the other hand, I tried even the OnPlayerSpawn callback but also it didn't work, it left after connecting, without even printing any information to the console.
1. I have added maxnpc line to 10.
2. Both .amx/.pwn and .rec files have same name.
Thank you to whoever offers to help me.
Here are the server logs:
Code:
---------- Loaded log file: "server_log.txt". ---------- SA-MP Dedicated Server ---------------------- v0.3x-R2, ©2005-2013 SA-MP Team [11:02:12] [11:02:12] Server Plugins [11:02:12] -------------- [11:02:12] Loading plugin: sscanf [11:02:12] [11:02:12] =============================== [11:02:12] sscanf plugin loaded. [11:02:12] © 2009 Alex "Y_Less" Cole [11:02:12] =============================== [11:02:12] Loaded. [11:02:12] Loaded 1 plugins. [11:02:12] [11:02:12] Filterscripts [11:02:12] --------------- [11:02:12] Loading filterscript 'npc_record.amx'... [11:02:12] Loading filterscript 'private.amx'... [11:02:12] Loaded 2 filterscripts. [11:02:12] [11:02:12] ======================================= [11:02:12] | | [11:02:12] | YSI version 1.03.0011 | [11:02:12] | By Alex "Y_Less" Cole | [11:02:12] | | [11:02:12] | Checking the latest YSI version.. | [11:02:12] | | [11:02:12] ======================================= [11:02:12] [11:02:12] ---------------------------------- [11:02:12] Blank Gamemode by your name here [11:02:12] ---------------------------------- [11:02:12] Number of vehicle models: 1 [11:02:12] Incoming connection: XXX [11:02:12] [11:02:12] [11:02:12] [npc:join] Tutorial has joined the server (XXX) [11:02:12] Has joined and is waiting to enter vehicle [11:02:12] NPC has been spawned [11:02:27] [npc:part] Tutorial has left the server (0:0) [11:02:42] Incoming connection: XXX [11:02:42] [join] Ricard_Nune has joined the server (XXX68.1.70:52930)
Code:
[11:02:12] [npc:join] Tutorial has joined the server (XXX) [11:02:12] Has joined and is waiting to enter vehicle [11:02:12] NPC has been spawned [11:02:27] [npc:part] Tutorial has left the server (0:0) [11:02:42] Incoming connection: XXX [11:02:42] [join] Ricard_Nune has joined the server (XXX)
I bet more on a possible crash, but don't know what may create that 'possible crash'.
OnGameModeInIt part:
pawn Code:
public OnGameModeInit()
{
taxicar = AddStaticVehicle(420,1669.9904,-2321.4951,-3.0693,90.1905,6,1);
ConnectNPC("Tutorial", "taxils");
return 1;
}
pawn Code:
if(IsPlayerNPC(playerid))
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
if(!strcmp(name,"Tutorial",false))
{
printf("Has joined and is waiting to enter vehicle");
PutPlayerInVehicle(playerid,taxicar,0);
printf("NPC has been spawned");
}
return 1;
}
1. I have added maxnpc line to 10.
2. Both .amx/.pwn and .rec files have same name.
Thank you to whoever offers to help me.