19.10.2013, 00:35
Hey, I got a little problem that the bot is running through objects and buildings. The chasing works well but it literally teleports to the playerid once there is a object in between them. I use RNPC
pawn Код:
public BotFunctioning(playerid)
{
new target = GetClosestBot(playerid);
if(GetDistanceBetweenBots(target, playerid) <= 20)
{
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X,Y,Z);
RNPCRunTo(target,X,Y,Z);
/*if(GetDistanceBetweenBots(target, playerid) <= 1.5)
{
SendClientMessage(playerid, -1,"The bot got you.");
}*/
}
else return 1;
return 1;
}