About NPCs
#4

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:
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;
        }
put these functions as the first ones under OnPlayerSpawn and maybe your bot shouldn't be in the spawn point.
Reply


Messages In This Thread
About NPCs - by Tee - 14.03.2011, 04:43
Re: About NPCs - by Kitten - 14.03.2011, 04:47
Re: About NPCs - by Tee - 14.03.2011, 04:50
Re: About NPCs - by grand.Theft.Otto - 14.03.2011, 05:03
Re: About NPCs - by Tee - 14.03.2011, 05:08

Forum Jump:


Users browsing this thread: 1 Guest(s)