04.11.2012, 12:19
Okay so heres my problem if you want to attach the Xoomer trailer to a roadtrain or linerunner the health should go down till it once explodes... I've tried some stuff but i can't manage to get it to work. This is what i got.
This is in a timer wich repeats every 500 MS. Outputs no errors but neither removes 1 HP everytime it runs... Anyone can help?
Thanks in advance
pawn Код:
for(new c = 0; c < MAX_PLAYERS; c++)
{
new vehicleid = GetPlayerVehicleID(playerid);
if(IsPlayerInAnyVehicle(c))
{
if(GetVehicleModel(vehicleid) == 515)
{
if(GetVehicleModel(GetVehicleTrailer(vehicleid))== 584)
{
new Float:health;
new veh = GetPlayerVehicleID(playerid);
GetVehicleHealth(GetVehicleModel(GetVehicleTrailer(veh))== 584, health);
SetVehicleHealth(GetVehicleModel(GetVehicleTrailer(veh))== 584, health-1);
}
}
}
}
Thanks in advance