Problem With my bots
#1

Hello i Have Created Two Bots in one Filterscript,
But 1 Works Well.. But the other Stands @ Spawn And dont move or doesnt work...

http://www.plaatscode.be/138122/

Thats My FS
Reply
#2

Possible problem could be your bot isn't being spawned. Try adding this into your mode.

Код:
public OnPlayerRequestClass(playerid, classid)
{
	if(!IsPlayerNPC(playerid)) return 0; // We only deal with NPC players in this script
    SetSpawnInfo(playerid,69,255,1462.0745,2630.8787,10.8203,0.0,-1,-1,-1,-1,-1,-1);/change this
}
Could also check the name matches your bots name. But I'm sure the about would do the same, even with the argument.

Have you created a seperate npc node file for the second taxi?
Reply
#3

Quote:
Originally Posted by [LSD
Rac3r ]
Possible problem could be your bot isn't being spawned. Try adding this into your mode.

Код:
public OnPlayerRequestClass(playerid, classid)
{
	if(!IsPlayerNPC(playerid)) return 0; // We only deal with NPC players in this script
    SetSpawnInfo(playerid,69,255,1462.0745,2630.8787,10.8203,0.0,-1,-1,-1,-1,-1,-1);/change this
}
Could also check the name matches your bots name. But I'm sure the about would do the same, even with the argument.

Have you created a seperate npc node file for the second taxi?
but i got another bot and that Works good?
Reply
#4

Each bot requires a npc node file (nodefile.amx), they have to be seperate by default.

npcnodes/taxi.amx
npcnodes/taxi2.amx
npcnodes/recording/taxi.rec Both bots can use same recording though.
Reply
#5

your first bot always shows up and starts working correctly, but the second stands there doing nothing, right?
thats caused by:
Код:
public OnPlayerSpawn(playerid)
{
	if(IsPlayerNPC(playerid)) //kijkt of de Speler Wel een NPC is
	{
		new npcname[MAX_PLAYER_NAME];
		GetPlayerName(playerid, npcname, sizeof(npcname)); //naam van npc
		if(!strcmp(npcname, "[Taxi]James", true)) //ff checken of de naam echt [Taxi]James is
		{
			PutPlayerInVehicle(playerid, TaxiVec, 0); //Zet de NPC in De Vehicle ;).
		}
		return 1;
	}
	new npcname[MAX_PLAYER_NAME];
	GetPlayerName(playerid, npcname, sizeof(npcname)); //naam van npc
	if(!strcmp(npcname, "[Taxi]Dave", true))
	{
		PutPlayerInVehicle(playerid, DaveVec, 0);
		return 1;
	}
	return 1;
}
replace your part (above) with that one:
Код:
public OnPlayerSpawn(playerid)
{
	if(IsPlayerNPC(playerid)) //kijkt of de Speler Wel een NPC is
	{
		new npcname[MAX_PLAYER_NAME];
		GetPlayerName(playerid, npcname, sizeof(npcname)); //naam van npc
		if(!strcmp(npcname, "[Taxi]James", true)) //ff checken of de naam echt [Taxi]James is
		{
			PutPlayerInVehicle(playerid, TaxiVec, 0); //Zet de NPC in De Vehicle ;).
			return 1;
		}
		else if(!strcmp(npcname, "[Taxi]Dave", true))
		{
			PutPlayerInVehicle(playerid, DaveVec, 0);
			return 1;
		}
	}
	return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)