Beiträge von _Tweak_

    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

    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

    Hey ich hab folgendes Problem.
    Wenn man den Befehl eingibt, wird man vom Server geschmissen und samp crasht.
    Hier der Pawno ausschnitt



    if(strcmp(cmd, "/advertise", true) == 0 || strcmp(cmd, "/ad", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    if(gPlayerLogged[playerid] == 0)
    {
    SendClientMessage(playerid, COLOR_GREY, "** You havent logged in yet !");
    return 1;
    }
    if(PlayerInfo[playerid][pMuted] == 1)
    {
    SendClientMessage(playerid, TEAM_CYAN_COLOR, "Du bist gemutet!");
    return 1;
    }
    new length = strlen(cmdtext);
    while ((idx < length) && (cmdtext[idx] <= ' '))
    {
    idx++;
    }
    new offset = idx;
    new result[128];
    while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
    {
    result[idx - offset] = cmdtext[idx];
    idx++;
    }
    result[idx - offset] = EOS;
    if(!strlen(result))
    {
    SendClientMessage(playerid, COLOR_GRAD2, "Benutzung: (/ad)vertise [Text]");
    return 1;
    }
    if ((!adds) && (PlayerInfo[playerid][pAdmin] < 1))
    {
    format(string, sizeof(string), "** Bitte versuch es nach %d Sekunden erneut !", (addtimer/1000));
    SendClientMessage(playerid, COLOR_GRAD2, string);
    return 1;
    }
    SafeGivePlayerMoney(playerid, -50);
    format(string, sizeof(string), "WERBUNG: %s, Kontakt %s (Nummer: %d)", result, sendername ,PlayerInfo[playerid][pPnumber]);
    SendClientMessageToAll(COLOR_ORANGE,string);
    GameTextForPlayer(playerid, "w~Preis:~g~$50", 4321,1);
    if (PlayerInfo[playerid][pAdmin] < 1){SetTimer("AddsOn", addtimer, 0);adds = 0;}
    new y,m,d;
    new h,mi,s;
    getdate(y,m,d);
    gettime(h,mi,s);
    format(string, sizeof(string), "[%d/%d/%d](%d:%d:%d) %s (Advertisement): %s",d,m,y,h,mi,s, sendername, result);
    ChatLog(string);
    }
    return 1;
    }



    edit: Das Spiel crasht aber nur bei diesem Command

    Also ich hab keine Bots.


    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

    Hallo Leute,
    Ich war grade auf dem Server und es haben einige User den Server betreten.
    Plötzlich waren sie aber alle wieder weg.
    Ich hab mir das ne Zeit lang angesehen und habe gemerkt, dass die ID 4 verbuggt sein muss.
    Denn alle user ab ID 4 werden einfach so vom Server geschmissen, ohne meldung...
    An was liegt das?


    edit: Neue Überschrift + Rechtschreibfehler

    Hey, ich hab seit kurzem das Problem, dass ich wenn ich MMB klicke eine Lupe kommt anstatt ein neuer Tab.
    Also ich will einen Link in einem neuen Tab per MMB öffnen, aber es kommt eine Lupe um die Seite zu vergrößern bzw zu verkleineren.
    Wenn ich bei San Andreas MMB klicke, schau ich nicht rückwärts, sondern wechsel meine Waffen.
    Wie kann ich das wieder umstellen?

    Hey Leute,
    Ich hab mir jetzt ein WBB Forum zugelegt, aber leider weiß ich nicht wie man oben weitere Buttons hinzufügt.
    Immoment hab ich nur 2: Forum und Mitglieder.


    LG


    Tweak


    PS: Ich vermute mal, dass die falsche Kategorie für meine Frage ist? :D

    Hi Leute,
    Ich hab heute einen Server gesehen, bei dem sich der Hostname ändert.
    Also dann steht da: Super Stunt 2.2 und dann ändert es sich auf: Startbonus 55k + 2 Score.
    Jetzt wollt ich fragen, wie man sowas machen kann.


    LG