Beiträge von xFreeze

    Ohje, nicht mal C&P Fähig, gib in das bestehende Public OnRconLoginAttempt das ein:



    if(!success)
    {
    new pip[16];
    for(new i=0; i<MAX_PLAYERS; i++)
    {
    GetPlayerIp(i, pip, sizeof(pip));
    if(!strcmp(ip, pip, true))
    {
    new string[164];
    format(string,sizeof(string),"Admin Console: Der Spieler %s wurde vom Server gebannt. Grund: Falsches RCON Passwort",PlayerName(i));
    SendClientMessageToAll(Rot,string);
    SpielerInfo[i][pBann]=1;
    printf("Admin Console: Der Spieler %s wurde vom Server gekickt. Grund: Falsches RCON Login",PlayerName(i));
    Ban(i);
    }
    }
    }

    Das einfach einfügen, dann wird er gleich gebannt beim falschen PW



    public OnRconLoginAttempt(ip[], password[], success)
    {
    if(!success)
    {
    new pip[16];
    for(new i=0; i<MAX_PLAYERS; i++)
    {
    GetPlayerIp(i, pip, sizeof(pip));
    if(!strcmp(ip, pip, true))
    {
    new string[164];
    format(string,sizeof(string),"Admin Console: Der Spieler %s wurde vom Server gebannt. Grund: Falsches RCON Passwort",PlayerName(i));
    SendClientMessageToAll(Rot,string);
    SpielerInfo[i][pBann]=1;
    printf("Admin Console: Der Spieler %s wurde vom Server gekickt. Grund: Falsches RCON Login",PlayerName(i));
    Ban(i);
    }
    }
    }
    return 1;

    Wie du kommst nicht mit? o.o
    Du erstellst erst ein public den du bei OnGameModeInit einfügst, dort schreibst du einen Timer rein, mehr ist das nicht

    public Timer()
    {
    SetTimer("Timer",true,1000*60*5);
    }

    Ich habe mit einem Programm einen Klammerfehler gesucht und es wurde nur einer gefunden, ich habe den Code gepostet aber mehr findet es nicht.

    Sry, jetzt

    Spoiler anzeigen
    else if(newkeys == KEY_SECONDARY_ATTACK)
    {
    if(!IsPlayerInAnyVehicle(playerid))
    {
    for(new i;i<MAX_BIZ;i++)
    {
    if(IsPlayerInRangeOfPoint(playerid,2,BizInfo[i][bPosX],BizInfo[i][bPosY],BizInfo[i][bPosZ]))
    {
    if(!strcmp(BizInfo[i][bTyp],"Werbung",true))
    {
    SCM(playerid,COLOR_LIGHTRED,"Du kannst das Werbungsunternehmen nicht betreten, um eine Werbung zu schreiben nutze: /ad [Text]");
    }
    else
    {
    if(BizInfo[i][bLocked] == 0)
    {
    SetPlayerInterior(playerid, BizInfo[i][bInterior]);
    SetPlayerPos(playerid, BizInfo[i][bIntX], BizInfo[i][bIntY], BizInfo[i][bIntZ]);
    SCM(playerid,COLOR_WHITE,"Um das Business zu verlassen, begib dich zum Ausgang und drücke Enter!");
    }
    else
    {
    GameTextForPlayer(playerid,"~r~Abgeschlossen!",2000,1);
    }
    }
    }
    else if(IsPlayerInRangeOfPoint(playerid,3,BizInfo[i][bIntX],BizInfo[i][bIntY],BizInfo[i][bIntZ]))
    {
    SetPlayerInterior(playerid, 0);
    SetPlayerPos(playerid, BizInfo[i][bPosX],BizInfo[i][bPosY],BizInfo[i][bPosZ]);
    }
    }
    for(new i;i<MAX_HAEUSER;i++)
    {
    if(IsPlayerInRangeOfPoint(playerid,2,HausInfo[i][hPosX],HausInfo[i][hPosY],HausInfo[i][hPosZ]))
    {
    if(HausInfo[i][hLocked] == 0)
    {
    SetPlayerInterior(playerid, HausInfo[i][hInterior]);
    SetPlayerPos(playerid, HausInfo[i][hIntX], HausInfo[i][hIntY], HausInfo[i][hIntZ]);
    SCM(playerid,COLOR_WHITE,"Um das Haus zu verlassen, begib dich zum Ausgang und drücke Enter!");
    }
    else
    {
    GameTextForPlayer(playerid,"~r~Abgeschlossen!",2000,1);
    }
    }
    else if(IsPlayerInRangeOfPoint(playerid,3,HausInfo[i][hIntX],HausInfo[i][hIntY],HausInfo[i][hIntZ]))
    {
    SetPlayerInterior(playerid, 0);
    SetPlayerPos(playerid, HausInfo[i][hPosX],HausInfo[i][hPosY],HausInfo[i][hPosZ]);
    }
    }
    if(IsPlayerInRangeOfPoint(playerid,2,1555.2087,-1675.6969,16.1953))
    {
    SetPlayerPos(playerid,238.5645,139.1883,1003.0234);
    SetPlayerInterior(playerid,3);
    SetPlayerVirtualWorld(playerid,7);
    }
    else if(IsPlayerInRangeOfPoint(playerid,2,238.5645,139.1883,1003.0234))
    {
    SetPlayerPos(playerid,1555.2087,-1675.6969,16.1953);
    SetPlayerInterior(playerid,0);
    SetPlayerVirtualWorld(playerid,0);
    }
    else if(IsPlayerInRangeOfPoint(playerid,2,1467.2745,-1009.9218,26.8438))
    {
    SetPlayerPos(playerid,1415.951171,-988.971191,1639.980224);
    SetPlayerVirtualWorld(playerid,1);
    }
    else if(IsPlayerInRangeOfPoint(playerid,2,1415.951171,-988.971191,1639.980224))
    {
    SetPlayerPos(playerid,1467.2745,-1009.9218,26.8438);
    SetPlayerVirtualWorld(playerid,0);
    }
    else if(IsPlayerInRangeOfPoint(playerid,2,1482.8876,-1807.3569,15.4766))
    {
    SetPlayerPos(playerid,390.7678,173.7899,1008.3828);
    SetPlayerInterior(playerid,3);
    SetPlayerVirtualWorld(playerid,2);

    Spoiler anzeigen
    else if(IsPlayerInRangeOfPoint(playerid,2,390.7678,173.7899,1008.3828))
    {
    SetPlayerPos(playerid,1482.8876,-1807.3569,16.4766);
    SetPlayerInterior(playerid,0);
    SetPlayerVirtualWorld(playerid,0);
    }
    else if(IsPlayerInRangeOfPoint(playerid,2,1752.6875,-1930.0626,13.5763))
    {
    SetPlayerPos(playerid,2731.1636,-2486.7097,313.6659);
    SetPlayerVirtualWorld(playerid,3);
    SetPVarInt(playerid,"Helpcenter",1);
    }
    else if(IsPlayerInRangeOfPoint(playerid,2,1772.5376,-1653.6753,14.4229))
    {
    SetPlayerPos(playerid,2731.1636,-2486.7097,313.6659);
    SetPlayerVirtualWorld(playerid,4);
    SetPVarInt(playerid,"Helpcenter",2);
    }
    else if(IsPlayerInRangeOfPoint(playerid,2,1031.8666,-1435.2271,13.5546))
    {
    SetPlayerPos(playerid,2731.1636,-2486.7097,313.6659);
    SetPlayerVirtualWorld(playerid,5);
    SetPVarInt(playerid,"Helpcenter",3);
    }
    else if(IsPlayerInRangeOfPoint(playerid,2,2731.1636,-2486.7097,313.6659))
    {
    if(GetPVarInt(playerid,"Helpcenter") == 1)
    {
    SetPlayerPos(playerid,1752.6875,-1930.0626,13.5763);
    SetPlayerVirtualWorld(playerid,0);
    }
    else if(GetPVarInt(playerid,"Helpcenter") == 2)
    {
    SetPlayerPos(playerid,1772.5376,-1653.6753,14.4229);
    SetPlayerVirtualWorld(playerid,0);
    }
    else if(GetPVarInt(playerid,"Helpcenter") == 3)
    {
    SetPlayerPos(playerid,1031.8666,-1435.2271,13.5546);
    SetPlayerVirtualWorld(playerid,0);
    }
    }
    else if(IsPlayerInRangeOfPoint(playerid,3,1731.61, -1130.11, 23.04))
    {
    if(isPlayerInFrakt(playerid,4) && isPlayerFeuerwehr(playerid))
    {
    MoveDynamicObject(lsfdtuer1, 1731.61, -1130.11, 23.04,2,0.00, 0.00, 90.00);
    SetTimer("lsfdtuer1zu",2000,0);
    SCM(playerid,COLOR_PURPLE,"Die Tür schliesst in 2 Sekunden automatisch!");
    }
    }
    else if(IsPlayerInRangeOfPoint(playerid,3,1735.13, -1101.33, 23.04))
    {
    if(isPlayerInFrakt(playerid,4) && isPlayerFeuerwehr(playerid))
    {
    MoveDynamicObject(lsfdtuer2, 1735.13, -1101.33, 23.04,2, 0.00, 0.00, 280.00);
    SetTimer("lsfdtuer2zu",2000,0);
    SCM(playerid,COLOR_PURPLE,"Die Tür schliesst in 2 Sekunden automatisch!");
    }
    }
    else if(IsPlayerInRangeOfPoint(playerid,2,1324.0826,-1841.6254,13.5469))
    {
    SetPlayerPos(playerid,-2029.5314,-117.9387,1035.1719);
    SetPlayerInterior(playerid,3);
    SetPlayerVirtualWorld(playerid,8);
    }
    else if(IsPlayerInRangeOfPoint(playerid,2,-2029.6566,-119.6220,1035.1719))
    {
    SetPlayerPos(playerid,1324.0826,-1841.6254,13.5469);
    SetPlayerInterior(playerid,0);
    SetPlayerVirtualWorld(playerid,0);
    }
    else if(IsPlayerInRangeOfPoint(playerid,2,1094.3629,-1323.5400,15.1867))
    {
    if(isPlayerInFrakt(playerid,4) && !isPlayerFeuerwehr(playerid))
    {
    SetPlayerPos(playerid,340.3668,169.3899,1019.9912);
    SetPlayerInterior(playerid,3);
    SetPlayerVirtualWorld(playerid,9);
    }
    }
    else if(IsPlayerInRangeOfPoint(playerid,2,340.3668,169.3899,1019.9912))
    {
    if(isPlayerInFrakt(playerid,4) && !isPlayerFeuerwehr(playerid))
    {
    SetPlayerPos(playerid,1094.3629,-1323.5400,15.1867);
    SetPlayerInterior(playerid,0);
    SetPlayerVirtualWorld(playerid,0);
    }
    }
    else if(IsPlayerInRangeOfPoint(playerid,1,-688.0869,942.6823,13.6328) && isPlayerInFrakt(playerid,7))
    {
    SetPlayerPos(playerid,-688.0062,944.4323,13.6328);
    }
    else if(IsPlayerInRangeOfPoint(playerid,1,-688.0062,944.4323,13.6328) && isPlayerInFrakt(playerid,7))
    {
    SetPlayerPos(playerid,-688.0869,942.6823,13.6328);
    }
    }
    }

    Spoiler anzeigen

    else if(newkeys == KEY_SECONDARY_ATTACK)
    {
    if(!IsPlayerInAnyVehicle(playerid))
    {
    for(new i;i<MAX_BIZ;i++)
    {
    if(IsPlayerInRangeOfPoint(playerid,2,BizInfo[i][bPosX],BizInfo[i][bPosY],BizInfo[i][bPosZ]))
    {
    if(!strcmp(BizInfo[i][bTyp],"Werbung",true))
    {
    SCM(playerid,COLOR_LIGHTRED,"Du kannst das Werbungsunternehmen nicht betreten, um eine Werbung zu schreiben nutze: /ad [Text]");
    }
    else
    {
    if(BizInfo[i][bLocked] == 0)
    {
    SetPlayerInterior(playerid, BizInfo[i][bInterior]);
    SetPlayerPos(playerid, BizInfo[i][bIntX], BizInfo[i][bIntY], BizInfo[i][bIntZ]);
    SCM(playerid,COLOR_WHITE,"Um das Business zu verlassen, begib dich zum Ausgang und drücke Enter!");
    }
    else
    {
    GameTextForPlayer(playerid,"~r~Abgeschlossen!",2000,1);
    }
    //Klammer Fehlt
    }
    }
    else if(IsPlayerInRangeOfPoint(playerid,3,BizInfo[i][bIntX],BizInfo[i][bIntY],BizInfo[i][bIntZ]))
    {
    SetPlayerInterior(playerid, 0);
    SetPlayerPos(playerid, BizInfo[i][bPosX],BizInfo[i][bPosY],BizInfo[i][bPosZ]);
    }
    }
    for(new i;i<MAX_HAEUSER;i++)
    {
    if(IsPlayerInRangeOfPoint(playerid,2,HausInfo[i][hPosX],HausInfo[i][hPosY],HausInfo[i][hPosZ]))
    {
    if(HausInfo[i][hLocked] == 0)
    {
    SetPlayerInterior(playerid, HausInfo[i][hInterior]);
    SetPlayerPos(playerid, HausInfo[i][hIntX], HausInfo[i][hIntY], HausInfo[i][hIntZ]);
    SCM(playerid,COLOR_WHITE,"Um das Haus zu verlassen, begib dich zum Ausgang und drücke Enter!");
    }
    else
    {
    GameTextForPlayer(playerid,"~r~Abgeschlossen!",2000,1);
    }
    }
    else if(IsPlayerInRangeOfPoint(playerid,3,HausInfo[i][hIntX],HausInfo[i][hIntY],HausInfo[i][hIntZ]))
    {
    SetPlayerInterior(playerid, 0);
    SetPlayerPos(playerid, HausInfo[i][hPosX],HausInfo[i][hPosY],HausInfo[i][hPosZ]);
    }
    }
    if(IsPlayerInRangeOfPoint(playerid,2,1555.2087,-1675.6969,16.1953))
    {
    SetPlayerPos(playerid,238.5645,139.1883,1003.0234);
    SetPlayerInterior(playerid,3);
    SetPlayerVirtualWorld(playerid,7);
    }
    else if(IsPlayerInRangeOfPoint(playerid,2,238.5645,139.1883,1003.0234))
    {
    SetPlayerPos(playerid,1555.2087,-1675.6969,16.1953);
    SetPlayerInterior(playerid,0);
    SetPlayerVirtualWorld(playerid,0);
    }
    else if(IsPlayerInRangeOfPoint(playerid,2,1467.2745,-1009.9218,26.8438))
    {
    SetPlayerPos(playerid,1415.951171,-988.971191,1639.980224);
    SetPlayerVirtualWorld(playerid,1);
    }
    else if(IsPlayerInRangeOfPoint(playerid,2,1415.951171,-988.971191,1639.980224))
    {
    SetPlayerPos(playerid,1467.2745,-1009.9218,26.8438);
    SetPlayerVirtualWorld(playerid,0);
    }
    else if(IsPlayerInRangeOfPoint(playerid,2,1482.8876,-1807.3569,15.4766))
    {
    SetPlayerPos(playerid,390.7678,173.7899,1008.3828);
    SetPlayerInterior(playerid,3);
    SetPlayerVirtualWorld(playerid,2);

    Spoiler anzeigen
    else if(IsPlayerInRangeOfPoint(playerid,2,390.7678,173.7899,1008.3828))
    {
    SetPlayerPos(playerid,1482.8876,-1807.3569,16.4766);
    SetPlayerInterior(playerid,0);
    SetPlayerVirtualWorld(playerid,0);
    }
    else if(IsPlayerInRangeOfPoint(playerid,2,1752.6875,-1930.0626,13.5763))
    {
    SetPlayerPos(playerid,2731.1636,-2486.7097,313.6659);
    SetPlayerVirtualWorld(playerid,3);
    SetPVarInt(playerid,"Helpcenter",1);
    }
    else if(IsPlayerInRangeOfPoint(playerid,2,1772.5376,-1653.6753,14.4229))
    {
    SetPlayerPos(playerid,2731.1636,-2486.7097,313.6659);
    SetPlayerVirtualWorld(playerid,4);
    SetPVarInt(playerid,"Helpcenter",2);
    }
    else if(IsPlayerInRangeOfPoint(playerid,2,1031.8666,-1435.2271,13.5546))
    {
    SetPlayerPos(playerid,2731.1636,-2486.7097,313.6659);
    SetPlayerVirtualWorld(playerid,5);
    SetPVarInt(playerid,"Helpcenter",3);
    }
    else if(IsPlayerInRangeOfPoint(playerid,2,2731.1636,-2486.7097,313.6659))
    {
    if(GetPVarInt(playerid,"Helpcenter") == 1)
    {
    SetPlayerPos(playerid,1752.6875,-1930.0626,13.5763);
    SetPlayerVirtualWorld(playerid,0);
    }
    else if(GetPVarInt(playerid,"Helpcenter") == 2)
    {
    SetPlayerPos(playerid,1772.5376,-1653.6753,14.4229);
    SetPlayerVirtualWorld(playerid,0);
    }
    else if(GetPVarInt(playerid,"Helpcenter") == 3)
    {
    SetPlayerPos(playerid,1031.8666,-1435.2271,13.5546);
    SetPlayerVirtualWorld(playerid,0);
    }
    }
    else if(IsPlayerInRangeOfPoint(playerid,3,1731.61, -1130.11, 23.04))
    {
    if(isPlayerInFrakt(playerid,4) && isPlayerFeuerwehr(playerid))
    {
    MoveDynamicObject(lsfdtuer1, 1731.61, -1130.11, 23.04,2,0.00, 0.00, 90.00);
    SetTimer("lsfdtuer1zu",2000,0);
    SCM(playerid,COLOR_PURPLE,"Die Tür schliesst in 2 Sekunden automatisch!");
    }
    }
    else if(IsPlayerInRangeOfPoint(playerid,3,1735.13, -1101.33, 23.04))
    {
    if(isPlayerInFrakt(playerid,4) && isPlayerFeuerwehr(playerid))
    {
    MoveDynamicObject(lsfdtuer2, 1735.13, -1101.33, 23.04,2, 0.00, 0.00, 280.00);
    SetTimer("lsfdtuer2zu",2000,0);
    SCM(playerid,COLOR_PURPLE,"Die Tür schliesst in 2 Sekunden automatisch!");
    }
    }
    else if(IsPlayerInRangeOfPoint(playerid,2,1324.0826,-1841.6254,13.5469))
    {
    SetPlayerPos(playerid,-2029.5314,-117.9387,1035.1719);
    SetPlayerInterior(playerid,3);
    SetPlayerVirtualWorld(playerid,8);
    }
    else if(IsPlayerInRangeOfPoint(playerid,2,-2029.6566,-119.6220,1035.1719))
    {
    SetPlayerPos(playerid,1324.0826,-1841.6254,13.5469);
    SetPlayerInterior(playerid,0);
    SetPlayerVirtualWorld(playerid,0);
    }
    else if(IsPlayerInRangeOfPoint(playerid,2,1094.3629,-1323.5400,15.1867))
    {
    if(isPlayerInFrakt(playerid,4) && !isPlayerFeuerwehr(playerid))
    {
    SetPlayerPos(playerid,340.3668,169.3899,1019.9912);
    SetPlayerInterior(playerid,3);
    SetPlayerVirtualWorld(playerid,9);
    }
    }
    else if(IsPlayerInRangeOfPoint(playerid,2,340.3668,169.3899,1019.9912))
    {
    if(isPlayerInFrakt(playerid,4) && !isPlayerFeuerwehr(playerid))
    {
    SetPlayerPos(playerid,1094.3629,-1323.5400,15.1867);
    SetPlayerInterior(playerid,0);
    SetPlayerVirtualWorld(playerid,0);
    }
    }
    else if(IsPlayerInRangeOfPoint(playerid,1,-688.0869,942.6823,13.6328) && isPlayerInFrakt(playerid,7))
    {
    SetPlayerPos(playerid,-688.0062,944.4323,13.6328);
    }
    else if(IsPlayerInRangeOfPoint(playerid,1,-688.0062,944.4323,13.6328) && isPlayerInFrakt(playerid,7))
    {
    SetPlayerPos(playerid,-688.0869,942.6823,13.6328);
    }
    }
    }

    Ich habe es so versucht:

    for(new i=1; i<MAX_PLAYERS; i++)
    {
    if(listitem==i)
    {
    ZeileZ[playerid]=listitem;
    SendClientMessageEx(playerid,Rot,"%i",ZeileZ[playerid]);
    break;
    }
    }


    Aber die Zahl bleibt permanent auf 1, was ist de Fehler?

    Hey ich versuche gerade zeitlich beim klicken auf ein Listitem eine Variable zu setten,
    aber ich schaffe es irgendwie nicht und ich will zeilen sparen und ich brauche eine andere Möglichkeit
    Weil das frisst zu viel Zeilen

    if(listitem==1)
    {
    x=1;
    }


    if(listitem==2)
    {
    x=2;
    }
    .....