SA-MP Forums Archive
Body guard, - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Body guard, (/showthread.php?tid=198300)



Body guard, - knackworst - 11.12.2010

Hi, is it possible to let an NPC walk next to you whatever road you take?

I don\'t think it is, but maybe with setplayerpos?


Re: Body guard, - Lynn - 11.12.2010

Huh? Please explain...better.

Can\'t really understand you.


Re: Body guard, - knackworst - 11.12.2010

like, you make a body guard, you (attach) a person who follows you and who is an NPC


Re: Body guard, - WillyP - 11.12.2010

Yes, use offsets.


Re: Body guard, - Lynn - 11.12.2010

Yes, there is a way for a NPC to follow you.

But seeing you are a beginner, it will be pretty difficult(Even I don\'t know how. xD)

Try searching. I believe there was a FS released for NPC\'s to follow you.(May be wrong.)


Re: Body guard, - WillyP - 11.12.2010

Quote:
Originally Posted by Lynn
View Post
Yes, there is a way for a NPC to follow you.

But seeing you are a beginner, it will be pretty difficult(Even I don\'t know how. xD)

Try searching. I believe there was a FS released for NPC\'s to follow you.(May be wrong.)
So you\'ve just called yourself a beginner..


Re: Body guard, - Lynn - 11.12.2010

I said, even I don\'t know how, as in, even experienced people don\'t know how.

Expressing, the challenge in it.

In other-words, not a simple task.

When it comes to bots, and making them do stuff, other then simple tasks,

yes I am a beginner in that.


Re: Body guard, - Matthew_Johnston - 11.12.2010

Maybe if you Get that Easy NPC Control Plugin and OnPlayerUpdateu you set it to WalkNPC( youre Pos )
Im not sure, it could work


Re: Body guard, - knackworst - 12.12.2010

mhh, yeah I saw that controllable NPC thing... but I don\'t really see a function in it what can help me...


Re: Body guard, - Marcel - 12.12.2010

You can use a timer to get your position every x seconds, and then let the NPC walk to that position, using the
pawn Code:
NPC_WalkTo(npcid,Float:X,Float:Y,Float:Z,is_z_map);
function.


Re: Body guard, - knackworst - 12.12.2010

hmm, yes but would it be smooth?


Re: Body guard, - Marcel - 12.12.2010

Try it, I\'ve never been using a NPC.


Re: Body guard, - MestreKiller - 12.12.2010

Use a timer to get the closest player position with GetDistanceBetweenPlayers (iv seen it somewhere), the make the bot follow it


Re: Body guard, - knackworst - 13.12.2010

Quote:
Originally Posted by [OC]MestreKiller
View Post
Use a timer to get the closest player position with GetDistanceBetweenPlayers (iv seen it somewhere), the make the bot follow it
yes, but how the heck will I make a bot near my position...?