Hi
habe einen /motor befehl aber bei flugzeugen/helis geht der nicht da startet der einfach ned why
if(strcmp(cmdtext,"/motor",true)==0)
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
if(GetPlayerVehicleID(playerid) != INVALID_VEHICLE_ID)
{
if(!Tank[GetPlayerVehicleID(playerid)] && MaxTank[GetVehicleModel(GetPlayerVehicleID(playerid))-400] != -255)
{
SendClientMessage(playerid,Farbe_Grau,"Das Fahrzeug hat kein Benzin mehr!");
return 1;
}
if(IsAFahrrad2(GetVehicleModel(GetPlayerVehicleID(playerid))))
{
SendClientMessage(playerid,0xFF0000FF,"Das ist ein Fahrrad, das hat keinen Motor O.o");
return 1;
}
new ENGINE,LIGHTS,ALARM,DOORS,BONNET,BOOT,OBJECTIVE;
GetVehicleParamsEx(GetPlayerVehicleID(playerid),ENGINE,LIGHTS,ALARM,DOORS,BONNET,BOOT,OBJECTIVE);
if(ENGINE == VEHICLE_PARAMS_ON)
{
SendClientMessage(playerid,Farbe_Weiß,"** Motor abgeschaltet.");
SetVehicleParamsEx(GetPlayerVehicleID(playerid),VEHICLE_PARAMS_OFF,LIGHTS,ALARM,DOORS,BONNET,BOOT,OBJECTIVE);
}
else
{
SendClientMessage(playerid,Farbe_Weiß,"** Motor gestartet.");
SetVehicleParamsEx(GetPlayerVehicleID(playerid),VEHICLE_PARAMS_ON,LIGHTS,ALARM,DOORS,BONNET,BOOT,OBJECTIVE);
}
}
}
return 1;
}
else if(State == PLAYER_STATE_DRIVER)
{
if ((newkeys & KEY_SUBMISSION) && (oldkeys & KEY_HANDBRAKE))
{
if(IsPlayerInAnyVehicle(playerid))
{
if(!Tank[GetPlayerVehicleID(playerid)] && MaxTank[GetVehicleModel(GetPlayerVehicleID(playerid))-400] != -255)
{
SendClientMessage(playerid,Farbe_Grau,"Das Fahrzeug hat kein Benzin mehr!");
return 1;
}
if(IsAFahrrad2(GetVehicleModel(GetPlayerVehicleID(playerid))))
{
SendClientMessage(playerid,0xFF0000FF,"Das ist ein Fahrrad, das hat keinen Motor O.o");
return 1;
}
new ENGINE,LIGHTS,ALARM,DOORS,BONNET,BOOT,OBJECTIVE;
GetVehicleParamsEx(GetPlayerVehicleID(playerid),ENGINE,LIGHTS,ALARM,DOORS,BONNET,BOOT,OBJECTIVE);
if(ENGINE == VEHICLE_PARAMS_ON)
{
SendClientMessage(playerid,Farbe_Weiß,"** Motor abgeschaltet.");
SetVehicleParamsEx(GetPlayerVehicleID(playerid),VEHICLE_PARAMS_OFF,LIGHTS,ALARM,DOORS,BONNET,BOOT,OBJECTIVE);
}
else
{
SendClientMessage(playerid,Farbe_Weiß,"** Motor gestartet.");
SetVehicleParamsEx(GetPlayerVehicleID(playerid),VEHICLE_PARAMS_ON,LIGHTS,ALARM,DOORS,BONNET,BOOT,OBJECTIVE);
}
}
}