14.03.2011, 05:03
Go back and do the OnGameModeInit part again like kc quoted. But what I recommend is you put every ConnectNPC line as the very first line under OnGameModeInit.
Also:
put these functions as the first ones under OnPlayerSpawn and maybe your bot shouldn't be in the spawn point.
Also:
pawn Код:
if(IsPlayerNPC(playerid)) //Checks if the player that just spawned is an NPC.
{
new npcname[MAX_PLAYER_NAME];
new Text3D:label[MAX_PLAYERS];
GetPlayerName(playerid, npcname, sizeof(npcname)); //Getting the NPC's name.
if(!strcmp(npcname, "namehere", true)) //Checking if the NPC's name is MyFirstNPC
{
PutPlayerInVehicle(playerid, MyFirstNPCVehicle, 0); //Putting the NPC into the vehicle we created for it.
return 1;
}