How I can get more bots on my checkpoints
#1

Well some bots are going to the checkpoint when is activated but is a small ammount so my question is how I can get more bots in the checkpoint

There is the code:

Code:
forward crearPuntoControl();
public crearPuntoControl()
{
	idPuntoActual = random(sizeof(puntosControl));
	foreach(new i : Player)
	{
		SendClientMessage(i, -1, getMensaje(i, "ANNOUNCE0"));
		SendClientMessage(i, -1, getMensaje(i, "ANNOUNCE1"));
		getMensajeA(i, "ANNOUNCE2", consulta, sizeof(consulta), lugarPunto[idPuntoActual]);
		SendClientMessage(i, -1, consulta);
		SendClientMessage(i, -1, getMensaje(i, "ANNOUNCE3"));
		SendClientMessage(i, ROJO_FF, getMensaje(i, "ANNOUNCE4"));
		SetPlayerCheckpoint(i, puntosControl[idPuntoActual][0], puntosControl[idPuntoActual][1], puntosControl[idPuntoActual][2], TAMANO_PUNTO);
	}
	new
        Float:pos_x,
        Float:pos_y,
        Float:pos_z;
	pos_x = puntosControl[idPuntoActual][0]; 
	pos_y = puntosControl[idPuntoActual][1];
	pos_z = puntosControl[idPuntoActual][2];
	for(new i = 1; i<=MAX_ZOMBIES-(MAX_ZOMBIES/7); i++)
	{
		if(FCNPC_IsValid(MAX_PLAYERS-i) && !FCNPC_IsStreamedForAnyone(MAX_PLAYERS-i))
		{
			FCNPC_SetPosition(i, pos_x, pos_y, pos_z);
			getMovementPosition(pos_x, pos_y, pos_z);
			FCNPC_GoTo(i, pos_x, pos_y, pos_z + 1.2, MOVE_TYPE_RUN, MOVE_SPEED_RUN);
		}
	}
}
Reply
#2

pawn Code:
for(new i = 1; i<=MAX_ZOMBIES-(MAX_ZOMBIES/7); i++)
Obviously you have a limitation here, so disable it:

pawn Code:
for(new i = 1; i<=MAX_ZOMBIES; i++)
Reply
#3

Why not just use foreach to scroll through each player. You can tag your bots as Zombies.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)