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);
}
}
}
}
for(new c = 0; c < MAX_PLAYERS; c++)
{
new vehicleid = GetPlayerVehicleID(c);
if(IsPlayerInAnyVehicle(c))
{
if(GetVehicleModel(vehicleid) == 515)
{
if(GetVehicleModel(GetVehicleTrailer(vehicleid))== 584)
{
new Float:health;
GetVehicleHealth(vehicleid, health);
SetVehicleHealth(vehicleid, health-1);
}
}
}
}
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
}
}
}
}
Dude please make a good title next time, you always make threads like "Something need help" "Please help", please try to define problem in title. like "Mysql help" "Car bug" or something
|
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
}
}
}
}