GetVehicleHealth TR
From SA-MP Wiki
Description:
Bu fonksiyon aracın hasarını öğrenmemizi sağlar.
(vehicleid, &Float:health)
vehicleid | Araç ID numarası |
&Float:health | Belirtilen aracın hasar durumunun yazılacağı değişken ismi |
Return Values:
Hasar durumu
if(strcmp(cmdtext, "/tamir", true) == 0) { new Float:health; new veh; veh = GetPlayerVehicleID(playerid); GetVehicleHealth(veh, health); if(health >500) return SendClientMessage(playerid,COLOR_RED,"Tamire ihtiyacın yok!"); SetVehicleHealth(veh,1000); SendClientMessage(playerid,COLOR_GREEN,"Tamir edildi!"); }
Related Functions
The following functions may be useful, as they are related to this function in one way or another.
- SetVehicleHealth: Set the health of a vehicle.
- GetPlayerHealth: Find out how much health a player has.