NPC ON FOOT BOT
#1

i have made a ton of bots for vehicles all succesfull but i never tried making a on foot bot so yea i read the tutorial on Creating a new npc it mentions nothing about creating on foot bots and how to put them in server so when i try to connect my bot it just says incomming connection thats it all my other vehicle bots join just not this one heres the code.
yes i have put em all in the right place.

Код:
ConnectNPC("CJ","cjtest");
 if(!strcmp(npcname, "CJ", true))
    {
      // i dont know what to put here.
      return 1;
    }
thanks for all the help i get.
Reply
#2

I've always done it VERY similar to how I create vehicle bots.
Reply
#3

o dont know,i think something like this

SetPlayerPos(playerid,1199.8600, -2056.4299, 239.3500);
new npcname[MAX_PLAYER_NAME];
GetPlayerName(playerid, npcname, sizeof(npcname)); //Getting the NPC's name.
if(!strcmp(npcname, "", 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;
}

if(!strcmp(npcname, "santa", true))
{
PutPlayerInVehicle(playerid, AnotherVehicleID, 0);
return 1;
}
return 1;
}
//Other stuff for normal players goes here!
return 1;
}
public OnFilterScriptInit()
{
print("my filterscript");
ConnectNPC("MyFirstNPC","mynpc");
MyFirstNPCVehicle = CreateVehicle(400, 0.0, 0.0, 5.0, 0.0, 3, 3, 5000);
return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)