Unbekannter Fehler! [Bitte helft mir!]

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
  • Guten Tag liebe Breadfish Community,


    Ich hab ein vorkurzem ein Script gefunden,(Name unbekannt) das gefällt mir sehr.
    Nur hab ich ein Problem wenn ich mehrer Bots aktiviere stürtzt der Server ab und es steht einfach nichts in den Logs.
    Hier die Logs!


  • Das kam jetzt noch dazu.
    Und was meintest du mit meinen Objekten ?


  • Function Timer2()
    {
    DollahScoreUpdate();
    new string[255];
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
    new Float:maxspeed = 250.0;
    new plname[MAX_PLAYER_NAME];
    if(GetPlayerState(i) == 2)
    {
    GetPlayerPos(i, TelePos[i][3], TelePos[i][4], TelePos[i][5]);
    if(TelePos[i][5] > 550.0)
    {
    TelePos[i][0] = 0.0;
    TelePos[i][1] = 0.0;
    }
    if(TelePos[i][0] != 0.0)
    {
    new Float:xdist = TelePos[i][3]-TelePos[i][0];
    new Float:ydist = TelePos[i][4]-TelePos[i][1];
    new Float:sqxdist = xdist*xdist;
    new Float:sqydist = ydist*ydist;
    new Float:distance = (sqxdist+sqydist)/31;
    if(gSpeedo[i] == 2)
    {
    if(distance <10)
    {
    format(string, 256, "~n~~n~~n~~n~~n~~n~~n~~g~mph : ~w~%.0f",distance);
    }
    if(distance > 10 && distance < 100)
    {
    format(string, 256, "~n~~n~~n~~n~~n~~n~~n~~g~mph : ~w~%.0f",distance);
    }
    if(distance > 100)
    {
    format(string, 256, "~n~~n~~n~~n~~n~~n~~n~~g~mph : ~w~%.0f",distance);
    }
    GameTextForPlayer(i, string, 2000, 5);
    }
    if(distance > maxspeed && PlayerInfo[i][pAdmin] < 1)
    {
    new tmpcar = GetPlayerVehicleID(i);
    if(!IsAPlane(tmpcar))
    {
    GetPlayerName(i, plname, sizeof(plname));
    format(string, 256, "Warnung: [%d]%s %.0f km/h",i,plname,distance);
    ABroadCast(COLOR_YELLOW,string,1);
    }
    }



    }
    if(TelePos[i][5] < 550.0 && TelePos[i][3] != 0.0)
    {
    TelePos[i][0] = TelePos[i][3];
    TelePos[i][1] = TelePos[i][4];
    }
    }




    if(IsPlayerConnected(i))
    {
    new DasGeld = GetPlayerMoney(i);
    ResetPlayerMoney(i);
    GivePlayerMoney(i, DasGeld);
    if(KickPlayer[i]==1) { Kick(i); }
    else if(KickPlayer[i]==2) { Ban(i); }
    //if(GetPlayerPing(i) >= 500 && PlayerInfo[i][pAdmin] < 1) { Kick(i); }
    if(Spectate[i] < 253 && Spectate[i] != 255)
    {
    FreezePlayer(i);
    new targetid = Spectate[i];
    if(IsPlayerConnected(targetid))
    {
    TogglePlayerSpectating(i, 1);
    if(PlayerInfo[i][pAdmin] >= 1)
    {
    new Float:health;
    new name[MAX_PLAYER_NAME];
    GetPlayerName(targetid, name, sizeof(name));
    GetPlayerHealth(targetid, health);
    format(string, sizeof(string), "~n~~n~~n~~n~~n~~n~~y~%s(ID:%d)~n~~y~Leben:%.1f",name,targetid,health);
    GameTextForPlayer(i, string, 2500, 3);
    }
    if(IsPlayerInAnyVehicle(targetid))
    {
    new carid = GetPlayerVehicleID(targetid);
    PlayerSpectateVehicle(i, carid);
    }
    else
    {
    PlayerSpectatePlayer(i, targetid);
    }
    if(GetPlayerInterior(targetid) == 0)
    {
    SetPlayerInterior(i,0);
    }
    else if(GetPlayerInterior(targetid) > 0)
    {
    SetPlayerInterior(i,GetPlayerInterior(targetid));
    }
    }//Targetid connected
    }
    if(Spectate[i] == 253)
    {
    UnFreezePlayer(i);
    TogglePlayerSpectating(i, 0);
    SetPlayerInterior(i,Unspec[i][sPint]);
    PlayerInfo[i][pInt] = Unspec[i][sPint];
    PlayerInfo[i][pLocal] = Unspec[i][sLocal];
    Unspec[i][sLocal] = 255;
    SetSpawnInfo(i, PlayerInfo[i][pTeam], PlayerInfo[i][pModel], Unspec[i][sPx], Unspec[i][sPy], Unspec[i][sPz]-1.0, 1.0, -1, -1, -1, -1, -1, -1);
    gTeam[i] = PlayerInfo[i][pTeam];
    MedicBill[i] = 0;
    SpawnPlayer(i);
    Spectate[i] = 255;
    }
    if(Spectate[i] == 254)
    {
    UnFreezePlayer(i);
    SetPlayerInterior(i,Unspec[i][sPint]);
    PlayerInfo[i][pInt] = Unspec[i][sPint];
    PlayerInfo[i][pLocal] = Unspec[i][sLocal];
    SetPlayerPos(i, Unspec[i][sPx], Unspec[i][sPy], Unspec[i][sPz]);
    Spectate[i] = 255;
    }
    if(Spectate[i] == 256)
    {
    Spectate[i] = 255;
    }
    if(Spectate[i] == 257)
    {
    Spectate[i] = 254;
    }
    }



    }
    SetPlayerUnjail();
    {
    new Hour,Minute,Sec,String[12];
    gettime(Hour,Minute,Sec);
    format(String,sizeof(String),"%02d:%02d",Hour,Minute);
    //TextDrawSetString(Uhrzeit,String);
    if(Hour == 0 && Minute == 0)
    {
    new year,month,day,DString[100],mtext[20], dtext[20];
    getdate(year, month, day);
    if(month == 1) { mtext = "01"; }
    else if(month == 2) { mtext = "02"; }
    else if(month == 3) { mtext = "03"; }
    else if(month == 4) { mtext = "04"; }
    else if(month == 5) { mtext = "05"; }
    else if(month == 6) { mtext = "06"; }
    else if(month == 7) { mtext = "07"; }
    else if(month == 8) { mtext = "08"; }
    else if(month == 9) { mtext = "09"; }
    else if(month == 10) { mtext = "10"; }
    else if(month == 11) { mtext = "11"; }
    else if(month == 12) { mtext = "12"; }
    if(day == 1) { dtext = "01"; }
    else if(day == 2) { dtext = "02"; }
    else if(day == 3) { dtext = "03"; }
    else if(day == 4) { dtext = "04"; }
    else if(day == 5) { dtext = "05"; }
    else if(day == 6) { dtext = "06"; }
    else if(day == 7) { dtext = "07"; }
    else if(day == 8) { dtext = "08"; }
    else if(day == 9) { dtext = "09"; }
    else if(day == 10) { dtext = "10"; }
    else if(day == 11) { dtext = "11"; }
    else if(day == 12) { dtext = "12"; }
    else if(day == 13) { dtext = "13"; }
    else if(day == 14) { dtext = "14"; }
    else if(day == 15) { dtext = "15"; }
    else if(day == 16) { dtext = "16"; }
    else if(day == 17) { dtext = "17"; }
    else if(day == 18) { dtext = "18"; }
    else if(day == 19) { dtext = "19"; }
    else if(day == 20) { dtext = "20"; }
    else if(day == 21) { dtext = "21"; }
    else if(day == 22) { dtext = "22"; }
    else if(day == 23) { dtext = "23"; }
    else if(day == 24) { dtext = "24"; }
    else if(day == 25) { dtext = "25"; }
    else if(day == 26) { dtext = "26"; }
    else if(day == 27) { dtext = "27"; }
    else if(day == 28) { dtext = "28"; }
    else if(day == 29) { dtext = "29"; }
    else if(day == 30) { dtext = "30"; }
    else if(day == 31) { dtext = "31"; }
    format(DString, sizeof(DString), "%s.%s.%d", dtext, mtext, year);
    //TextDrawSetString(Datum,DString);
    }
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
    if(TextSpams[i] > 0)
    {
    TextSpams[i]--;
    }
    if(CMDSpams[i] > 0)
    {
    CMDSpams[i]--;
    }
    if(IsPlayerConnected(i))
    {
    if(PlayerStoned[i] >= 2)
    {
    return 1;
    }
    new stern = WantedLevel[i];
    SetPlayerWantedLevel(i,stern);
    WantedPoints[i] = stern * 2;
    WantedPoints[i] = stern * 2;
    }
    }
    SetWorldTime(Hour);//ZEITOMG
    new Float:maxspeed = 250.0;
    new plname[MAX_PLAYER_NAME];
    new Float:oldposx, Float:oldposy, Float:oldposz;
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
    if(IsPlayerConnected(i))
    {
    if(SafeTime[i] > 0)
    {
    SafeTime[i]--;
    }
    if(SafeTime[i] == 1)
    {
    if(gPlayerAccount[i] == 1 && gPlayerLogged[i] == 0)
    {
    SendClientMessage(i, COLOR_WHITE, "Bitte log dich ein.");
    }
    }
    if(GetPlayerState(i) == 2)
    {
    GetPlayerPos(i, TelePos[i][3], TelePos[i][4], TelePos[i][5]);
    if(TelePos[i][5] > 550.0)
    {
    TelePos[i][0] = 0.0;
    TelePos[i][1] = 0.0;
    }
    if(TelePos[i][0] != 0.0)
    {
    new Float:xdist = TelePos[i][3]-TelePos[i][0];
    new Float:ydist = TelePos[i][4]-TelePos[i][1];
    new Float:sqxdist = xdist*xdist;
    new Float:sqydist = ydist*ydist;
    new Float:distance = (sqxdist+sqydist)/31;
    if(gSpeedo[i] == 2)
    {
    if(distance <10)
    {
    format(string, 256, "~n~~n~~n~~n~~n~~n~~n~~g~mph : ~w~%.0f",distance);
    }
    if(distance > 10 && distance < 100)
    {
    format(string, 256, "~n~~n~~n~~n~~n~~n~~n~~g~mph : ~w~%.0f",distance);
    }
    if(distance > 100)
    {
    format(string, 256, "~n~~n~~n~~n~~n~~n~~n~~g~mph : ~w~%.0f",distance);
    }
    GameTextForPlayer(i, string, 2000, 5);
    }
    if(distance > maxspeed && PlayerInfo[i][pAdmin] < 1)
    {
    new tmpcar = GetPlayerVehicleID(i);
    if(!IsAPlane(tmpcar))
    {
    GetPlayerName(i, plname, sizeof(plname));
    //format(string, 256, "Warnung: [%d]%s %.0f km/h",i,plname,distance);
    //ABroadCast(COLOR_YELLOW,string,1);
    }
    }



    }
    if(TelePos[i][5] < 550.0 && TelePos[i][3] != 0.0)
    {
    TelePos[i][0] = TelePos[i][3];
    TelePos[i][1] = TelePos[i][4];
    }
    }
    if(PlayerInfo[i][pLocal] != 255 && PlayerInfo[i][pInt] != 0)
    {
    new house = PlayerInfo[i][pLocal];
    GetPlayerPos(i, oldposx, oldposy, oldposz);
    if(oldposz != 0.0)
    {
    if(oldposz < 600.0)
    {
    if(house > 10000)
    {
    if (!IsPlayerInRangeOfPoint(i,6.0,1040.6,-1021.0,31.7) && house == 10001 ||!IsPlayerInRangeOfPoint(i,6.0,-2720.5,217.5,4.1) && house == 10002 ||!IsPlayerInRangeOfPoint(i,6.0,2644.6,-2044.9,13.3) && house == 10003)
    {
    new oldcash = gSpentCash[i];
    new Total = GetPlayerMoney(i) - oldcash;
    printf("Total %d = GetPlayerMoney(playerid) %d - oldcash %d",Total,GetPlayerMoney(i),oldcash);
    new name[MAX_PLAYER_NAME];
    GetPlayerName(i, name, sizeof(name));
    format(string,128,"<< %s hat den HausUpgradeladen mit $%d verlassen >>",name,Total);
    PayLog(string);
    gSpentCash[i] = 0;
    TelePos[i][0] = 0.0;
    TelePos[i][1] = 0.0;
    PlayerInfo[i][pLocal] = 255;
    SetPlayerInterior(i,0);
    PlayerInfo[i][pInt] = 0;
    Spectate[i] = 255;
    }
    }//SOLO
    }
    }
    }
    if(CellTime[i] > 0)
    {
    if (CellTime[i] == cchargetime)
    {
    CellTime[i] = 1;
    if(Mobile[Mobile[i]] == i)
    {
    CallCost[i] = CallCost[i]+callcost;
    }
    }
    CellTime[i] = CellTime[i] +1;
    if (Mobile[Mobile[i]] == 255 && CellTime[i] == 5)
    {
    if(IsPlayerConnected(Mobile[i]))
    {
    new called[MAX_PLAYER_NAME];
    GetPlayerName(Mobile[i], called, sizeof(called));
    //format(string, sizeof(string), "* %s's Handy klingelt.", called);
    //new handyname[20];
    if(PlayerInfo[i][pHandyID] == 7) { format(handyname, sizeof(handyname), "Google HTC Magic"); }
    else if(PlayerInfo[i][pHandyID] == 6) { format(handyname, sizeof(handyname), "iPhone"); }
    else if(PlayerInfo[i][pHandyID] == 5) { format(handyname, sizeof(handyname), "BlackBerry BOLD"); }
    else if(PlayerInfo[i][pHandyID] == 4) { format(handyname, sizeof(handyname), "Motorola Q9h"); }
    else if(PlayerInfo[i][pHandyID] == 3) { format(handyname, sizeof(handyname), "Sony Ericsson C905"); }
    else if(PlayerInfo[i][pHandyID] == 2) { format(handyname, sizeof(handyname), "Nokia N95"); }
    else if(PlayerInfo[i][pHandyID] == 1) { format(handyname, sizeof(handyname), "Nokia 6500"); }
    else { format(handyname, sizeof(handyname), "Nokia 3300"); }
    format(string, sizeof(string), "* %s's Handy klingelt.", called, handyname);
    RingTone[Mobile[i]] = 10;
    ProxDetector(30.0, Mobile[i], string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    }
    }
    }
    if(CellTime[i] == 0 && CallCost[i] > 0)
    {
    format(string, sizeof(string), "~w~Der Anruf kostet dich~n~ $5 Handyguthaben");
    //GivePlayerMoney(i, -CallCost[i]);
    if(PlayerInfo[i][pHandyVer] == 0) PlayerInfo[i][pHandyGeld] -= 5;
    SBizzInfo[1][sbTill] += CallCost[i];
    ExtortionSBiz(1, CallCost[i]);
    GameTextForPlayer(i, string, 5000, 1);
    CallCost[i] = 0;
    }
    if(TransportTime[i] > 0)
    {//Taxi driver and passenger only
    if(TransportTime[i] >= 16)
    {
    TransportTime[i] = 1;
    if(TransportDriver[i] < 999)
    {
    if(IsPlayerConnected(TransportDriver[i]))
    {
    TransportCost[i] += TransportValue[TransportDriver[i]];
    TransportCost[TransportDriver[i]] = TransportCost[i];
    }
    }
    }
    TransportTime[i] += 1;
    format(string, sizeof(string), "~r~%d ~w~: ~g~$%d",TransportTime[i],TransportCost[i]);
    GameTextForPlayer(i, string, 15000, 6);
    }
    }
    }
    }
    return 1;
    }


    Kann mir jemand helfen ? :)

    2 Mal editiert, zuletzt von LoRiX ()