Az én esetembe 2 es illetve + al javít.
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(PRESSED(KEY_SUBMISSION)) {
new vehicleid = GetPlayerVehicleID(playerid);
if(IsPlayerInVehicle(playerid, vehicleid))
{
SetVehicleHealth(vehicleid,1000.0); //élet javítás
PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);//tuning hang
RepairVehicle(GetPlayerVehicleID(playerid));//külsõ javítás
}
return 1;
}
return 0;
}
KEY_SUBMISSION
helyett rakhatsz más gombot is.Több infó itt:
http://wiki.sa-mp.com/wiki/GetPlayerKeys