14.10.2017, 22:15
Tava querendo fazer com que os veiculos desocupados tambйm perdessem lataria ao serem atingindos, tentei assim:
Mas nada acontece...
O que estб errado?
Код:
public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ) { if(hittype == BULLET_HIT_TYPE_VEHICLE) { // dano em veiculos desocupados #define DEAGLE_DAMAGE 60 #define COMBATSHOTGUN_DAMAGE 64 #define SHOTGUN_DAMAGE 52 #define MP5_DAMAGE 28 #define SNIPER_DAMAGE 45 #define RIFLE_DAMAGE 38 #define M4_DAMAGE 35 #define AK47_DAMAGE 30 #define MINIGUN_DAMAGE 500 new Float:vhp; GetDynamicVehicleHealth(hitid, vhp); if(weaponid == 24) SetDynamicVehicleHealth(hitid, vhp-DEAGLE_DAMAGE); else if(weaponid == 25) SetDynamicVehicleHealth(hitid, vhp-SHOTGUN_DAMAGE); else if(weaponid == 27) SetDynamicVehicleHealth(hitid, vhp-COMBATSHOTGUN_DAMAGE); else if(weaponid == 29) SetDynamicVehicleHealth(hitid, vhp-MP5_DAMAGE); else if(weaponid == 30) SetDynamicVehicleHealth(hitid, vhp-AK47_DAMAGE); else if(weaponid == 31) SetDynamicVehicleHealth(hitid, vhp-M4_DAMAGE); else if(weaponid == 33) SetDynamicVehicleHealth(hitid, vhp-RIFLE_DAMAGE); else if(weaponid == 34) SetDynamicVehicleHealth(hitid, vhp-SNIPER_DAMAGE); else if(weaponid == 38) SetDynamicVehicleHealth(hitid, vhp-MINIGUN_DAMAGE); } }
O que estб errado?