SA-MP Forums Archive
[BUG] Deattaching camera from bot - 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)
+--- Thread: [BUG] Deattaching camera from bot (/showthread.php?tid=329779)



[BUG] Deattaching camera from bot - OKStyle - 30.03.2012

When we attach camera to object, attached to vehicle which npc driver, camera deattached, when bot stream out. Coords of deattached camera will be place of stream out. And when bot stream in, camera attaching to object again.


Re: [BUG] Deattaching camera from bot - kurta999 - 30.03.2012

Comfirmed.

The attached object position should be updated, when the NPC stream in for you.


Re: [BUG] Deattaching camera from bot - OKStyle - 30.03.2012

It is. Guy, who says abiut this bug want, that camera would be attaching everytime, but I think it is impossible.


Re: [BUG] Deattaching camera from bot - Biesmen - 30.03.2012

Quote:
Originally Posted by OKStyle
Посмотреть сообщение
It is. Guy, who says abiut this bug want, that camera would be attaching everytime, but I think it is impossible.
What?

Anyway, confirmed.


Re: [BUG] Deattaching camera from bot - Mikeyfry - 30.03.2012

Quote:
Originally Posted by Biesmen
Посмотреть сообщение
What?
It's my trouble. My steps:
1. I attach object to vehicle;
2. Putted NPC in vehicle;
3. Attach camera to object in step 1;
4. When the NPC is far away from player, then camera stop and no update; >;(
5. When a player catches up the NPC, then camera again update.
Hope clearly described


Re: [BUG] Deattaching camera from bot - Shadow_ - 30.03.2012

Could you post a video of what happens?


Re: [BUG] Deattaching camera from bot - MP2 - 30.03.2012

Put the player in to spectating mode. This means it streams based on where their camera is, not the player's character.

pawn Код:
// Create object
// Attach to vehicle

TogglePlayerSpectating(playerid, 1);

// Attach their camera to the object



Re: [BUG] Deattaching camera from bot - Mikeyfry - 30.03.2012

Quote:
Originally Posted by Shadow_
Посмотреть сообщение
Could you post a video of what happens?
It's been wery hard for me
You may use my code to see trouble:
in your NPC filterscript:
PHP код:
new Cam;
Cam CreateObject(193000.00.00.00.00.00.0700);//invisible object
AttachObjectToVehicle(CamYourNPCVehicle,-2.0,0.0,-2.0,0.0,0.0,0.0);//in my case it's Maveric 
In public OnPlayerCommandText:
PHP код:
if (strcmp("/SpyCam"cmdtexttrue) == 0)
{
AttachCameraToObject(playeridCam);

Now if you go away from the NPC and enter /SpyCam, camera spawned in 0,0,0. If you teleport to NPC and enter /SpyCam, camera spawned normally with vehicle.


Re: [BUG] Deattaching camera from bot - kurta999 - 30.03.2012

Quote:
Originally Posted by MP2
Посмотреть сообщение
Put the player in to spectating mode. This means it streams based on where their camera is, not the player's character.

pawn Код:
// Create object
// Attach to vehicle

TogglePlayerSpectating(playerid, 1);

// Attach their camera to the object
Thanks! Works well