AttachObjectToPlayer (NPC): Problem - 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: AttachObjectToPlayer (NPC): Problem (
/showthread.php?tid=160435)
AttachObjectToPlayer (NPC): Problem -
xKaMiKaZex - 16.07.2010
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?
Re: AttachObjectToPlayer (NPC): Problem -
xKaMiKaZex - 16.07.2010
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?
Re: AttachObjectToPlayer (NPC): Problem -
xKaMiKaZex - 17.07.2010
Please guys, answe me =(