04.11.2012, 13:47
Okay i got this:
It sure does something. When i attach roadtrain to a xoomer it removes 1 HP but it needs to go all the way to 0... how to make it do that?
pawn Код:
for(new c = 0; c < MAX_PLAYERS; c++)
{
new vehicleid = GetPlayerVehicleID(c);
if(IsPlayerInAnyVehicle(c))
{
if(GetVehicleModel(vehicleid) == 515)
{
new vtrailer = GetVehicleTrailer(vehicleid);
if(GetVehicleModel(vtrailer) == 584)
{
new Float:health;
GetVehicleHealth(vtrailer, health);//vtrailer = trailer
SetVehicleHealth(vtrailer, health-1);//vtrailer = trailer
}
}
}
}