Author Topic: [Fixed]Helmet blocking sniper target view  (Read 8360 times)

Offline Savant

  • VIP
  • Newbie
  • **
  • Posts: 26
  • Rank: Punk-Ass Bitch
  • Score: 2175
  • Dahulukan Adab, baru Ilmu
    • Manhaj Salaf
[Fixed]Helmet blocking sniper target view
« on: December 14, 2016, 03:41:42 am »
as u guys know when we wearing a helmet

and if we right click that must be like this

so its like blocking the view when we are targeting something with sniper. is this bug or (something else)?
« Last Edit: February 07, 2017, 01:29:47 pm by Jonne »

Offline Nazi

  • Sr. Member
  • ****
  • Posts: 260
  • Rank: Unknown
  • Score: Unknown
  • In this game,i will be the best.
Re: Helmet blocking sniper target view
« Reply #1 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....
Me vs All

Offline Savant

  • VIP
  • Newbie
  • **
  • Posts: 26
  • Rank: Punk-Ass Bitch
  • Score: 2175
  • Dahulukan Adab, baru Ilmu
    • Manhaj Salaf
Re: Helmet blocking sniper target view
« Reply #2 on: December 14, 2016, 04:29:59 am »
so not at all skins looks good to use the sniper when wearing helmet
« Last Edit: December 14, 2016, 04:31:48 am by Savant »

Offline Nazi

  • Sr. Member
  • ****
  • Posts: 260
  • Rank: Unknown
  • Score: Unknown
  • In this game,i will be the best.
Re: Helmet blocking sniper target view
« Reply #3 on: December 14, 2016, 04:37:08 am »
In most skin, the error happens...I think it's depends on the skin
Me vs All

Offline Niks

  • VIP
  • Full Member
  • **
  • Posts: 123
  • Rank: Shooter
  • Score: 67011
  • GgT <3
Re: Helmet blocking sniper target view
« Reply #4 on: December 14, 2016, 06:10:36 am »
In most skin, the error happens...I think it's depends on the skin

Offline Finisher

  • VIP
  • Hero Member
  • **
  • Posts: 1034
  • Rank: Jacker
  • Score: 45472
  • Jerusalemite
Re: Helmet blocking sniper target view
« Reply #5 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

Offline Savant

  • VIP
  • Newbie
  • **
  • Posts: 26
  • Rank: Punk-Ass Bitch
  • Score: 2175
  • Dahulukan Adab, baru Ilmu
    • Manhaj Salaf
Re: Helmet blocking sniper target view
« Reply #6 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

Offline Luca_Brasi

  • VIP
  • Newbie
  • **
  • Posts: 29
  • Rank: Unknown
  • Score: Unknown
  • Miss me yet?
Re: Helmet blocking sniper target view
« Reply #7 on: December 14, 2016, 08:02:56 am »
Unfixable SAMP bug. And yeah it's worse with some skins than others...

Offline Miau

  • VIP
  • Hero Member
  • **
  • Posts: 565
  • Rank: Jacker
  • Score: 46079
Re: Helmet blocking sniper target view
« Reply #8 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.
Oh! I don't want to fight you, Jorah the Andal. What do I have to gain? If I win, I'm the shit who killed an old man. If I lose, I'm the shit who was killed by an old man.

~ Daario Naharis

Offline Altus_Demens

  • Admin
  • Hero Member
  • ****
  • Posts: 1119
  • Rank: Hoodsta
  • Score: 23951
Re: Helmet blocking sniper target view
« Reply #9 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);
}
}
}
}
}
A paltry man and poor of mind
At all things ever mocks;
For never he knows, what he ought to know,
That he is not free from faults.

Offline Jonne

  • Head Admin
  • Hero Member
  • *****
  • Posts: 1927
  • Rank: Chump
  • Score: 3751
Re: Helmet blocking sniper target view
« Reply #10 on: February 02, 2017, 03:19:14 am »
Thanks Altus, I added it, so it should be fixed now.