25.11.2011, 16:06
Since i added this the pawn is crashing at compiling
pawn Код:
#define DIALOG_FKONTROLLE 6
pawn Код:
new veh = GetPlayerVehicleID(playerid);
new engine,lights,alarm,doors,bonnet,boot,objective;
case DIALOG_FKONTROLLE:
{
if( response )
{
if(listitem == 0)
{
if(GetPVarInt(playerid, "Motor") == 0)
{
GetVehicleParamsEx(veh,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(veh,VEHICLE_PARAMS_ON,lights,alarm,doors,bonnet,boot,objective);
SetPVarInt(playerid, "Motor", 1);
PlayerPlaySound(playerid, 1130, 0.0, 0.0, 10.0);
}
else if(GetPVarInt(playerid, "Motor") == 1)
{
GetVehicleParamsEx(veh,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(veh,VEHICLE_PARAMS_OFF,lights,alarm,doors,bonnet,boot,objective);
SetPVarInt(playerid, "Motor", 0);
PlayerPlaySound(playerid, 1130, 0.0, 0.0, 10.0);
}
}
if(listitem == 1)
{
if(GetPVarInt(playerid, "Lichter") == 0)
{
GetVehicleParamsEx(veh,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(veh,engine,VEHICLE_PARAMS_ON,alarm,doors,bonnet,boot,objective);
SetPVarInt(playerid, "Lichter", 1);
PlayerPlaySound(playerid, 1130, 0.0, 0.0, 10.0);
}
else if(GetPVarInt(playerid, "Lichter") == 1)
{
GetVehicleParamsEx(veh,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(veh,engine,VEHICLE_PARAMS_OFF,alarm,doors,bonnet,boot,objective);
SetPVarInt(playerid, "Lichter", 0);
PlayerPlaySound(playerid, 1130, 0.0, 0.0, 10.0);
}
}
if(listitem == 2)
{
if(GetPVarInt(playerid, "Motorhaube") == 0)
{
GetVehicleParamsEx(veh,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(veh,engine,lights,alarm,doors,VEHICLE_PARAMS_ON,boot,objective);
SetPVarInt(playerid, "Motorhaube", 1);
PlayerPlaySound(playerid, 1130, 0.0, 0.0, 10.0);
}
else if(GetPVarInt(playerid, "Motorhaube") == 1)
{
GetVehicleParamsEx(veh,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(veh,engine,lights,alarm,doors,VEHICLE_PARAMS_OFF,boot,objective);
SetPVarInt(playerid, "Motorhaube", 0);
PlayerPlaySound(playerid, 1130, 0.0, 0.0, 10.0);
}
}
if(listitem == 3)
{
if(GetPVarInt(playerid, "Kofferraum") == 0)
{
GetVehicleParamsEx(veh,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(veh,engine,lights,alarm,doors,bonnet,VEHICLE_PARAMS_ON,objective);
SetPVarInt(playerid, "Kofferraum", 1);
PlayerPlaySound(playerid, 1130, 0.0, 0.0, 10.0);
}
else if(GetPVarInt(playerid, "Kofferraum") == 1)
{
GetVehicleParamsEx(veh,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(veh,engine,lights,alarm,doors,bonnet,VEHICLE_PARAMS_OFF,objective);
SetPVarInt(playerid, "Kofferraum", 0);
PlayerPlaySound(playerid, 1130, 0.0, 0.0, 10.0);
}
}
if(listitem == 4)
{
if(GetPVarInt(playerid, "Alarm") == 0)
{
GetVehicleParamsEx(veh,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(veh,engine,lights,VEHICLE_PARAMS_ON,doors,bonnet,boot,objective);
SetPVarInt(playerid, "Alarm", 1);
PlayerPlaySound(playerid, 1130, 0.0, 0.0, 10.0);
}
else if(GetPVarInt(playerid, "Alarm") == 1)
{
GetVehicleParamsEx(veh,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(veh,engine,lights,VEHICLE_PARAMS_OFF,doors,bonnet,boot,objective);
SetPVarInt(playerid, "Alarm", 0);
PlayerPlaySound(playerid, 1130, 0.0, 0.0, 10.0);
}
}
}
}
pawn Код:
CMD:fa(playerid, params[])
{
if(!IsPlayerInAnyVehicle(playerid))
{
SendClientMessage(playerid, COLOR_RED, "Fehler: "COL_WHITE"Du musst im Fahrzeug sein um es zu steuern!");
}
else
{
ShowPlayerDialog(playerid, DIALOG_FKONTROLLE, DIALOG_STYLE_LIST, "Fahrzeug", "Motor (an/aus)\nLichter (an/aus)\nMotorhaube (auf/zu)\nKofferraum (auf/zu)\nAlarm (an/aus)", "Auswдhlen", "Abbrechen");
}
return 1;
}