Plan B

General => Bug Reports => Fixed => Topic started by: Savant on December 14, 2016, 03:41:42 am

Title: [Fixed]Helmet blocking sniper target view
Post by: Savant on December 14, 2016, 03:41:42 am
as u guys know when we wearing a helmet
(http://i.imgur.com/B7CciMt.png)
and if we right click that must be like this
(http://i.imgur.com/UInEfob.png)
so its like blocking the view when we are targeting something with sniper. is this bug or (something else)?
Title: Re: Helmet blocking sniper target view
Post by: Nazi on December 14, 2016, 04:24:00 am
I think it's depends on the skin, you use the skin 91, and with the helmet when aiming with the esnaiper it looks good, without the bug....
Title: Re: Helmet blocking sniper target view
Post by: Savant on December 14, 2016, 04:29:59 am
so not at all skins looks good to use the sniper when wearing helmet
Title: Re: Helmet blocking sniper target view
Post by: Nazi on December 14, 2016, 04:37:08 am
In most skin, the error happens...I think it's depends on the skin
Title: Re: Helmet blocking sniper target view
Post by: Niks on December 14, 2016, 06:10:36 am
In most skin, the error happens...I think it's depends on the skin
Title: Re: Helmet blocking sniper target view
Post by: Finisher on December 14, 2016, 06:52:22 am
 You're not supposed to have a helmet on foot to begin with so it was bugged, /bh to remove the helmet when you're not in a vehicle
Title: Re: Helmet blocking sniper target view
Post by: Savant on December 14, 2016, 07:49:02 am
You're not supposed to have a helmet on foot to begin with so it was bugged, /bh to remove the helmet when you're not in a vehicle
i know, for me, it looks cool wearing helmet even on foot  ;D
Title: Re: Helmet blocking sniper target view
Post by: Luca_Brasi on December 14, 2016, 08:02:56 am
Unfixable SAMP bug. And yeah it's worse with some skins than others...
Title: Re: Helmet blocking sniper target view
Post by: Miau on December 14, 2016, 09:41:57 am
Unfixable SAMP bug. And yeah it's worse with some skins than others...

It's a SAMP bug, but it's fixable.
Title: Re: Helmet blocking sniper target view
Post by: Altus_Demens on December 15, 2016, 12:26:10 am
If you aim sniper rifle, RPG, heat seeker or camera, all of your attached objects will be shown in the center of the screen. It is GTA:SA bug and afaik it cannot be 'cleanly' fixed scriptwise. But there are a lot of workarounds. I had made this when playing with objects:
Code: [Select]
new aobjects[MAX_PLAYERS][MAX_PLAYER_ATTACHED_OBJECTS][4];
new Float: aobjects_floats[MAX_PLAYERS][MAX_PLAYER_ATTACHED_OBJECTS][9];
new bool: scope_objects[MAX_PLAYERS][MAX_PLAYER_ATTACHED_OBJECTS];

SetPlayerAttachedObjectEx(playerid, index, modelid, bone, Float: fOffsetX = 0.0, Float: fOffsetY = 0.0, Float: fOffsetZ = 0.0, Float: fRotX = 0.0,
Float: fRotY = 0.0, Float: fRotZ = 0.0, Float: fScaleX = 1.0, Float: fScaleY = 1.0, Float: fScaleZ = 1.0, materialcolor1 = 0, materialcolor2 = 0) {
aobjects[playerid][index][0] = modelid;
aobjects[playerid][index][1] = bone;
aobjects[playerid][index][2] = materialcolor1;
aobjects[playerid][index][3] = materialcolor2;

aobjects_floats[playerid][index][0] = fOffsetX;
aobjects_floats[playerid][index][1] = fOffsetY;
aobjects_floats[playerid][index][2] = fOffsetZ;
aobjects_floats[playerid][index][3] = fRotX;
aobjects_floats[playerid][index][4] = fRotY;
aobjects_floats[playerid][index][5] = fRotZ;
aobjects_floats[playerid][index][6] = fScaleX;
aobjects_floats[playerid][index][7] = fScaleY;
aobjects_floats[playerid][index][8] = fScaleZ;

SetPlayerAttachedObject(playerid, index, modelid, bone, fOffsetX, fOffsetY, fOffsetZ, fRotX, fRotY, fRotZ, fScaleX, fScaleY, fScaleZ, materialcolor1,
materialcolor2);
}

GetPlayerAttachedObjectEx(playerid, index, &modelid, &bone, &Float: fOffsetX, &Float: fOffsetY, &Float: fOffsetZ, &Float: fRotX, &Float: fRotY, &Float: fRotZ,
&Float: fScaleX, &Float: fScaleY, &Float: fScaleZ, &materialcolor1, &materialcolor2) {
modelid = aobjects[playerid][index][0];
bone = aobjects[playerid][index][1];
materialcolor1 = aobjects[playerid][index][2];
materialcolor2 = aobjects[playerid][index][3];

fOffsetX = aobjects_floats[playerid][index][0];
fOffsetY = aobjects_floats[playerid][index][1];
fOffsetZ = aobjects_floats[playerid][index][2];
fRotX = aobjects_floats[playerid][index][3];
fRotY = aobjects_floats[playerid][index][4];
fRotZ = aobjects_floats[playerid][index][5];
fScaleX = aobjects_floats[playerid][index][6];
fScaleY = aobjects_floats[playerid][index][7];
fScaleZ = aobjects_floats[playerid][index][8];
}

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) {
if ((newkeys & KEY_HANDBRAKE) ^ (oldkeys & KEY_HANDBRAKE)) {
new index = GetPlayerAnimationIndex(playerid);
new weapon = GetPlayerWeapon(playerid);

// Checking all possible animations while/before shooting. Looks kinda scary, but it doesn't affect performance at all
if (((weapon >= 34 && weapon <= 36) || weapon == 43) && ((index >= 1160 && index <= 1163) || index == 1167 || index == 1365 || index == 1069 ||
index == 1070 || index == 1158 || index == 1159 || index == 1196 || index == 1223 || index == 1183 || index == 1274 || index == 1256 ||
index == 1132 || index == 1133 || index == 1231 || index == 1266 || index == 1188 || index == 1189 || index == 1164 || index == 1188 ||
index == 1246 || index == 1233 || index == 1267)) {
if (newkeys & KEY_HANDBRAKE) {
for (new i = 0; i < MAX_PLAYER_ATTACHED_OBJECTS; i++) {
if (IsPlayerAttachedObjectSlotUsed(playerid, i)) {
scope_objects[playerid][i] = true;
RemovePlayerAttachedObject(playerid, i);
}
else scope_objects[playerid][i] = false;
}
}
else {
new modelid, bone, Float: fOffsetX, Float: fOffsetY, Float: fOffsetZ, Float: fRotX, Float: fRotY, Float: fRotZ, Float: fScaleX,
Float: fScaleY, Float: fScaleZ, materialcolor1, materialcolor2;

for (new i = 0; i < MAX_PLAYER_ATTACHED_OBJECTS; i++) if (scope_objects[playerid][i] == true) {
GetPlayerAttachedObjectEx(playerid, i, modelid, bone, fOffsetX, fOffsetY, fOffsetZ, fRotX, fRotY, fRotZ, fScaleX, fScaleY, fScaleZ,
materialcolor1, materialcolor2);
SetPlayerAttachedObjectEx(playerid, i, modelid, bone, fOffsetX, fOffsetY, fOffsetZ, fRotX, fRotY, fRotZ, fScaleX, fScaleY, fScaleZ,
materialcolor1, materialcolor2);
}
}
}
}
}
Title: Re: Helmet blocking sniper target view
Post by: Jonne on February 02, 2017, 03:19:14 am
Thanks Altus, I added it, so it should be fixed now.