ID deaktivieren?

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 Leute,
    Gibt es eine Möglichkeit eine ID zu deaktivieren?
    Also ich möchte zum Beispiel, dass KEIN Spieler die ID 4 bekommt.
    Kann man das iwie machen?


    LG
    Kai

    Meine Ziele
    350 Posts [X]

    375 Posts [X]

    400 Posts []

    425 Posts []

    450 Posts []



  • Oder du wartest, um ID X zu blockieren,
    bis jmd für playerid = X-1 joint,
    und lässt dann n Bot joinen.


    Spart zwar Bots,
    es können aber Probleme auftreten,
    wenn in dem Moment jmd joint.


    P.S.: Das Blockieren einer playerid ist übrigens voll der schwachsinn ;)

  • Hier OnPlayerConnect:
    public OnPlayerConnect(playerid)
    {


    new string[128];
    new string2[128];
    new plname[MAX_PLAYER_NAME];
    new playersip[64];
    new zone[MAX_ZONE_NAME];
    new bancheck[64];
    new msg2[128];
    new y, m, d;
    new h,mi,s;
    getdate(y,m,d);
    gettime(h,mi,s);
    GetPlayer2DZone(playerid, zone, MAX_ZONE_NAME);
    GetPlayerName(playerid, plname, sizeof(plname));
    GetPlayerIp(playerid,playersip,sizeof(playersip));
    format(string, sizeof(string),"%s",playersip);
    gPlayerUsingLoopingAnim[playerid] = 0;
    gPlayerAnimLibsPreloaded[playerid] = 0;

    if(IsPlayerNPC(playerid))
    {
    SpawnPlayer(playerid);
    return 1;
    }


    gActivePlayers[playerid]++;
    numplayers++;
    TestPoints[playerid] = 0;
    OfficerCourseStep[playerid] = 255;
    IsPlayerInEVehicle[playerid] = 9999;

    format(bancheck, sizeof(bancheck),"LARP/Users/Bans/%s.ban",playersip);


    if(dini_Exists(bancheck))
    {
    ClearChatbox(playerid, 10);


    if(!strcmp(dini_Get(bancheck,"BanName"),plname,true))
    {
    SendClientMessage(playerid, COLOR_NICERED,"=======================================YOU ARE BANNED======================================");
    SendClientMessage(playerid, COLOR_LIGHTRED,"Dieser Name ist gebannt.");
    SendClientMessage(playerid, COLOR_LIGHTRED,"Wenn du entbannt werden willst, komm zu unseren Forum: www.germannewreal.tk");
    SendClientMessage(playerid, COLOR_NICERED,"=======================================BAN INFORMATION===================================");
    format(msg2,sizeof(msg2),"Ban issued by administrator: %s",dini_Get(bancheck,"BannedBy"));
    SendClientMessage(playerid, COLOR_WHITE,msg2);
    format(msg2,sizeof(msg2),"Ban issued on: %s",dini_Get(bancheck,"BanDate"));
    SendClientMessage(playerid, COLOR_WHITE,msg2);
    format(msg2,sizeof(msg2),"Ban Reason: %s",dini_Get(bancheck,"BanReason"));
    SendClientMessage(playerid, COLOR_WHITE,msg2);
    SendClientMessage(playerid, COLOR_NICERED,"========================================YOU ARE BANNED=======================================");


    format(msg2,sizeof(msg2),"[ADMIN]: %s (%d), Has been kicked for Possible Ban Evading",plname,playerid);
    SendAdminMessage(COLOR_LIGHTRED,msg2);


    format(msg2,sizeof(msg2),"(%d/%d/%d) [%d:%d:%d] %s Has been kicked by the anticheat for Possible Ban Evading",d,m,y,h,mi,s,plname);
    KickLog(msg2);


    OnPlayerUpdateEx(playerid);
    SetTimerEx("KickPlayerOut",500,false,"i",playerid);
    return 0;
    }
    else
    {
    SendClientMessage(playerid, COLOR_NICERED,"=======================================YOU ARE BANNED======================================");
    SendClientMessage(playerid, COLOR_NICERED,"=======================================BAN INFORMATION=====================================");
    format(msg2,sizeof(msg2),"Name of the account Banned on the ip %s: %s",playersip, dini_Get(bancheck,"BanName"));
    SendClientMessage(playerid, COLOR_WHITE,msg2);
    format(msg2,sizeof(msg2),"Ban issued by administrator: %s",dini_Get(bancheck,"BannedBy"));
    SendClientMessage(playerid, COLOR_WHITE,msg2);
    format(msg2,sizeof(msg2),"Ban issued on date: %s",dini_Get(bancheck,"BanDate"));
    SendClientMessage(playerid, COLOR_WHITE,msg2);
    format(msg2,sizeof(msg2),"Ban Reason: %s",dini_Get(bancheck,"BanReason"));
    SendClientMessage(playerid, COLOR_WHITE,msg2);
    SendClientMessage(playerid, COLOR_NICERED,"========================================YOU ARE BANNED=======================================");


    format(msg2,sizeof(msg2),"[ADMIN]: %s (%d), wurde vom Server gekickt",plname,playerid);
    SendAdminMessage(COLOR_LIGHTRED,msg2);


    format(msg2,sizeof(msg2),"(%d/%d/%d) [%d:%d:%d] %s wurde vom Anticheat gekickt",d,m,y,h,mi,s,plname);
    KickLog(msg2);


    format(msg2,sizeof(msg2),"LARP/Users/%s.ini",plname);
    if(dini_Exists(msg2))
    {
    dini_IntSet(msg2,"Banned",1);
    }


    OnPlayerUpdateEx(playerid);
    SetTimerEx("KickPlayerOut",500,false,"i",playerid);
    return 0;
    }
    }


    format(bancheck, sizeof(bancheck),"LARP/Users/%s.ini",plname);
    if(dini_Exists(bancheck))
    {
    if(dini_Int(bancheck,"Banned") == 1)
    {
    ClearChatbox(playerid, 10);


    SendClientMessage(playerid, COLOR_NICERED,"=======================================YOU ARE BANNED=======================================");
    format(msg2,sizeof(msg2),"[ADMIN]: %s (%d), wurde gebannt",plname,playerid);
    SendAdminMessage(COLOR_LIGHTRED,msg2);
    format(msg2,sizeof(msg2),"[ADMIN]: IP %s wurde zu Bannliste hinzugefügt.",playersip);
    SendAdminMessage(COLOR_WHITE,msg2);


    format(msg2,sizeof(msg2),"(%d/%d/%d) [%d:%d:%d] %s wurde vom Anticheat gekickt",d,m,y,h,mi,s,plname);
    KickLog(msg2);


    SetTimerEx("ScriptBan",500,false,"iis",playerid,999,"Ban Evading");
    return 0;
    }
    }

    format(pFILE[playerid], 128, "LARP/Users/Aliases/%s.txt", plname);
    dini_Create(pFILE[playerid]);
    dini_Set(pFILE[playerid], "Nameip", playersip);


    if(strlen(dini_Get("LARP/Users/Aliases/ips.txt", plname)) == 0)
    {
    dini_Set("LARP/Users/Aliases/ips.txt", plname, playersip);
    }
    else
    {
    if( strfind( dini_Get("LARP/Users/Aliases/ips.txt", plname), playersip, true) == -1 )
    {
    format(string,sizeof(string),"%s, %s", dini_Get("LARP/Users/Aliases/ips.txt",plname), playersip);
    dini_Set("LARP/Users/Aliases/ips.txt", plname, string);
    }
    }


    new pAKA[256];
    pAKA = dini_Get("LARP/Users/Aliases/alias.txt",playersip);
    new pIPs[256];
    pIPs = dini_Get("LARP/Users/Aliases/ips.txt",plname);


    if (strlen(pAKA) < 3)
    {
    format(string,sizeof(string),"[INFO]: %s (%d) hat den Server betreten. (%s)", plname, playerid,playersip);
    if (strlen(pIPs) < 3) SendIP = 0;
    else if (!strcmp(pIPs,playersip,true)) SendIP = 0;
    else
    {
    if(strlen(pIPs) >= 128)
    {
    format(string2,sizeof(string2),"* %s (%d)'s Other IPs: -Too Many, Be Careful-", plname, playerid);
    }
    else
    {
    format(string2,sizeof(string2),"* %s (%d)'s Other IPs: %s", plname, playerid, pIPs);
    }
    SendIP = 1;
    }
    }
    else if (!strcmp(pAKA,plname,true))
    {
    format(string,sizeof(string),"[INFO]: %s (%d) hat den Server betreten. (%s)", plname, playerid,playersip);
    if (strlen(pIPs) < 3) SendIP = 0;
    else if (!strcmp(pIPs,playersip,true)) SendIP = 0;
    else
    {
    if(strlen(pIPs) >= 128)
    {
    format(string2,sizeof(string2),"* %s (%d)'s Other IPs: -Too Many, Be Careful-", plname, playerid);
    }
    else
    {
    format(string2,sizeof(string2),"* %s (%d)'s Other IPs: %s", plname, playerid, pIPs);
    }
    SendIP = 1;
    }
    }
    else
    {
    format(string,sizeof(string),"[INFO]: %s (%d) hat den Server betreten (%s). (Alias: %s)", plname, playerid,playersip, pAKA);
    if (strlen(pIPs) < 3) SendIP = 0;
    else if (!strcmp(pIPs,playersip,true)) SendIP = 0;
    else
    {
    if(strlen(pIPs) >= 128)
    {
    format(string2,sizeof(string2),"* %s (%d)'s Other IPs: -Too Many, Be Careful-", plname, playerid);
    }
    else
    {
    format(string2,sizeof(string2),"* %s (%d)'s Other IPs: %s", plname, playerid, pIPs);
    }
    SendIP = 1;
    }
    }


    for(new i = 0; i < MAX_PLAYERS; i++)
    {
    if(IsPlayerConnected(i) && playerid != i)
    {
    if(PlayerInfo[i][pAdmin] > 1)
    {
    SendClientMessage(i,COLOR_GREEN,string);
    if(SendIP == 1)
    {
    SendClientMessage(i,COLOR_GREEN,string2);
    SendIP = 0;
    }
    }
    else
    {
    format(string,sizeof(string),"* %s (%d) hat den Server betreten", plname, playerid);
    SendClientMessage(i,COLOR_GREY,string);
    }
    }
    }

    format(string, sizeof(string), "LARP/Users/%s.ini", plname);
    SendClientMessage(playerid, COLOR_YELLOW2, "Please wait...");
    if(fexist(string))
    {
    gPlayerAccount[playerid] = 1;
    }
    else
    {
    gPlayerAccount[playerid] = 0;
    }
    //fclose(hFile);


    return 1;
    }



    edit: OnPlayerConnect ist in wirklichkeit viel länger, aber das sind nur Spieler Infos

    Meine Ziele
    350 Posts [X]

    375 Posts [X]

    400 Posts []

    425 Posts []

    450 Posts []