Ungetestet, sollte aber funktionieren...
#define Tuningmenu 5
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp("/tuning", cmdtext, true) == 0)
{
if(!IsPlayerInAnyVehicle(playerid)){ return SendClientMessage(playerid,COLOR_RED,"Du brauchst ein Fahrzeug dafür!"); }
ShowPlayerDialog(playerid, Tuningmenu, DIALOG_STYLE_LIST, "Porte dich zur ...", "TuningGarage SF Normal\nWheel Arch Angels SF\nTuningGarage LS Lowrider", "Teleportieren", "Doch nicht");
return 1;
}
return 0;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == Tuningmenu) // Name des Menüs, das wir als ID 1 definiert haben
{
if(response)
{
new carID;
carID = GetPlayerVehicleID(playerid);
switch(listitem)
{
case 0:
{
SetVehiclePos(carID,-1928.3599,229.9237,35.2461);
SetVehicleZAngle(carID,24.7610);
PutPlayerInVehicle(playerid,carID,0);
}
case 1:
{
SetVehiclePos(carID,-2703.4927,217.7343,3.7171);
SetVehicleZAngle(carID,92.8262);
PutPlayerInVehicle(playerid,carID,0);
}
case 2:
{
SetVehiclePos(carID,2644.8413,-2021.2192,13.1121);
SetVehicleZAngle(carID,179.7866);
PutPlayerInVehicle(playerid,carID,0);
}
}
}
else { return SendClientMessage(playerid,COLOR_RED,"Aktion abgebrochen. Du wurdest nicht teleportiert!"); }
}
return 1;
}