GetVehicleHealth TR

From SA-MP Wiki

Jump to: navigation, search



Description:

Bu fonksiyon aracın hasarını öğrenmemizi sağlar.


Parameters:
(vehicleid, &Float:health)
vehicleidAraç ID numarası
&Float:healthBelirtilen 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.

In other languages