AttachObjectToPlayer (NPC): Problem
#1

Hello, I'm new here =)

I've got a problem with this fuction, I'm trying to attach some objects to a NPC which is close to the objects I made.
am I or the fuction doesn't work with the NPCs? beacause when I change the playerid to an another one of a player, it works fine....
Код:
AttachObjectToPlayer(carroobj_id[21], NPC_carro[1], 0.0, 4.0, 4.0, 0.0, 0.0, 0.0);
And yes, I'm sure the bot's id is that one, because I've putted the NPC into a vehicle before.
I don't think I've made an error...

does anyone know how to make it work?
Reply
#2

I've just noticed that sometimes it works, but most of the time it doesn't... I haven't change anything of my script, really... this makes me confused :S

here's the full cmd code:
http://pastebin.com/NtWdVy2z

Код:
SetPlayerPos(playerid,cRandomSpawns[rand][PlayerX],cRandomSpawns[rand][PlayerY],cRandomSpawns[rand][PlayerZ]);
SetPlayerFacingAngle(playerid,cRandomSpawns[rand][PlayerAngle]);
seems if I do not get teleported by those two lines, the object doesn't attach to the bot.
how does the teleport influence the attaching?
Reply
#3

Please guys, answe me =(
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)