27.04.2012, 14:44
if i hit the car more this happens the message appears like 3 times do i need a timer?
PHP код:
public OnVehicleDamageStatusUpdate(vehicleid, playerid)
{
new Float:v;
GetVehicleHealth(vehicleid, v);
if(v <= 300) { TogglePlayerControllable(playerid, 0); {
SendClientMessage(playerid, -1, "Motorul sa stricat,poti suna mecanicul!");
SetVehicleParamsEx(vehicleid, VEHICLE_PARAMS_OFF, 0, 0, 0, VEHICLE_PARAMS_ON, 0, 0);
SetVehicleHealth(vehicleid, 300);
}
}
return 1;
}