#define DIALOG_FKONTROLLE 6
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);
}
}
}
}
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;
}
You cant use "/" on strings, this char is used by the compiler.
@edit actually you can but in the right way. |
case DIALOG_FKONTROLLE:
{
if( response )
{
new veh = GetPlayerVehicleID(playerid);
new engine,lights,alarm,doors,bonnet,boot,objective;
//......your code......
pawn Код:
|
Copy-Pasting is bad! I've seen far too much people that just copy a part of another gamemode, put it at the bottom of their own script and then expect it to work, just like that.
I suggest you go read some wiki articles about functions and callbacks, because you have no idea what you're doing whatsoever. |