PDA

View Full Version : Bot won't set angle


lolumadd_
27/04/2012, 09:47 PM
SetPlayerFacingAngle

and

SetMyFacingAngle

on my NPC's

REFUSE to function. Any help?

Also, If you teleport a bot to you, it teleports the first time. Everytime I try to teleport it after that, it doesn't work until I go a far enough distance so the bot streams out.

If you spawn the bot it teleports to the last place you teleported it to

ReneG
27/04/2012, 09:51 PM
It's SetMyFacingAngle (http://wiki.sa-mp.com/wiki/NPC:SetMyFacingAngle) for NPC's.

Crazymax
27/04/2012, 09:53 PM
SetMyFacingAngle(270);

lolumadd_
27/04/2012, 10:01 PM
But it changes dynamically...and I can't find how to make the script and botscript communicate because the dam OnClientMessage callback in the NPC mode won't work!

Crazymax
27/04/2012, 10:07 PM
what? tell me what you mean... explain

http://wiki.sa-mp.com/wiki/NPC:OnClientMessage

here.. and search for more examples on the forums.. i'm sure there's plenty

lolumadd_
27/04/2012, 10:26 PM
and SetMyFacingAngle via the bot script doesn't work either.

Danny1
27/04/2012, 10:29 PM
Post here you code.

lolumadd_
27/04/2012, 10:31 PM
SetPlayerFacingAngle and SetMyFacingAngle won't have any effect. I don't have ANY other code that could possibly be interfering.

Crazymax
27/04/2012, 10:46 PM
why not effect? Did u try in your gamemode/bot fs? SetMyFacingAngle

NOT SetPlayerFacingAngle

lolumadd_
29/04/2012, 12:04 AM
Also, If you teleport a bot to you, it teleports the first time. Everytime I try to teleport it after that, it doesn't work until I go a far enough distance so the bot streams out.

REALLY need help on this.

lolumadd_
29/04/2012, 03:51 AM
Please someone give me some hints on what could be causing this issue..

MP2
29/04/2012, 03:53 AM
Do you want the NPC to stand still or walk?

lolumadd_
29/04/2012, 04:00 AM
My god. I fixed the problem. I am so dam dumb! I found some pesky code under OnPlayerUpdate which returned 0. Thank you all anyways.