06.06.2010, 00:04
SendClientMessage(i,COLOR_RED,"Your Vehicle Is Going To Explode,You Have Been Ejected");
you var will be a player in a loop like this in this case its "i"
hold on a sec ill do 1 more thing
use this the other dont check if 1 is in a car
you var will be a player in a loop like this in this case its "i"
hold on a sec ill do 1 more thing
pawn Код:
public carhealth()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(!IsPlayerInAnyVehicle(playerid)continue;
new Float:vHealth;
GetVehicleHeath(GetPlayerVehicleID(i),vHealth);
if (vHealth<100.0) RemovePlayerFromVehicle();
}
}