Posts: 1,042
Threads: 46
Joined: Jun 2013
Hello! Correct the bug with the attached objects to the player (
SetPlayerAttachedObject), they are very interfering when aiming with a sniper rifle, a rocket launcher and a photo camera. I specially recorded the video, it looks very awful and brings a lot of inconvenience.
Video: https://www.youtube.com/watch?v=kjK6GVHwiTc
I hope this bug will be fixed in the future, thanks for your understanding.
Posts: 1,779
Threads: 126
Joined: Oct 2010
I think it is a gta issue, not samp
Posts: 1,042
Threads: 46
Joined: Jun 2013
Quote:
Originally Posted by adri1
I think it is a gta issue, not samp
|
I do not want to advertise anything, but in the adaptation of SAMP to CRMP this bug has been fixed. Maybe there will also be made in 0.3.7 R2?
http://sampsrv.ru/
Posts: 1,779
Threads: 126
Joined: Oct 2010
Try this (not tested):
Код:
#define KEY_HANDBRAKE 128 //Right mouse button
#define PRESSED(%0) (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
#define RELEASED(%0) (((newkeys & (%0)) != (%0)) && ((oldkeys & (%0)) == (%0)))
new Player_Affected_Fix[MAX_PLAYERS];
public OnPlayerDisconnect(playerid, reason)
{
Player_Affected_Fix[playerid] = false;
return 1;
}
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
{
if(PRESSED(KEY_HANDBRAKE))
{
if(GetPlayerWeapon(playerid) == 34) //sniper
{
for(new i = 0; i != MAX_PLAYER_ATTACHED_OBJECTS; i ++) RemovePlayerAttachedObject(playerid, i);
Player_Affected_Fix[playerid] = true;
}
}
else if(RELEASED(KEY_HANDBRAKE))
{
if(Player_Affected_Fix[playerid])
{
// Attach player objects
Player_Affected_Fix[playerid] = false;
}
}
}
return 1;
}
Posts: 1,042
Threads: 46
Joined: Jun 2013
Quote:
Originally Posted by adri1
|
This will remove temporarily the object for absolutely all players who are seeing you.
Can you imagine how it looks strange and not beautiful?
Posts: 1,779
Threads: 126
Joined: Oct 2010
Yes, I hadn't thought of that