[Include] [0.3z]a_OnPlayerShootVehiclePart
#28

Quote:
Originally Posted by Mauzen
Посмотреть сообщение
The Enable... functions arent needed here. In some cases it could be useful to disable it again, so you should rather change them to setters with a parameter (you could also replace them with defines, thats the fastest way to handle getter/setter-functions in pawn).
The reason why samp uses such "one-time-enablers" is probably because they change the way the server is initialized, and it would be pretty difficult or technically impossible to disable them during the server runtime.
Here it would be no problem, and, as said, in some cases even pretty useful, to disable the detecions.

Nice work nevertheless.


Im also curious, but too lazy to test, if the OnPlayerWeaponShot offsets are relative to the rotation/angle. If they are, this should work correctly. Would be pretty useless to give unrotated offsets though, but maybe thats the way GTA provides that data.
Tonight i will test if the include needs angles
Quote:
Originally Posted by Kar
Посмотреть сообщение
True but I did find a small issue with some rotations but nevertheless it basically works

this is indeed an issue

"- Not all vehicles have the right offset for the vehicle parts (Wheels only). I will improve the offsets later."

also.. idk but are all the wheel components the same size? maybe you could also consider that for more accuracy *shrugs*
Why are you being so negative? The include is not even a week released. Please give it time. I will improve the offsets this week and i will more vehicle parts. Also about the wheel components, i dont improved the wheels yet. Will also be done this week.
Quote:
Originally Posted by [uL]Pottus
Посмотреть сообщение
There is a much better way to detect gas tank shots and tires.

Note that you'll need to do a few corrections for some vehicles tires such as the trashmaster.

pawn Код:
new Float:dist;
        new Float:width;
       
        new line[128];

        GetVehicleModelInfo(GetVehicleModel(hitid), VEHICLE_MODEL_INFO_SIZE, width, Float:y, Float:z);
        format(line, sizeof(line), "Vehicle width: %f", width);
        SendClientMessage(playerid, -1, line);

        GetVehicleModelInfo(GetVehicleModel(hitid), VEHICLE_MODEL_INFO_PETROLCAP, Float:x, Float:y, Float:z);
        dist=GetDistance(x,y,z,fX,fY,fZ);
        format(line, sizeof(line), "Fuel tank Distance: %f", dist);
        SendClientMessage(playerid, -1, line);
       
        GetVehicleModelInfo(GetVehicleModel(hitid), VEHICLE_MODEL_INFO_WHEELSFRONT, Float:x, Float:y, Float:z);
        new Float:FrontRight = x;
        new Float:FrontLeft = x-width;
       
        dist=GetDistance(FrontRight,y,z,fX,fY,fZ);
        format(line, sizeof(line), "Front Right Distance: %f", dist);
        SendClientMessage(playerid, -1, line);

        dist=GetDistance(FrontLeft,y,z,fX,fY,fZ);
        format(line, sizeof(line), "Front Left Distance: %f", dist);
        SendClientMessage(playerid, -1, line);

        GetVehicleModelInfo(GetVehicleModel(hitid), VEHICLE_MODEL_INFO_WHEELSREAR, Float:x, Float:y, Float:z);
        new Float:RearRight = x;
        new Float:RearLeft = x-width;

        dist=GetDistance(RearRight,y,z,fX,fY,fZ);
        format(line, sizeof(line), "Read Right Distance: %f", dist);
        SendClientMessage(playerid, -1, line);

        dist=GetDistance(RearLeft,y,z,fX,fY,fZ);
        format(line, sizeof(line), "Rear Left Distance: %f", dist);
        SendClientMessage(playerid, -1, line);
I already tried the Petrol Cap with GetVehicleModelInfo but it doesnt seem te work accurate. About the distance nice suggestion.
Quote:
Originally Posted by Luis-
Посмотреть сообщение
How could I add checks to see if the vehicles tire has already been shot at?
Tonight i will make a quick update with a check for the vehicle tires. Thanks for the suggestion.
Reply


Messages In This Thread
[0.3z]a_OnPlayerShootVehiclePart - by Admigo - 19.01.2014, 19:33
Respuesta: [0.3z]a_OnPlayerShootVehiclePart - by Swedky - 19.01.2014, 19:37
Re: [0.3z]a_OnPlayerShootVehiclePart - by Patrick - 19.01.2014, 19:39
Re: [0.3z]a_OnPlayerShootVehiclePart - by Admigo - 19.01.2014, 19:45
Re: [0.3z]a_OnPlayerShootVehiclePart - by KingHual - 19.01.2014, 19:51
Re: [0.3z]a_OnPlayerShootVehiclePart - by Pottus - 19.01.2014, 20:05
Re: [0.3z]a_OnPlayerShootVehiclePart - by Admigo - 19.01.2014, 20:13
Re: [0.3z]a_OnPlayerShootVehiclePart - by Akcent_Voltaj - 20.01.2014, 14:26
Re: [0.3z]a_OnPlayerShootVehiclePart - by iZN - 20.01.2014, 15:24
Re: [0.3z]a_OnPlayerShootVehiclePart - by Lordzy - 20.01.2014, 15:58
Re: [0.3z]a_OnPlayerShootVehiclePart - by PaulDinam - 20.01.2014, 18:17
Re: [0.3z]a_OnPlayerShootVehiclePart - by Admigo - 20.01.2014, 20:13
Re: [0.3z]a_OnPlayerShootVehiclePart - by Kar - 21.01.2014, 00:10
Re: [0.3z]a_OnPlayerShootVehiclePart - by Admigo - 21.01.2014, 07:33
Re: [0.3z]a_OnPlayerShootVehiclePart - by PaulDinam - 21.01.2014, 15:15
Re: [0.3z]a_OnPlayerShootVehiclePart - by Ace155 - 21.01.2014, 15:55
Re: [0.3z]a_OnPlayerShootVehiclePart - by Admigo - 21.01.2014, 16:22
Re: [0.3z]a_OnPlayerShootVehiclePart - by Diesel5 - 21.01.2014, 17:25
Re: [0.3z]a_OnPlayerShootVehiclePart - by Admigo - 21.01.2014, 20:37
Re: [0.3z]a_OnPlayerShootVehiclePart - by PT - 21.01.2014, 20:47
Re: [0.3z]a_OnPlayerShootVehiclePart - by Kar - 21.01.2014, 20:58
Re: [0.3z]a_OnPlayerShootVehiclePart - by Admigo - 21.01.2014, 21:03
Re: [0.3z]a_OnPlayerShootVehiclePart - by Kar - 21.01.2014, 23:12
Re: [0.3z]a_OnPlayerShootVehiclePart - by Mauzen - 21.01.2014, 23:25
Re: [0.3z]a_OnPlayerShootVehiclePart - by Kar - 21.01.2014, 23:48
Re: [0.3z]a_OnPlayerShootVehiclePart - by Pottus - 22.01.2014, 03:17
Re: [0.3z]a_OnPlayerShootVehiclePart - by Luis- - 22.01.2014, 13:58
Re: [0.3z]a_OnPlayerShootVehiclePart - by Admigo - 22.01.2014, 14:30
Re: [0.3z]a_OnPlayerShootVehiclePart - by Admigo - 22.01.2014, 20:55
Re: [0.3z]a_OnPlayerShootVehiclePart - by Kar - 22.01.2014, 22:39
Re: [0.3z]a_OnPlayerShootVehiclePart - by Admigo - 29.01.2015, 16:55
Re: [0.3z]a_OnPlayerShootVehiclePart - by Ritzy2K - 24.02.2015, 18:28
Re: [0.3z]a_OnPlayerShootVehiclePart - by 26_RUSSS - 18.03.2015, 23:29
Re: [0.3z]a_OnPlayerShootVehiclePart - by Abagail - 19.03.2015, 02:30
Re: [0.3z]a_OnPlayerShootVehiclePart - by IzadorO - 18.06.2015, 19:09
Re: [0.3z]a_OnPlayerShootVehiclePart - by TheArcher - 18.06.2015, 19:27

Forum Jump:


Users browsing this thread: 1 Guest(s)