Lehet.
[pawn]public OnVehicleDamageStatusUpdate(vehicleid, playerid)
{
new Float:vhealth;
GetVehicleHealth(vehicleid,vhealth);
if(vhealth < 1000) SendClientMessage(playerid, 0xFFFFFF, \"Nyomd meg a 2-es gombot a kocsi javításához\");
return 1;
}
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
if(newkeys == KEY_SUBMISSION)
{
if(IsPlayerInAnyVehicle(playerid))
{
new vehicle = GetPlayerVehicleID(playerid);
RepairVehicle(vehicleid);
}
else
{
return false;
}
}
}
return 1;
}[/pawn]
Nem teszteltem, de elvileg mûködnie kell.