Posts: 97
Threads: 18
Joined: May 2012
Reputation:
0
Hello
I try to find out if you can detect the parts of the vehicle (when the player is on foot)
tank, trunk, hood
++
Posts: 168
Threads: 54
Joined: Jan 2015
Reputation:
0
use evf or vehicleplus its more friendly
Posts: 1,208
Threads: 36
Joined: Apr 2015
Quote:
Originally Posted by SetPlayerNameTag
use evf or vehicleplus its more friendly
|
EVF.inc only support wheel and petrolcap vehicleplus is already implemented in EVF
PHP код:
/*
VEHICLE_BODYPART_UNKNOWN
VEHICLE_BODYPART_FL_WHEEL - Front Left
VEHICLE_BODYPART_FR_WHEEL - Front Right
VEHICLE_BODYPART_BL_WHEEL - Back Left
VEHICLE_BODYPART_BR_WHEEL - Back Right
VEHICLE_BODYPART_PETROLCAP
*/
public OnPlayerShotVehicle(playerid,vehicleid,weaponid,Float:amount,bodypart){
return 1;
}
//edit
Compare for all vehicle parts is possible with
3DTryg.inc
PHP код:
GetVehiclePartPos(vehicleid,partid,&Float:tx,&Float:ty,&Float:tz,Float:offset_x=0.0,Float:offset_y=0.0,Float:offset_z=0.0);
/*
VEHICLE_PART_RFTIRE - Right Front tire
VEHICLE_PART_LFTIRE - Left Front tire
VEHICLE_PART_RRTIRE - Right Rear tire
VEHICLE_PART_LRTIRE - Left Rear tire
VEHICLE_PART_HOOD - In Front
VEHICLE_PART_TRUNK - Behind
VEHICLE_PART_ROOF - Roof
VEHICLE_PART_CHASSIS - Chassis
VEHICLE_PART_PETROLCAP - Petrolcap
*/
public OnPlayerWeaponShot(playerid,weaponid,hittype,hitid,Float:fX,Float:fY,Float:fZ){
if(hittype == BULLET_HIT_TYPE_VEHICLE){
GetWeaponShotPos(playerid,hittype,fX,fY,fZ);
//compare shot pos and part pos
}
return 1;
}