SA-MP Forums Archive
Sniper aim vs SetPlayerAttachedObject - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP (https://sampforum.blast.hk/forumdisplay.php?fid=3)
+--- Forum: Bug Reports (https://sampforum.blast.hk/forumdisplay.php?fid=20)
+--- Thread: Sniper aim vs SetPlayerAttachedObject (/showthread.php?tid=224901)



Sniper aim vs SetPlayerAttachedObject - California - 12.02.2011

If you aim your sniper, you can see your attached objects on your head bone (glasses/hats/rags/etc...).

I don't think this can be prevented with scripting...




Re: Sniper aim vs SetPlayerAttachedObject - Ruffles. - 12.02.2011

Yup, this is a confirmed bug.


Re: Sniper aim vs SetPlayerAttachedObject - kurta999 - 13.02.2011

Confirmed, it's very shit bug.


Re: Sniper aim vs SetPlayerAttachedObject - Lewwy - 13.02.2011

Confirmed also.


Re: Sniper aim vs SetPlayerAttachedObject - Calgon - 13.02.2011

Confirmed.

Quote:

I don't think this can be prevented with scripting...

It can be patched by temporarily removing the object when a player is aiming (via scripting).


Re: Sniper aim vs SetPlayerAttachedObject - iRana - 14.02.2011

Ye it is Also with camera aim


Re: Sniper aim vs SetPlayerAttachedObject - Meinstad - 15.02.2011

It's with all guns that has a sight.


Re: Sniper aim vs SetPlayerAttachedObject - Calgon - 15.02.2011

http://www.fwright.com/sa-mp/objects.txt

Untested. Scripted it in a rush.

Usage:

Remove an object:
pawn Code:
RemovePlayerAttachedObjectEx(playerid, index);
Attach an object:
pawn Code:
SetPlayerAttachedObjectEx(playerid, index, modelid, bone, Float:OffsetX, Float:OffsetY, Float:OffsetZ, Float:RotX, Float:RotY, Float:RotZ, Float:ScaleX, Float:ScaleY, Float:ScaleZ);
Attach objects that are cached but not physically present:
pawn Code:
ReAttachObjects(playerid);



Re: Sniper aim vs SetPlayerAttachedObject - Calgon - 16.02.2011

Quote:
Originally Posted by Las Venturas CNR
View Post
I do believe "KEY_AIM" exists?
I've seen a script that uses it before.
There's nothing in a_samp.inc for KEY_AIM (or the wiki), it was probably just a redefine for KEY_SECONDARY_ATTACK.


Re: Sniper aim vs SetPlayerAttachedObject - Hiddos - 16.02.2011

Quote:
Originally Posted by Calgon
View Post
There's nothing in a_samp.inc for KEY_AIM (or the wiki), it was probably just a redefine for KEY_SECONDARY_ATTACK.
https://sampwiki.blast.hk/wiki/GetPlayerKeys
Note that KEY_AIM is defined to 128 and KEY_SECONDARY_ATTACK to 16.
Worth trying