Hallo.
Undzwar macht er den Motor nicht an. Allerdings finde ich den Fehler nicht:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(PRESSED(KEY_NO) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER ) {
new vehicle = GetPlayerVehicleID(playerid);
new vengine,vlights,valarm,vdoors,vbonnet,vboot,vobjective;
GetVehicleParamsEx(vehicle,vengine,vlights,valarm,vdoors,vbonnet,vboot,vobjective);
if(vengine == 0) {
GameTextForPlayer(playerid, "~w~Motor ~g~eingeschaltet",1000 ,6);
SetVehicleParamsEx(vehicle,1,vlights,valarm,vdoors,vbonnet,vboot,vobjective);
return 1;
} else if(vengine == 1) {
GameTextForPlayer(playerid, "~w~Motor ~r~ausgeschaltet",1000 ,6);
SetVehicleParamsEx(vehicle,0,vlights,valarm,vdoors,vbonnet,vboot,vobjective);
return 1;
}
}
if(PRESSED(KEY_YES) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER ) {
new vehicle = GetPlayerVehicleID(playerid);
new vengine,vlights,valarm,vdoors,vbonnet,vboot,vobjective;
GetVehicleParamsEx(vehicle,vengine,vlights,valarm,vdoors,vbonnet,vboot,vobjective);
if(vlights == 0) {
SetVehicleParamsEx(vehicle,vengine,1,valarm,vdoors,vbonnet,vboot,vobjective);
return 1;
} else if(vlights == 1) {
SetVehicleParamsEx(vehicle,vengine,0,valarm,vdoors,vbonnet,vboot,vobjective);
return 1;
}
}
return 1;
}
Errors habe ich keine
- Maydo