Ich habs jett mal so gemacht, jeodch komen jetzt mehr Fehler.
stock logindialog(playerid, dialogid, response, inputtext[])
{
switch(dialogid)
{
case DIALOG_LOGIN:
{
new string[64];
if(strlen(inputtext) < 6 || strlen(inputtext) > 24)
{
format(string,sizeof(string),"{FFFFFF}Der Account {E8BD1A}%s {FFFFFF}wurde gefunden\nBitte gebe das Passwort ein",AccountInfo[playerid][account_Name]);
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "{FFFFFF}Anmeldung",string, "{FFFFFF}Weiter", "{FFFFFF}Abbrechen");
return 1;
}
SetPVarString(playerid,"password",inputtext);
PlayerTextDrawSetString(playerid,Login_TextDraw[playerid][2],"######");
SetTimerEx("TextDrawSelect",500,false,"i",playerid);
return 1;
}
}
}
stock restdialog(playerid, dialogid, response, listitem, inputtext[])
{
new string[512];
switch(dialogid)
{
case DIALOG_CHARACTER:
{
if(!response)return Kick(playerid);
switch(listitem)
{
case 0:
{
if(AccountInfo[playerid][account_Slot][0])
{
AccountInfo[playerid][account_SelectedChar] = 1;
mysql_format(handle, string, sizeof(string), "SELECT * FROM `character` WHERE `AccountID` = '%d' AND `Slot` = '%d'", AccountInfo[playerid][account_ID], AccountInfo[playerid][account_SelectedChar]);
mysql_tquery(handle, string, "LoadCharacter", "d", playerid);
}
else
{
SetPVarInt(playerid, "CharErstellungSlot", 1);
ShowPlayerDialog(playerid, DIALOG_CREATE_CHARACTER_NAME, DIALOG_STYLE_INPUT, "{FFFFFF}Charakter - Erstellen", "{FFFFFF}Wie soll der Charakter heißen? Gebe bitte einen Namen im Roleplay-Format an!\n(Beispiel: Hans_Meier, Helmut_Schmidt)", "{FFFFFF}Weiter", "{FFFFFF}Zurück");
}
return 1;
}
case 1:
{
if(AccountInfo[playerid][account_Slot][1])
{
AccountInfo[playerid][account_SelectedChar] = 2;
mysql_format(handle, string, sizeof(string), "SELECT * FROM `character` WHERE `AccountID` = '%d' AND `Slot` = '%d'", AccountInfo[playerid][account_ID], AccountInfo[playerid][account_SelectedChar]);
mysql_tquery(handle, string, "LoadCharacter", "d", playerid);
}
else
{
SetPVarInt(playerid, "CharErstellungSlot", 2);
ShowPlayerDialog(playerid, DIALOG_CREATE_CHARACTER_NAME, DIALOG_STYLE_INPUT, "{FFFFFF}Charakter - Erstellen", "{FFFFFF}Wie soll der Charakter heißen? Gebe bitte einen Namen im Roleplay-Format an!\n(Beispiel: Hans_Meier, Helmut_Schmidt)", "{FFFFFF}Weiter", "{FFFFFF}Zurück");
}
return 1;
}
case 2:
{
if(AccountInfo[playerid][account_Slot][2])
{
AccountInfo[playerid][account_SelectedChar] = 3;
mysql_format(handle, string, sizeof(string), "SELECT * FROM `character` WHERE `AccountID` = '%d' AND `Slot` = '%d'", AccountInfo[playerid][account_ID], AccountInfo[playerid][account_SelectedChar]);
mysql_tquery(handle, string, "LoadCharacter", "d", playerid);
}
else
{
SetPVarInt(playerid, "CharErstellungSlot", 3);
ShowPlayerDialog(playerid, DIALOG_CREATE_CHARACTER_NAME, DIALOG_STYLE_INPUT, "{FFFFFF}Charakter - Erstellen", "{FFFFFF}Wie soll der Charakter heißen? Gebe bitte einen Namen im Roleplay-Format an!\n(Beispiel: Hans_Meier, Helmut_Schmidt)", "{FFFFFF}Weiter", "{FFFFFF}Zurück");
}
return 1;
}
}
return 1;
}
case DIALOG_CREATE_CHARACTER_NAME:
{
if(!response)
{
mysql_format(handle, string, sizeof(string), "SELECT * FROM `character` WHERE `AccountID` = '%d'", AccountInfo[playerid][account_ID]);
mysql_tquery(handle, string, "ShowCharacter", "d", playerid);
DeletePVar(playerid, "CharErstellungSlot");
return 1;
}
if(strfind(inputtext, "_",false)!=-1)
{
mysql_format(handle,string,sizeof(string),"SELECT * FROM `character` WHERE `Name` = '%s'",inputtext);
mysql_tquery(handle,string,"CheckName","ds",playerid,inputtext);
return 1;
}
else
{
ShowPlayerDialog(playerid, DIALOG_CREATE_CHARACTER_NAME, DIALOG_STYLE_INPUT, "{FFFFFF}Charakter - Erstellen", "{FFFFFF}Wie soll der Charakter heißen? Gebe bitte einen Namen im Roleplay-Format an!\n(Beispiel: Hans_Meier, Helmut_Schmidt)", "{FFFFFF}Weiter", "{FFFFFF}Zurück");
}
return 1;
}
case DIALOG_CREATE_CHARACTER_MALE:
{
if(!response) return ShowPlayerDialog(playerid, DIALOG_CREATE_CHARACTER_NAME, DIALOG_STYLE_INPUT, "{FFFFFF}Charakter - Erstellen", "{FFFFFF}Wie soll der Charakter heißen? Gebe bitte einen Namen im Roleplay-Format an!\n(Beispiel: Hans_Meier, Helmut_Schmidt)", "{FFFFFF}Weiter", "{FFFFFF}Zurück");
if(strcmp("Männlich",inputtext , true ) == 0)
{
mysql_format(handle, string, sizeof(string), "UPDATE `character` SET `Geschlecht` = '1',`Skin` = '187|0|0',`Level` = '1' WHERE `AccountID` = '%d' AND `Slot` = '%d'",AccountInfo[playerid][account_ID],AccountInfo[playerid][account_SelectedChar]);
mysql_tquery(handle, string);
mysql_format(handle, string, sizeof(string), "SELECT * FROM `character` WHERE `AccountID` = '%d'", AccountInfo[playerid][account_ID]);
mysql_tquery(handle, string, "ShowCharacter", "d", playerid);
DeletePVar(playerid, "CharErstellungSlot");
return 1;
}
else if(strcmp("Weiblich",inputtext , true ) == 0)
{
mysql_format(handle, string, sizeof(string), "UPDATE `character` SET `Geschlecht` = '2',`Skin` = '141|0|0',`Level` = '1' WHERE `AccountID` = '%d' AND `Slot` = '%d'",AccountInfo[playerid][account_ID],AccountInfo[playerid][account_SelectedChar]);
mysql_tquery(handle, string);
mysql_format(handle, string, sizeof(string), "SELECT * FROM `character` WHERE `AccountID` = '%d'", AccountInfo[playerid][account_ID]);
mysql_tquery(handle, string, "ShowCharacter", "d", playerid);
DeletePVar(playerid, "CharErstellungSlot");
return 1;
}
ShowPlayerDialog(playerid, DIALOG_CREATE_CHARACTER_MALE, DIALOG_STYLE_INPUT, "{FFFFFF}Charakter - Erstellen", "{FFFFFF}Welches Geschlecht soll dein Charakter haben?\n(Beispiel: Männlich, Weiblich)", "{FFFFFF}Weiter", "{FFFFFF}Zurck");
return 1;
}
case DIALOG_CREATE:
{
if(!response)return 1;
switch(listitem)
{
case 0: {ShowDialog(playerid,DIALOG_CREATE_TELEPORT); return 1;}
case 1: {ShowDialog(playerid,DIALOG_CREATE_BUILDING); return 1;}
}
return 1;
}
case DIALOG_CREATE_TELEPORT:
{
if(!response)return ShowDialog(playerid,DIALOG_CREATE);
CreateTeleport(playerid,inputtext);
return 1;
}
case DIALOG_TELEPORT:
{
if(!response)return 1;
new i = strval(inputtext);
SetPlayerPos(playerid,TeleportInfo[i][teleport_Pos][0],TeleportInfo[i][teleport_Pos][1],TeleportInfo[i][teleport_Pos][2]);
SetCameraBehindPlayer(playerid);
return 1;
}
case DIALOG_EDIT:
{
if(!response)return 1;
switch(listitem)
{
case 0:{return ShowDialog(playerid,DIALOG_EDIT_SERVER_MENU);}
case 1:{return ShowTeleport(playerid,true);}
case 2:{return ShowDialog(playerid,DIALOG_EDIT_FACTION_MENU);}
case 3:{return ShowCommand(playerid);}
case 4:{return ShowBuilding(playerid);}
}
return 1;
}
case DIALOG_EDIT_TELEPORT_MENU:
{
if(!response)return ShowDialog(playerid,DIALOG_EDIT);
SetPVarInt(playerid,"ID",strval(inputtext));
SPD(playerid,DIALOG_EDIT_TELEPORT,DIALOG_STYLE_LIST,"{FFFFFF}Bearbeiten - Teleportpunkt - Übersicht","{FFFFFF}Löschen","{FFFFFF}Weiter","{FFFFFF}Zurück");
return 1;
}
case DIALOG_EDIT_TELEPORT:
{
if(!response)return ShowTeleport(playerid,true);
new id = GetPVarInt(playerid,"ID");
switch(listitem)
{
case 0: {return DeleteTeleport(playerid,id);}
}
return 1;
}
case DIALOG_EDIT_SERVER_MENU:
{
if(!response)return ShowDialog(playerid,DIALOG_EDIT);
switch(listitem)
{
case 0:
{
SPD(playerid,DIALOG_EDIT_SERVER_NAME,DIALOG_STYLE_INPUT,"{FFFFFF}Bearbeiten - Server - Name","{FFFFFF}Bitte gebe den Servernamen ein:","{FFFFFF}Weiter","{FFFFFF}Zurück");
}
case 1:
{
SPD(playerid,DIALOG_EDIT_SERVER_MODE,DIALOG_STYLE_INPUT,"{FFFFFF}Bearbeiten - Server - Mode","{FFFFFF}Bitte gebe den Servermode ein:","{FFFFFF}Weiter","{FFFFFF}Zurück");
}
case 2:
{
if(ServerInfo[0][server_Maintenance]){ServerInfo[0][server_Maintenance] = false; format(string,sizeof(string),"hostname %s",ServerInfo[0][server_Name]);}
else{ServerInfo[0][server_Maintenance] = true; format(string,sizeof(string),"hostname Wartungsarbeiten : %s",ServerInfo[0][server_Name]);}
SendRconCommand(string);
ShowDialog(playerid,DIALOG_EDIT_SERVER_MENU);
mysql_format(handle,string,sizeof(string),"UPDATE `server` SET `Maintenance` = '%d' WHERE `ID` = '0'",ServerInfo[0][server_Maintenance]);
mysql_tquery(handle,string);
}
}
return 1;
}
case DIALOG_EDIT_SERVER_NAME:
{
if(!response)return ShowDialog(playerid,DIALOG_EDIT_SERVER_MENU);
format(ServerInfo[0][server_Name],50,"%s",inputtext);
if(!ServerInfo[0][server_Maintenance]){format(string,sizeof(string),"hostname %s",ServerInfo[0][server_Name]);}
else{format(string,sizeof(string),"hostname Wartungsarbeiten : %s",ServerInfo[0][server_Name]);}
SendRconCommand(string);
ShowDialog(playerid,DIALOG_EDIT_SERVER_MENU);
mysql_format(handle,string,sizeof(string),"UPDATE `server` SET `Name` = '%s' WHERE `ID` = '0'",ServerInfo[0][server_Name]);
mysql_tquery(handle,string);
return 1;
}
case DIALOG_EDIT_SERVER_MODE:
{
if(!response)return ShowDialog(playerid,DIALOG_EDIT_SERVER_MENU);
format(ServerInfo[0][server_Mode],50,"%s",inputtext);
format(string,sizeof(string),"gamemodetext %s",ServerInfo[0][server_Mode]);
SendRconCommand(string);
ShowDialog(playerid,DIALOG_EDIT_SERVER_MENU);
mysql_format(handle,string,sizeof(string),"UPDATE `server` SET `Mode` = '%s' WHERE `ID` = '0'",ServerInfo[0][server_Mode]);
mysql_tquery(handle,string);
return 1;
}
case DIALOG_SETTINGS:
{
if(!response) return 1;
switch(listitem)
{
case 0: SPD(playerid,DIALOG_SETTINGS_INTERACT,DIALOG_STYLE_LIST,"{FFFFFF}Einstellungen - Interaktionstaste","{FFFFFF}Enter | F\nN\nZ","{FFFFFF}Weiter","{FFFFFF}Zurück");
}
return 1;
}
case DIALOG_SETTINGS_INTERACT:
{
if(!response)return ShowDialog(playerid,DIALOG_SETTINGS);
switch(listitem)
{
case 0: {AccountInfo[playerid][account_Interact] = 16; SendInfo(playerid,"Deine Interaktionstaste ist nun 'Enter | F'");}
case 1: {AccountInfo[playerid][account_Interact] = 131072; SendInfo(playerid,"Deine Interaktionstaste ist nun 'N'");}
case 2: {AccountInfo[playerid][account_Interact] = 65536; SendInfo(playerid,"Deine Interaktionstaste ist nun 'Z'");}
}
mysql_format(handle,string,sizeof(string),"UPDATE `accounts` SET `Interact` = '%d' WHERE `ID` = '%d'",AccountInfo[playerid][account_Interact],AccountInfo[playerid][account_ID]);
mysql_tquery(handle,string);
return 1;
}
case DIALOG_EDIT_FACTION_MENU:
{
if(!response)return ShowDialog(playerid,DIALOG_EDIT);
new i = strval(inputtext);
SetPVarInt(playerid,"ID",i);
ShowEditFaction(playerid,i);
return 1;
}
case DIALOG_EDIT_FACTION:
{
if(!response)return ShowDialog(playerid,DIALOG_EDIT_FACTION_MENU);
new id = GetPVarInt(playerid,"ID");
new Float:pos[3];
GetPlayerPos(playerid,pos[0],pos[1],pos[2]);
switch(listitem)
{
case 0:
{
SPD(playerid,DIALOG_EDIT_FACTION_NAME,DIALOG_STYLE_INPUT,"{FFFFFF}Bearbeiten - Fraktion - Name","{FFFFFF}Bitte gebe den neuen Fraktionsnamen an:","{FFFFFF}Weiter","{FFFFFF}Zurück");
}
case 1:
{
SPD(playerid,DIALOG_EDIT_FACTION_TAG,DIALOG_STYLE_INPUT,"{FFFFFF}Bearbeiten - Fraktion - Tag","{FFFFFF}Bitte gebe den neuen Fraktionstag an:","{FFFFFF}Weiter","{FFFFFF}Zurück");
}
case 2:
{
SPD(playerid,DIALOG_EDIT_FACTION_SKIN,DIALOG_STYLE_INPUT,"{FFFFFF}Bearbeiten - Fraktion - Skin","{FFFFFF}Bitte gebe den neuen Fraktionsskin an:","{FFFFFF}Weiter","{FFFFFF}Zurück");
}
case 3:
{
FactionInfo[id][faction_Duty][0] = pos[0];
FactionInfo[id][faction_Duty][1] = pos[1];
FactionInfo[id][faction_Duty][2] = pos[2];
DestroyDynamicPickup(FactionInfo[id][faction_Pickup][0]);
FactionInfo[id][faction_Pickup][0] = CreateDynamicPickup(1239,23,FactionInfo[id][faction_Duty][0],FactionInfo[id][faction_Duty][1],FactionInfo[id][faction_Duty][2]);
mysql_format(handle,string,sizeof(string),"UPDATE `faction` SET `DutyX` = '%f',`DutyY` = '%f',`DutyZ` = '%f' WHERE `ID` = '%d'",
FactionInfo[id][faction_Duty][0],FactionInfo[id][faction_Duty][1],FactionInfo[id][faction_Duty][2],id);
mysql_tquery(handle,string);
ShowEditFaction(playerid,id);
}
case 4:
{
FactionInfo[id][faction_Uniform][0] = pos[0];
FactionInfo[id][faction_Uniform][1] = pos[1];
FactionInfo[id][faction_Uniform][2] = pos[2];
DestroyDynamicPickup(FactionInfo[id][faction_Pickup][1]);
FactionInfo[id][faction_Pickup][1] = CreateDynamicPickup(1275,23,FactionInfo[id][faction_Uniform][0],FactionInfo[id][faction_Uniform][1],FactionInfo[id][faction_Uniform][2]);
mysql_format(handle,string,sizeof(string),"UPDATE `faction` SET `UniformX` = '%f',`UniformY` = '%f',`UniformZ` = '%f' WHERE `ID` = '%d'",
FactionInfo[id][faction_Uniform][0],FactionInfo[id][faction_Uniform][1],FactionInfo[id][faction_Uniform][2],id);
mysql_tquery(handle,string);
ShowEditFaction(playerid,id);
}
case 5:
{
FactionInfo[id][faction_Weapon][0] = pos[0];
FactionInfo[id][faction_Weapon][1] = pos[1];
FactionInfo[id][faction_Weapon][2] = pos[2];
DestroyDynamicPickup(FactionInfo[id][faction_Pickup][2]);
FactionInfo[id][faction_Pickup][2] = CreateDynamicPickup(19832,23,FactionInfo[id][faction_Weapon][0],FactionInfo[id][faction_Weapon][1],FactionInfo[id][faction_Weapon][2]);
mysql_format(handle,string,sizeof(string),"UPDATE `faction` SET `WeaponX` = '%f',`WeaponY` = '%f',`WeaponZ` = '%f' WHERE `ID` = '%d'",
FactionInfo[id][faction_Weapon][0],FactionInfo[id][faction_Weapon][1],FactionInfo[id][faction_Weapon][2],id);
mysql_tquery(handle,string);
ShowEditFaction(playerid,id);
}
}
return 1;
}
case DIALOG_EDIT_FACTION_NAME:
{
new i = GetPVarInt(playerid,"ID");
if(!response)return ShowEditFaction(playerid,i);
format(FactionInfo[i][faction_Name],255,"%s",inputtext);
mysql_format(handle,string,sizeof(string),"UPDATE `faction` SET `Name` = '%s' WHERE `ID` = '%d'",FactionInfo[i][faction_Name],i);
mysql_tquery(handle,string);
ShowEditFaction(playerid,i);
return 1;
}
case DIALOG_EDIT_FACTION_TAG:
{
new i = GetPVarInt(playerid,"ID");
if(!response)return ShowEditFaction(playerid,i);
format(FactionInfo[i][faction_Tag],255,"%s",inputtext);
mysql_format(handle,string,sizeof(string),"UPDATE `faction` SET `Tag` = '%s' WHERE `ID` = '%d'",FactionInfo[i][faction_Tag],i);
mysql_tquery(handle,string);
ShowEditFaction(playerid,i);
return 1;
}
case DIALOG_EDIT_FACTION_SKIN:
{
new i = GetPVarInt(playerid,"ID");
if(!response)return ShowEditFaction(playerid,i);
if(!IsNumeric(inputtext))return SPD(playerid,DIALOG_EDIT_FACTION_SKIN,DIALOG_STYLE_INPUT,"{FFFFFF}Bearbeiten - Fraktion - Skin","{FFFFFF}Bitte gebe den neuen Fraktionsskin an:","{FFFFFF}Weiter","{FFFFFF}Zurück");
FactionInfo[i][faction_Skin] = strval(inputtext);
mysql_format(handle,string,sizeof(string),"UPDATE `faction` SET `Skin` = '%d' WHERE `ID` = '%d'",FactionInfo[i][faction_Skin],i);
mysql_tquery(handle,string);
ShowEditFaction(playerid,i);
return 1;
}
case DIALOG_EDIT_COMMAND_MENU:
{
if(!response)return ShowDialog(playerid,DIALOG_EDIT);
ShowEditCommand(playerid,strval(inputtext));
return 1;
}
case DIALOG_EDIT_COMMAND:
{
if(!response)return ShowCommand(playerid);
new id = GetPVarInt(playerid,"ID");
switch(listitem)
{
case 0:
{
SPD(playerid,DIALOG_EDIT_COMMAND_ADMIN,DIALOG_STYLE_INPUT,"{FFFFFF}Bearbeiten - Befehl - Rang","{FFFFFF}Bitte gebe das neue Adminlevel ein:","{FFFFFF}Weiter","{FFFFFF}Zurück");
return 1;
}
case 1:
{
if(CommandInfo[id][command_Mapper] == 1)CommandInfo[id][command_Mapper] = 2;
else CommandInfo[id][command_Mapper] = 1;
return ShowEditCommand(playerid,id);
}
case 2:
{
if(CommandInfo[id][command_Scripter] == 1)CommandInfo[id][command_Scripter] = 2;
else CommandInfo[id][command_Scripter] = 1;
return ShowEditCommand(playerid,id);
}
}
return 1;
}
case DIALOG_EDIT_COMMAND_ADMIN:
{
new id = GetPVarInt(playerid,"ID");
if(!response)return ShowEditCommand(playerid,id);
if(!IsNumeric(inputtext))return SPD(playerid,DIALOG_EDIT_COMMAND_ADMIN,DIALOG_STYLE_INPUT,"{FFFFFF}Bearbeiten - Befehl - Rang","{FFFFFF}Bitte gebe das neue Adminlevel ein:","{FFFFFF}Weiter","{FFFFFF}Zurück");
if(strval(inputtext) == 1 || strval(inputtext) > 6)return SPD(playerid,DIALOG_EDIT_COMMAND_ADMIN,DIALOG_STYLE_INPUT,"{FFFFFF}Bearbeiten - Befehl - Rang","{FFFFFF}Bitte gebe das neue Adminlevel ein:","{FFFFFF}Weiter","{FFFFFF}Zurück");
CommandInfo[id][command_Admin] = strval(inputtext);
ShowEditCommand(playerid,id);
return 1;
}
case DIALOG_EDIT_PLAYER:
{
if(!response)return 1;
new pID = GetPVarInt(playerid,"PlayerID");
switch(listitem)
{
case 0:
{
ShowEditPlayer(playerid,pID);
}
case 1:
{
format(string,sizeof(string),"{FFFFFF}%s\n%s\n%s\n%s\n%s",FactionInfo[0][faction_Name],FactionInfo[1][faction_Name],FactionInfo[2][faction_Name],
FactionInfo[3][faction_Name],FactionInfo[4][faction_Name]);
SPD(playerid,DIALOG_EDIT_PLAYER_FACTION,DIALOG_STYLE_LIST,"{FFFFFF}Bearbeiten - Spieler - Fraktion",string,"{FFFFFF}Weiter","{FFFFFF}Zurück");
}
}
return 1;
}
case DIALOG_EDIT_PLAYER_FACTION:
{
if(!response)return ShowDialog(playerid,DIALOG_EDIT_PLAYER);
new pID = GetPVarInt(playerid,"PlayerID");
CharacterInfo[pID][character_Fraktion] = listitem;
CharacterInfo[pID][character_Skin][1] = FactionInfo[CharacterInfo[pID][character_Fraktion]][faction_Skin];
if(listitem > 0)
{
format(string,sizeof(string),"%s %s hat dich zum Leader der Fraktion '%s' gemacht",GetAdminRang(AccountInfo[playerid][account_Admin],true),AccountInfo[playerid][account_Name],
FactionInfo[CharacterInfo[pID][character_Fraktion]][faction_Name]);
CharacterInfo[pID][character_Rang] = 12;
SendInfo(pID,string);
format(string,sizeof(string),"Du hast %s zum Leader der Fraktion '%s' gemacht",AccountInfo[pID][account_Name],FactionInfo[CharacterInfo[pID][character_Fraktion]][faction_Name]);
SendInfo(playerid,string);
}
else
{
format(string,sizeof(string),"%s %s hat dich aus deiner Fraktion geworfen",GetAdminRang(AccountInfo[playerid][account_Admin],true),AccountInfo[playerid][account_Name]);
CharacterInfo[pID][character_Rang] = 0;
SendInfo(pID,string);
format(string,sizeof(string),"Du hast %s aus der Fraktion geworfen",AccountInfo[pID][account_Name]);
SendInfo(playerid,string);
}
}
case DIALOG_EDIT_PLAYER_TEAM:
{
if(!response)return ShowDialog(playerid,DIALOG_EDIT_PLAYER);
new pID = GetPVarInt(playerid,"PlayerID");
switch(listitem)
{
case 0:
{
SPD(playerid,DIALOG_EDIT_PLAYER_TEAM_ADMIN,DIALOG_STYLE_INPUT,"{FFFFFF}Bearbeiten - Spieler - Rang","{FFFFFF}Bitte gebe das neue Adminlevel ein:","{FFFFFF}Weiter","{FFFFFF}Zurück");
return 1;
}
case 1:
{
if(AccountInfo[pID][account_Mapper] == 0){AccountInfo[pID][account_Mapper] = 2; AccountInfo[pID][account_Admin] = 1;}
else {AccountInfo[pID][account_Mapper] = 0; AccountInfo[pID][account_Admin] = 0;}
return ShowEditPlayer(playerid,pID);
}
case 2:
{
if(AccountInfo[pID][account_Scripter] == 0){AccountInfo[pID][account_Scripter] = 2; AccountInfo[pID][account_Admin] = 1;}
else {AccountInfo[pID][account_Scripter] = 0; AccountInfo[pID][account_Admin] = 0;}
return ShowEditPlayer(playerid,pID);
}
}
return 1;
}
case DIALOG_EDIT_PLAYER_TEAM_ADMIN:
{
new pID = GetPVarInt(playerid,"PlayerID");
if(!response)return ShowEditPlayer(playerid,pID);
if(!IsNumeric(inputtext))return SPD(playerid,DIALOG_EDIT_PLAYER_TEAM_ADMIN,DIALOG_STYLE_INPUT,"{FFFFFF}Bearbeiten - Spieler - Rang","{FFFFFF}Bitte gebe das neue Adminlevel ein:","{FFFFFF}Weiter","{FFFFFF}Zurück");
AccountInfo[pID][account_Admin] = strval(inputtext);
ShowEditPlayer(playerid,pID);
return 1;
}
case DIALOG_CREATE_BUILDING:
{
if(!response)return ShowDialog(playerid,DIALOG_CREATE);
CreateBuilding(playerid,inputtext);
return 1;
}
case DIALOG_EDIT_BUILDING_MENU:
{
if(!response)return ShowDialog(playerid,DIALOG_EDIT);
SetPVarInt(playerid,"ID",strval(inputtext));
ShowEditBuilding(playerid,strval(inputtext));
return 1;
}
case DIALOG_EDIT_BUILDING:
{
if(!response)return ShowBuilding(playerid);
new i = GetPVarInt(playerid,"ID");
new Float:x,Float:y,Float:z;
switch(listitem)
{
case 0:
{
SPD(playerid,DIALOG_EDIT_BUILDING_NAME,DIALOG_STYLE_INPUT,"{FFFFFF}Bearbeiten - Gebäude - Name","{FFFFFF}Gebe bitte den neuen Namen ein:","{FFFFFF}Weiter","{FFFFFF}Abbrechen");
}
case 1:
{
GetPlayerPos(playerid,x,y,z);
BuildingInfo[i][building_Pos][0] = x;
BuildingInfo[i][building_Pos][1] = y;
BuildingInfo[i][building_Pos][2] = z;
DestroyDynamicPickup(BuildingInfo[i][building_Pickup]);
BuildingInfo[i][building_Pickup] = CreateDynamicPickup(19132,23,x,y,z,0,0);
ShowEditBuilding(playerid,i);
}
case 2:
{
GetPlayerPos(playerid,x,y,z);
BuildingInfo[i][building_Pos][3] = x;
BuildingInfo[i][building_Pos][4] = y;
BuildingInfo[i][building_Pos][5] = z;
BuildingInfo[i][building_Interior] = GetPlayerInterior(playerid);
BuildingInfo[i][building_World] = GetPlayerVirtualWorld(playerid);
ShowEditBuilding(playerid,i);
}
case 3:
{
DeleteBuilding(playerid,i);
}
}
return 1;
}
case DIALOG_EDIT_BUILDING_NAME:
{
new i = GetPVarInt(playerid,"ID");
if(!response)return ShowEditBuilding(playerid,i);
format(BuildingInfo[i][building_Name],255,"%s",inputtext);
return ShowEditBuilding(playerid,i);
}
case DIALOG_VEH:
{
if(!response)return 1;
new Float:pos[3];
GetPlayerPos(playerid,pos[0],pos[1],pos[2]);
Admincar[playerid] = CreateVehicle(listitem+400,pos[0],pos[1],pos[2],0,-1,-1,-1,1);
SetVehicleNumberPlate(Admincar[playerid],"Team");
SetVehicleToRespawn(Admincar[playerid]);
PutPlayerInVehicle(playerid,Admincar[playerid],0);
SetVehicleHealth(Admincar[playerid],50000);
return 1;
}
case DIALOG_SKINS:
{
if (response) {
//listitem = CharacterInfo[playerid][character_Skin][0];
SetPlayerSkin(playerid, listitem);
SendInfo(playerid,"Du hast deinen Skin erfolgreich geändert");
}
}
}
return 1;
}
Alles anzeigen
Ich hab hier mal den logindailog in ein stock und die restlichen dialoge in ein stock gemacht.
So sieht nun OnDialogResponse aus.
Die Dialoge und TeleportInfo sind im Hauptsrcipt in Enums definiert. Wo liegt hier der Fehler?