09.03.2015, 16:44
Quote:
C:\Users\server\Desktop\NVCNR\NVCNR-0.3z\pawno\include\a_vshot.inc(27 : error 017: undefined symbol "BULLET_HIT_TYPE_VEHICLE" |
Код:
forward OnPlayerShootVehiclePart(playerid, weaponid, vehicleid,hittype); public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ) { switch(hittype) { case BULLET_HIT_TYPE_VEHICLE: { new Float:fSet[9]; new modelid = GetVehicleModel(hitid); GetVehicleModelInfo(modelid, VEHICLE_MODEL_INFO_PETROLCAP,fSet[0], fSet[1], fSet[2]); GetVehicleModelInfo(modelid, VEHICLE_MODEL_INFO_WHEELSFRONT, fSet[3], fSet[4], fSet[5]); GetVehicleModelInfo(modelid, VEHICLE_MODEL_INFO_WHEELSREAR, fSet[6], fSet[7], fSet[8]); if(fX >= VehicleShotInfo[modelid-400][VS_PetrolX]-0.15 && fX <= VehicleShotInfo[modelid-400][VS_PetrolX]+0.15 && fY >= VehicleShotInfo[modelid-400][VS_PetrolY]-0.15 && fY <= VehicleShotInfo[modelid-400][VS_PetrolY]+0.15 && fZ >= VehicleShotInfo[modelid-400][VS_PetrolZ]-0.15 && fZ <= VehicleShotInfo[modelid-400][VS_PetrolZ]+0.15) { if(EnablePetrolCapExplosionVar==1) { new Float:vPosx,Float:vPosy,Float:vPosz; GetVehiclePos(hitid, vPosx,vPosy,vPosz); CreateExplosion(vPosx,vPosy,vPosz, 3, 30.0); SetVehicleToRespawn(hitid); } CallLocalFunction("OnPlayerShootVehiclePart", "iiii", playerid, weaponid, hitid,BULLET_HIT_PETROL_TANK); } else if(fX >= fSet[3]-2.4 && fX <= fSet[3] && fY >= fSet[4]-0.4 && fY <= fSet[4]+0.4 && fZ >= fSet[5]-0.4 && fZ <= fSet[5]+0.4) { if(EnableWheelTirePopVar==1) { if(GetVehicleTireStatus(hitid,VEHICLE_LEFT_FRONT_WHEEL)==0) { SetVehicleTireStatus(hitid,VEHICLE_LEFT_FRONT_WHEEL); } //else SendClientMessage(playerid,-1,"This tire is already popped!"); } CallLocalFunction("OnPlayerShootVehiclePart", "iiii", playerid, weaponid, hitid,BULLET_HIT_LEFT_FRONT_WHEEL); } else if(fX >= fSet[3]-0.4 && fX <= fSet[3]+0.4 && fY >= fSet[4]-0.4 && fY <= fSet[4]+0.4 && fZ >= fSet[5]-0.4 && fZ <= fSet[5]+0.4) { if(EnableWheelTirePopVar==1) { if(GetVehicleTireStatus(hitid,VEHICLE_RIGHT_FRONT_WHEEL)==0) { SetVehicleTireStatus(hitid,VEHICLE_RIGHT_FRONT_WHEEL); } //else SendClientMessage(playerid,-1,"This tire is already popped!"); } CallLocalFunction("OnPlayerShootVehiclePart", "iiii", playerid, weaponid, hitid,BULLET_HIT_RIGHT_FRONT_WHEEL); } else if(fX >= fSet[6]-2.4 && fX <= fSet[6] && fY >= fSet[7]-0.4 && fY <= fSet[7]+0.4 && fZ >= fSet[8]-0.4 && fZ <= fSet[8]+0.4) { if(EnableWheelTirePopVar==1) { if(GetVehicleTireStatus(hitid,VEHICLE_LEFT_BACK_WHEEL)==0) { SetVehicleTireStatus(hitid,VEHICLE_LEFT_BACK_WHEEL); } //else SendClientMessage(playerid,-1,"This tire is already popped!"); } CallLocalFunction("OnPlayerShootVehiclePart", "iiii", playerid, weaponid, hitid,BULLET_HIT_LEFT_BACK_WHEEL); } else if(fX >= fSet[6]-0.4 && fX <= fSet[6]+0.4 && fY >= fSet[7]-0.4 && fY <= fSet[7]+0.4 && fZ >= fSet[8]-0.4 && fZ <= fSet[8]+0.4) { if(EnableWheelTirePopVar==1) { if(GetVehicleTireStatus(hitid,VEHICLE_RIGHT_BACK_WHEEL)==0) { SetVehicleTireStatus(hitid,VEHICLE_RIGHT_BACK_WHEEL); } //else SendClientMessage(playerid,-1,"This tire is already popped!"); } CallLocalFunction("OnPlayerShootVehiclePart", "iiii", playerid, weaponid, hitid,BULLET_HIT_RIGHT_BACK_WHEEL); } if(EnableVehicleDamageVar==1) { if(IsVehicleOccupied(hitid)==0) { new Float:vHP; GetVehicleHealth(hitid,vHP); SetVehicleHealth(hitid,vHP-WeaponShotInfo[GetPlayerWeapon(playerid)-22][WS_Damage]); } } CallLocalFunction("OnPlayerShootVehiclePart", "iiii", playerid, weaponid, hitid,BULLET_HIT_BODY); } } #if defined hook_OnPlayerWeaponShot hook_OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ); #endif return 1; } #if defined _ALS_OnPlayerWeaponShot #undef OnPlayerWeaponShot #else #define _ALS_OnPlayerWeaponShot #endif #define OnPlayerWeaponShot hook_OnPlayerWeaponShot #if defined hook_OnPlayerWeaponShot forward hook_OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ); #endif public OnVehicleSpawn(vehicleid) { VehicleTire[vehicleid][0]=0; VehicleTire[vehicleid][1]=0; VehicleTire[vehicleid][2]=0; VehicleTire[vehicleid][3]=0; #if defined hook_OnVehicleSpawn hook_OnVehicleSpawn(vehicleid); #endif return 1; }