28.02.2009, 22:04
Hey have a question i have do so when my car health is on 280 it will freeze the player like this
The question is if i can do so when i leave the car it wond blow up it will stay there untill a towcar comes.
Код:
public OnFilterScriptInit()
{
SetTimer("VehicleHealthTimer",100,1);
return 1;
}
public VehicleHealthTimer()
{
for(new i = 0; i < GetMaxPlayers(); i++)
{
if(IsPlayerInAnyVehicle(i))
{
GetVehicleHealth(GetPlayerVehicleID(i),vhealth[i]);
if(vhealth[i] < 280)
{
TogglePlayerControllable(i, 0);
SendClientMessage(i,0xFFFFFF96,"|________________________________________Car________________________________________|");
SendClientMessage(i,0x0000FF96,"You can't drive this car anymore the engine is damage!");
SendClientMessage(i,0x0000FF96,"Call 911 and call for Medic or the Police (you must RP your car crash)");
}
}
}
}

