Admin System FUnktioniert nicht.

Wichtiger Hinweis: Bitte ändert nicht manuell die Schriftfarbe auf schwarz sondern belasst es bei der Standardeinstellung. Somit tragt ihr dazu bei dass euer Text auch bei Verwendung unseren dunklen Forenstils noch lesbar ist!

Tipp: Ihr wollt längere Codeausschnitte oder Logfiles bereitstellen? Benutzt unseren eigenen PasteBin-Dienst Link
  • Hey habe ein Problem. Mein Admin System funktioniert nicht bzw die Teleports bis jetzt nicht.
    Hier mal alles. Habe keine Errors im Script bzw Warnings!
    if(dialogid == DIALOG_ADMINMENU)
    {
    if(response)
    {
    if(listitem==0)
    {
    ShowPlayerDialog(playerid, DIALOG_TELEPORTS, DIALOG_STYLE_LIST, "Teleports", "Los Santos\nSan Fierro\nLas Venturas\nNewbie Spawn\nBurger Shot North\nGOTO\nGETHERE","Auswählen","Zurück");
    }
    }
    }

    if(dialogid == DIALOG_TELEPORTS2)
    {
    if(response)
    {
    if(listitem==0)//LS
    {
    new sendername[MAX_PLAYER_NAME];
    GetPlayerName(playerid, sendername, sizeof(sendername));
    if (GetPlayerState(playerid) == 2)
    {
    new tmpcar = GetPlayerVehicleID(playerid);
    SetVehiclePos(tmpcar, 1482.49, -1708.92, 14.04);
    LinkVehicleToInterior(tmpcar,0);
    TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
    }
    else
    {
    SetPlayerPos(playerid, 1482.49, -1708.92, 14.04);
    }
    new Player;
    if(IsPlayerConnected(Player))
    {
    format(ALLSTRING, sizeof(ALLSTRING), "[ADMIN INFO] %s hat sich nach Los Santos geportet.", sendername);
    ABroadCast(0x00F5FFFF,ALLSTRING,4);
    SetPlayerInterior(playerid,0);
    PlayerInfo[playerid][pInt] = 0;
    SetPlayerVirtualWorld(playerid, 0);
    }
    }
    if(listitem==1)//SF
    {
    new sendername[MAX_PLAYER_NAME];
    GetPlayerName(playerid, sendername, sizeof(sendername));
    if (GetPlayerState(playerid) == 2)
    {
    new tmpcar = GetPlayerVehicleID(playerid);
    SetVehiclePos(tmpcar, -1974.43, 177.28, 27.68);
    LinkVehicleToInterior(tmpcar,0);
    TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
    }
    else
    {
    SetPlayerPos(playerid, -1974.43, 177.28, 27.68);
    }
    new Player;
    if(IsPlayerConnected(Player))
    {
    format(ALLSTRING, sizeof(ALLSTRING), "[ADMIN INFO] %s hat sich nach San Fierro geportet.", sendername);
    ABroadCast(0x00F5FFFF,ALLSTRING,4);
    SetPlayerInterior(playerid,0);
    PlayerInfo[playerid][pInt] = 0;
    SetPlayerVirtualWorld(playerid, 0);
    }
    }
    if(listitem==2)//LV
    {
    new sendername[MAX_PLAYER_NAME];
    GetPlayerName(playerid, sendername, sizeof(sendername));
    if (GetPlayerState(playerid) == 2)
    {
    new tmpcar = GetPlayerVehicleID(playerid);
    SetVehiclePos(tmpcar, 1699.2, 1435.1, 10.7);
    LinkVehicleToInterior(tmpcar,0);
    TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
    }
    else
    {
    SetPlayerPos(playerid, 1699.2,1435.1, 10.7);
    }
    new Player;
    if(IsPlayerConnected(Player))
    {
    format(ALLSTRING, sizeof(ALLSTRING), "[ADMIN INFO] %s hat sich nach Las Venturas geportet.", sendername);
    ABroadCast(0x00F5FFFF,ALLSTRING,4);
    SetPlayerInterior(playerid,0);
    PlayerInfo[playerid][pInt] = 0;
    SetPlayerVirtualWorld(playerid, 0);
    }
    }
    if(listitem==3)//Noob spawn
    {
    new sendername[MAX_PLAYER_NAME];
    GetPlayerName(playerid, sendername, sizeof(sendername));
    if (GetPlayerState(playerid) == 2)
    {
    new tmpcar = GetPlayerVehicleID(playerid);
    SetVehiclePos(tmpcar,1713.2837,-1890.9756,13.5670);
    SetVehicleZAngle(tmpcar,33.8881);
    LinkVehicleToInterior(tmpcar,0);
    TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
    }
    else
    {
    SetPlayerPos(playerid,1713.2837,-1890.9756,13.5670);
    SetPlayerFacingAngle(playerid,33.8881);
    }
    new Player;
    if(IsPlayerConnected(Player))
    {
    format(ALLSTRING, sizeof(ALLSTRING), "[ADMIN INFO] %s hat sich zum Zivispawn geportet.", sendername);
    ABroadCast(0x00F5FFFF,ALLSTRING,4);
    SetPlayerInterior(playerid,0);
    PlayerInfo[playerid][pInt] = 0;
    SetPlayerVirtualWorld(playerid, 0);
    }
    }
    if(listitem==4)//BSN
    {
    new sendername[MAX_PLAYER_NAME];
    GetPlayerName(playerid, sendername, sizeof(sendername));
    if (GetPlayerState(playerid) == 2)
    {
    new tmpcar = GetPlayerVehicleID(playerid);
    SetVehiclePos(tmpcar,1212.9077,-884.9197,42.9153);
    SetVehicleZAngle(tmpcar,173.6692);
    LinkVehicleToInterior(tmpcar,0);
    TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
    }
    else
    {
    SetPlayerPos(playerid,1212.9077,-884.9197,42.9153);
    SetPlayerFacingAngle(playerid,173.6692);
    }
    new Player;
    if(IsPlayerConnected(Player))
    {
    format(ALLSTRING, sizeof(ALLSTRING), "%s hat sich zum BSN geportet.", sendername);
    ABroadCast(0x00F5FFFF,ALLSTRING,4);
    SetPlayerInterior(playerid,0);
    PlayerInfo[playerid][pInt] = 0;
    SetPlayerVirtualWorld(playerid, 0);
    }
    }
    if(listitem==5)
    {
    ShowPlayerDialog(playerid, DIALOG_GOTO, DIALOG_STYLE_INPUT, "Zum Spieler Telepotieren", "Gebe die ID des Spielers ein, um dich zu ihm zu telepotieren!", "Telepotieren", "Zurück");
    }
    }
    }

    if(dialogid == DIALOG_GOTO)
    {
    if(response)
    {
    if(IsNumeric(inputtext))
    {
    new Player;
    new giveplayer[MAX_PLAYER_NAME];
    new sendername[MAX_PLAYER_NAME];
    new plo;
    new tmp[256];
    new cmd[256];
    new idx;
    tmp = strtok(cmd, idx);
    plo = ReturnUser(tmp);
    Player = strval(inputtext);
    GetPlayerName(Player, giveplayer, sizeof(giveplayer));
    GetPlayerName(playerid, sendername, sizeof(sendername));
    new Float:plocx,Float:plocy,Float:plocz;
    if(IsPlayerConnected(Player))
    {
    if(plo != INVALID_PLAYER_ID)
    {
    if(PlayerInfo[playerid][pAdmin] >= 1)
    {
    if(Spectate[playerid] != 255)
    {
    Spectate[playerid] = 256;
    }
    GetPlayerPos(plo, plocx, plocy, plocz);
    if (GetPlayerState(playerid) == 2)
    {
    new tmpcar = GetPlayerVehicleID(playerid);
    SetVehiclePos(tmpcar, plocx, plocy+4, plocz);
    TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
    }
    else
    {
    SetPlayerPos(playerid,plocx,plocy+2, plocz);
    }
    PlayerInfo[playerid][pLocal] = PlayerInfo[plo][pLocal];
    PlayerInfo[playerid][pInt] = PlayerInfo[plo][pInt];
    SetPlayerInterior(playerid,PlayerInfo[plo][pInt]);
    SetPlayerVirtualWorld(playerid,GetPlayerVirtualWorld(plo));
    SendClientMessage(playerid, COLOR_GRAD1, "Du hast dich Teleportiert.");
    GetPlayerName(plo, giveplayer, sizeof(giveplayer));
    GetPlayerName(playerid, sendername, sizeof(sendername));
    format(ALLSTRING, sizeof(ALLSTRING), "%s hat sich zu %s geportet.", sendername, giveplayer);
    ABroadCast(0x00F5FFFF,ALLSTRING,4);
    }
    }
    }
    }
    }
    }