---------- 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)
[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)
public OnGameModeInit()
{
taxicar = AddStaticVehicle(420,1669.9904,-2321.4951,-3.0693,90.1905,6,1);
ConnectNPC("Tutorial", "taxils");
return 1;
}
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;
}
if( IsPlayerNPC( playerid ) ) return 1;
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;
}
You cannot force a NPC to get in a vehicle while connecting. In OnPlayerConnect:
pawn Code:
pawn Code:
|
The same must be done in OnPlayerRequestClass and OnPlayerRequestSpawn, too.
|