Jump to content

TheGodfather

Membru
  • Posts

    500
  • Joined

  • Last visited

  • Days Won

    3

Posts posted by TheGodfather

  1. Salut, am gasit un bug legat de deschiderea de crates pe gm b-hood de HPQ123, las mai jos eroarea gasita in logurile serverului.

    [12:20:54] [debug] Run time error 4: "Array index out of bounds"
    [12:20:54] [debug]  Accessing element at negative index -2
    [12:20:54] [debug] AMX backtrace:
    [12:20:54] [debug] #0 003f3b1c in public opencrates (i=0) at C:\Users\crist\Desktop\HPQ123 samp gamemode actual cu tot ce trebuie\gamemodes\B-HOOD.pwn:36322

    Linia 36322 este aceasta: format(gString, 70, "skin %d (%s)~n~~w~~h~you have %d crates.", amount, CrateName[x], totalcrates(i));

    Las mai jos functiile unde apare acel public opencrates:

    function startcrates(playerid) {
        for(new l = 0; l < 6; l++) TextDrawShowForPlayer(playerid, CrateTD[l]);
        opencrates(playerid);
        PlayerTextDrawShow(playerid, CratePTD[1]);
        TimerCratesEx[playerid] = SetTimerEx("opencrates", 500, true, "d", playerid);
        return true;
    }
    function opencrates(i) {
        gString[0] = EOS;
        CrateTime[i] --;
        new amount, rand = random(100), x = !CrateModel[i] ? 0 : CrateModel[i]-1;
        if(CrateModel[i] != 5) {
            switch(rand) {
                case 0..10: {
                    LoadSkins(x, amount);
                    format(gString, 70, "skin %d (%s)~n~~w~~h~you have %d crates.", amount, CrateName[x], totalcrates(i));
                    PlayerTextDrawSetPreviewModel(i, CratePTD[0], amount);
                    PlayerTextDrawSetString(i, CratePTD[1], gString);
                    PlayerTextDrawShow(i, CratePTD[0]);
                    if(CrateTime[i] == 0) {
                        if(CrateModel[i] <= 0) { 
                            format(gString, 100,"%s, ai deschis o cutie de test si puteai castiga skinul %d (%s).", GetName(i), amount, CrateName[x]);
                            SCM(i, COLOR_WHITE, gString);
                        } else {
                            if(total_skins(i) == 10) {
                                PlayerInfo[i][pCrates][x] ++;
                                save_crates(i);
                                SCM(i, COLOR_LGREEN, "You won the skin, because you already have 10 skins you got the craft back!");
                            } else {
                                format(gString, 120,"(( {%s}%s Crate {A9C4E4}- %s opened a box and won skin %d [%s]. ))", CrateColors[x], CrateName[x], GetName(i), amount, CrateName[x]);
                                SCMTA(COLOR_CLIENT, gString);  
                                give_skin(i, amount);
                            }    
                        }
                        KillTimer(TimerCratesEx[i]);
                        CrateModel[i] = -1;
                    }
                }
                case 11..30: {
                    amount = random(5) + x * 4;
                    format(gString, 75, "~y~%s Respect points~n~~w~~h~you have %d crates.", FormatNumber(amount), totalcrates(i));
                    PlayerTextDrawSetPreviewModel(i, CratePTD[0], 1275);
                    PlayerTextDrawSetString(i, CratePTD[1], gString);
                    PlayerTextDrawShow(i, CratePTD[0]);
                    if(CrateTime[i] == 0) {
                        if(CrateModel[i] <= 0) {
                            format(gString, 120,"%s, a deschis o cutie de test si puteai castiga %d Respect points.", GetName(i),amount);
                            SCM(i, COLOR_WHITE, gString);
                        } else {
                            format(gString, 120,"(( {%s}%s Crate {A9C4E4}- %s opened a box and won %d Respect points. ))", CrateColors[x], CrateName[x], GetName(i),amount, CrateName[x]);
                            SCMTA(COLOR_CLIENT, gString); 
                            PlayerInfo[i][pExp] += amount;
                            Update(i, pRP);
                        }
                        KillTimer(TimerCratesEx[i]);
                        CrateModel[i] = -1;
                    }
                }
                   case 31..40: {
                    amount = random(10) + x * 10;
                    format(gString, 75, "~y~%s Premium points~n~~w~~h~you have %d crates.", FormatNumber(amount), totalcrates(i));
                    PlayerTextDrawSetPreviewModel(i, CratePTD[0], 1275);
                    PlayerTextDrawSetString(i, CratePTD[1], gString);
                    PlayerTextDrawShow(i, CratePTD[0]);
                    if(CrateTime[i] == 0) {
                        if(CrateModel[i] <= 0) {
                            format(gString, 120,"%s, a deschis o cutie de test si puteai castiga %d Premium points.", GetName(i),amount);
                            SCM(i, COLOR_WHITE, gString);
                        } else {
                            format(gString, 120,"(( {%s}%s Crate {A9C4E4}- %s opened a box and won %d Premium points. ))", CrateColors[x], CrateName[x], GetName(i),amount);
                            SCMTA(COLOR_CLIENT, gString); 
                            PlayerInfo[i][pPremiumPoints] += amount;
                            Update(i, pPremiumPointsx);
                        }
                        KillTimer(TimerCratesEx[i]);
                        CrateModel[i] = -1;
                    }
                }
                default: {
                    amount = random(2000000) + x * 2000000;
                    format(gString, 65, "~g~%s~n~~w~~h~you have %d crates.", FormatNumber(amount), totalcrates(i));
                    PlayerTextDrawSetPreviewModel(i, CratePTD[0], 1274);
                    PlayerTextDrawSetString(i, CratePTD[1], gString);
                    PlayerTextDrawShow(i, CratePTD[0]);
                    if(CrateTime[i] == 0) {
                        if(CrateModel[i] <= 0) {
                            format(gString, 120,"%s, a deschis o cutie de test si puteai castiga $%s.", GetName(i), FormatNumber(amount));
                            SCM(i, COLOR_WHITE, gString);
                        } else {
                            format(gString, 120,"(( {%s}%s Crate {A9C4E4}- %s opened a box and won {50DB6F}$%s{A9C4E4}. ))", CrateColors[x], CrateName[x], GetName(i), FormatNumber(amount));
                            SCMTA(COLOR_CLIENT, gString); 
                            GivePlayerCash(i, 1, amount);
                        }
                        KillTimer(TimerCratesEx[i]);
                        CrateModel[i] = -1;
                    }
                }
            }
        } else {
            switch(rand) {
                   case 0..5: {
                    amount = RandomEx(30, 250);
                    format(gString, 65, "Infernus (PREMIUM)~n~~w~~h~you have %d crates.", totalcrates(i));
                    PlayerTextDrawSetPreviewModel(i, CratePTD[0], 411);
                    PlayerTextDrawSetString(i, CratePTD[1], gString);
                    PlayerTextDrawShow(i, CratePTD[0]);
                    if(CrateTime[i] <= 0) {
                        if(Iter_Count(MyVehicle[i]) >= GetSlots(i)) { PlayerInfo[i][pCrates][4] ++; save_crates(i); SCM(i, COLOR_LIGHTGREEN, "Nu ai un slot liber.");  CrateModel[i] = -1; KillTimer(TimerCratesEx[i]); return true; }
                        else {
                            KillTimer(TimerCratesEx[i]);
                            CrateModel[i] = -1;
                            GiveVehicle(i, 411, 0, 0, 1, 0, 0);
                            format(gString, 120, "(( {7556ff}Vehicle Crate {A9C4E4}- %s opened a box and won Infernus PREMIUM. ))", GetName(i));
                            SCMTA(COLOR_CLIENT, gString);
                        }
                    }
                }
                case 6..33: {
                    amount = random(20) + 20;
                    format(gString, 64, "Picador~n~~w~~h~you have %d crates.", totalcrates(i));
                    PlayerTextDrawSetPreviewModel(i, CratePTD[0], 600);
                    PlayerTextDrawSetString(i, CratePTD[1], gString);
                    PlayerTextDrawShow(i, CratePTD[0]);
                    if(CrateTime[i] == 0) {
                        if(Iter_Count(MyVehicle[i]) >= GetSlots(i)) { PlayerInfo[i][pCrates][4] ++; save_crates(i); SCM(i, COLOR_LIGHTGREEN, "Nu ai un slot liber.");  CrateModel[i] = -1; KillTimer(TimerCratesEx[i]); return true; }
                        else {
                            KillTimer(TimerCratesEx[i]);
                            CrateModel[i] = -1;
                            GiveVehicle(i, 600, 0, 0, 0, 0, 0);
                            format(gString, 120,"(( {7556ff}Vehicle Crate {A9C4E4}- %s opened a box and won Picador. ))", GetName(i));
                            SCMTA(COLOR_CLIENT,gString);
                        }
                    }
                }
                case 34..40: {
                    format(gString, 65, "hpv1000~n~~w~~h~you have %d crates.", totalcrates(i));
                    PlayerTextDrawSetPreviewModel(i, CratePTD[0], 523);
                    PlayerTextDrawSetString(i, CratePTD[1], gString);
                    PlayerTextDrawShow(i, CratePTD[0]);
                    if(CrateTime[i] <= 0) {
                        if(Iter_Count(MyVehicle[i]) >= GetSlots(i)) { PlayerInfo[i][pCrates][4] ++; save_crates(i); SCM(i, COLOR_LIGHTGREEN, "Nu ai un slot liber.");  CrateModel[i] = -1; KillTimer(TimerCratesEx[i]); return true; }
                        else {
                            KillTimer(TimerCratesEx[i]);
                            CrateModel[i] = -1;
                            GiveVehicle(i, 523, 0, 0, 0, 0, 0);
                            format(gString, 120,"(( {7556ff}Vehicle Crate {A9C4E4}- %s opened a box and won hpv1000. ))", GetName(i));
                            SCMTA(COLOR_CLIENT, gString);
                        }
                    }
                }
                   case 41..46: {
                    format(gString, 65, "NRG-500 (PREMIUM)~n~~w~~h~you have %d crates.", totalcrates(i));
                    PlayerTextDrawSetPreviewModel(i, CratePTD[0], 522);
                    PlayerTextDrawSetString(i, CratePTD[1], gString);
                    PlayerTextDrawShow(i, CratePTD[0]);
                    if(CrateTime[i] <= 0) {
                        if(Iter_Count(MyVehicle[i]) >= GetSlots(i)) { PlayerInfo[i][pCrates][4] ++; save_crates(i); SCM(i, COLOR_LIGHTGREEN, "Nu ai un slot liber.");  CrateModel[i] = -1; KillTimer(TimerCratesEx[i]); return true; }
                        else {
                            KillTimer(TimerCratesEx[i]);
                            CrateModel[i] = -1;
                            GiveVehicle(i, 522, 0, 0, 1, 0, 0);
                            format(gString, 120,"(( {7556ff}Vehicle Crate {A9C4E4}- %s opened a box and won NRG-500 PREMIUM. ))", GetName(i));
                            SCMTA(COLOR_CLIENT,gString);
                        }
                    }
                }
                   case 47..53: {
                    format(gString, 65, "ticket (RAINBOW)~n~~w~~h~you have %d crates.", totalcrates(i));
                    PlayerTextDrawSetPreviewModel(i, CratePTD[0], 1581);
                    PlayerTextDrawSetString(i, CratePTD[1], gString);
                    PlayerTextDrawShow(i, CratePTD[0]);
                    if(CrateTime[i] <= 0) {
                        KillTimer(TimerCratesEx[i]);
                        CrateModel[i] = -1;
                        PlayerInfo[i][pTickete][0] ++;
                        save_tickete(i);
                        format(gString, 120,"(( {7556ff}Vehicle Crate {A9C4E4}- %s opened a box and won Rainbow Ticket. ))", GetName(i));
                        SCMTA(COLOR_CLIENT, gString);
                    }
                }
                   case 54..66: {
                    format(gString, 65, "ticket (VIP)~n~~w~~h~you have %d crates.", totalcrates(i));
                    PlayerTextDrawSetPreviewModel(i, CratePTD[0], 1581);
                    PlayerTextDrawSetString(i, CratePTD[1], gString);
                    PlayerTextDrawShow(i, CratePTD[0]);
                    if(CrateTime[i] <= 0) {
                        KillTimer(TimerCratesEx[i]);
                        CrateModel[i] = -1;
                        PlayerInfo[i][pTickete][1] ++;
                        save_tickete(i);
                        format(gString, 120,"(( {7556ff}Vehicle Crate {A9C4E4}- %s opened a box and won Vip Ticket. ))", GetName(i));
                        SCMTA(COLOR_CLIENT,gString);
                    }
                }
                default: {
                    format(gString, 65, "Savanna~n~~w~~h~you have %d crates.", totalcrates(i));
                    PlayerTextDrawSetPreviewModel(i, CratePTD[0], 567);
                    PlayerTextDrawSetString(i, CratePTD[1], gString);
                    PlayerTextDrawShow(i, CratePTD[0]);
                    if(CrateTime[i] <= 0) {
                        if(Iter_Count(MyVehicle[i]) >= GetSlots(i)) { PlayerInfo[i][pCrates][4] ++; save_crates(i); SCM(i, COLOR_LIGHTGREEN, "Nu ai un slot liber.");  CrateModel[i] = -1; KillTimer(TimerCratesEx[i]); return true; }
                        else {
                            KillTimer(TimerCratesEx[i]);
                            CrateModel[i] = -1;
                            GiveVehicle(i, 567, 0, 0, 0, 0, 0);
                            format(gString, 120,"(( {7556ff}Vehicle Crate {A9C4E4}- %s opened a box and won Savanna. ))", GetName(i));
                            SCMTA(COLOR_CLIENT, gString);
                        }
                    }
                }
            }
        }
        return true;
    }

  2. Acum 3 minute, Banditul a spus:

    Cea mai usoara metoda sa modifici MAX_PLAYERS in numarul tau de sloturi pe care il ai pe host pentru cel mai probabil ai multe array care depind de constanta asta. Imediat dupa a_samp poti pune

    #undef MAX_PLAYERS 

    #define MAX_PLAYERS nr_sloturi

    Alta varianta care e strans legata de cea de sus, sa reduci marimea array-urilor la exact cat ai nevoie asta include si string (care e tot array)

    Am facut deja ce ai spus legat de MAX_PLAYERS. O sa incerc sa vad si la array-uri, exista o metoda sa stiu exact numarul de caractere pe care trebuie sa il folosesc?

  3. Salut, am un server de samp care foloseste 100MB RAM atunci cand il pornesc, pe parcursul a 3-4 zile, chiar daca nu e nimeni pe server valoarea creste aproape de 200, este normal? Pot optimiza ceva la gamemode sau cum sa fac sa nu se mai intample asta?

  4. Cu asta vad ca a pornit, imi poti spune te rog cum pot face sa vad detalii despre timpul de executie al functiilor? Ca mna, de asta incerc sa pun pluginul. In consola imi arata asta:
     

    [profiler] Attached profiler to gamemodes/B-HOOD
    [profiler] Started profiling gamemodes/B-HOOD

     =======================================
     |                                     |
     |        YSI version 3.09.0684        |
     |        By Alex "Y_Less" Cole        |
     |                                     |
     =======================================

    Server: localhost
    Baza de date s-a conectat cu succes
    [profiler] Started profiling gamemodes/B-HOOD
    Number of vehicle models: 7
    Server vehicles: 256
    Safezones: 0
    Houses: 115
    Bussines: 38
    Garages: 0
    Clans: 1
    HQ clans: 0
    Clan zones: 0
    Turfs: 34
    Factions: 15
    Stuff Loaded
    Jobs: 10
    [MySQL] Dealership models: 59
    Safes: 15

  5. Salut, am gasit in gamemode-ul pe care il am un profiler si am vrut sa il pornesc, am pus la plugins profiler.dll, am windows si am incercat sa il rulez pe localhost. In plugins exista si profile.so si profiler.dll. Cand pornesc server-ul primeste crash iar in loguri apare asta:
    [13:29:26] [debug] Server crashed while executing B-HOOD.amx
    [13:29:26] [debug] AMX backtrace:
    [13:29:26] [debug] #0 000373f0 in Bintree_QSort (numbers[][E_BINTREE_INPUT:2]=@03f7cea4, left=434, right=618) at C:\Users\crist\Desktop\HPQ123 samp gamemode actual cu tot ce trebuie\pawno\include\YSI\y_bintree.inc:291
    [13:29:26] [debug] #1 00037a00 in Bintree_QSort (numbers[][E_BINTREE_INPUT:2]=@03f7cea4, left=251, right=618) at C:\Users\crist\Desktop\HPQ123 samp gamemode actual cu tot ce trebuie\pawno\include\YSI\y_bintree.inc:314
    [13:29:26] [debug] #2 00037a00 in Bintree_QSort (numbers[][E_BINTREE_INPUT:2]=@03f7cea4, left=0, right=618) at C:\Users\crist\Desktop\HPQ123 samp gamemode actual cu tot ce trebuie\pawno\include\YSI\y_bintree.inc:314
    [13:29:26] [debug] #3 00036ee8 in Bintree_Generate (Bintree:output[][E_BINTREE_TREE:5]=@00505e84, input[][E_BINTREE_INPUT:2]=@03f7cea4, size=619) at C:\Users\crist\Desktop\HPQ123 samp gamemode actual cu tot ce trebuie\pawno\include\YSI\y_bintree.inc:200
    [13:29:26] [debug] #4 0003afe4 in Command_Generate ()  at C:\Users\crist\Desktop\HPQ123 samp gamemode actual cu tot ce trebuie\pawno\include\YSI\y_commands.inc:905
    [13:29:26] [debug] #5 0003b568 in ?? () at C:\Users\crist\Desktop\HPQ123 samp gamemode actual cu tot ce trebuie\pawno\include\YSI\y_commands.inc:992
    [13:29:26] [debug] #6 0002f324 in public AMX_OnScriptInit () at C:\Users\crist\Desktop\HPQ123 samp gamemode actual cu tot ce trebuie\pawno\include\YSI\y_hooks/impl.inc:433
    [13:29:26] [debug] #7 0002ac80 in public Debug_OnScriptInit () at C:\Users\crist\Desktop\HPQ123 samp gamemode actual cu tot ce trebuie\pawno\include\YSI\y_amx.inc:246
    [13:29:26] [debug] #8 00013a60 in public YVers_OnScriptInit () at C:\Users\crist\Desktop\HPQ123 samp gamemode actual cu tot ce trebuie\pawno\include\YSI\y_debug.inc:390
    [13:29:26] [debug] #9 00013068 in public ScriptInit_OnScriptInit () at C:\Users\crist\Desktop\HPQ123 samp gamemode actual cu tot ce trebuie\pawno\include\YSI\internal\y_version.inc:249
    [13:29:26] [debug] #10 00012d30 in public PZone_OnGameModeInit () at C:\Users\crist\Desktop\HPQ123 samp gamemode actual cu tot ce trebuie\pawno\include\YSI\internal\..\y_scriptinit.inc:171
    [13:29:26] [debug] #11 native CallLocalFunction () in samp-server.exe
    [13:29:26] [debug] #12 00006d24 in public OnGameModeInit () at C:\Users\crist\Desktop\HPQ123 samp gamemode actual cu tot ce trebuie\pawno\include\playerzone.inc:429
    [13:29:26] [debug] Native backtrace:
    [13:29:26] [debug] #0 6ea25492 in ?? () in plugins\profiler.dll
    [13:29:26] [debug] #1 6ea25b5f in ?? () in plugins\profiler.dll
    [13:29:26] [debug] #2 6ea2072a in ?? () in plugins\profiler.dll
    [13:29:26] [debug] #3 6edf5465 in ?? () in plugins\crashdetect.dll
    [13:29:26] [debug] #4 6ede97cc in ?? () in plugins\crashdetect.dll
    [13:29:26] [debug] #5 6ededcf4 in ?? () in plugins\crashdetect.dll
    [13:29:26] [debug] #6 6e683484 in ?? () in plugins\streamer.dll
    [13:29:26] [debug] #7 6ea25cfb in ?? () in plugins\profiler.dll
    [13:29:26] [debug] #8 6ea2128b in ?? () in plugins\profiler.dll
    [13:29:26] [debug] #9 6ea1bb3a in ?? () in plugins\profiler.dll
    [13:29:26] [debug] #10 004746be in ?? () in samp-server.exe
    [13:29:26] [debug] #11 004010b6 in ?? () in samp-server.exe
    [13:29:26] [debug] #12 6ededc92 in ?? () in plugins\crashdetect.dll
    [13:29:26] [debug] #13 6ea25c15 in ?? () in plugins\profiler.dll
    [13:29:26] [debug] #14 6ea20816 in ?? () in plugins\profiler.dll
    [13:29:26] [debug] #15 6ea1baf2 in ?? () in plugins\profiler.dll
    [13:29:26] [debug] #16 6edf5318 in ?? () in plugins\crashdetect.dll
    [13:29:26] [debug] #17 6ede97cc in ?? () in plugins\crashdetect.dll
    [13:29:26] [debug] #18 6ededcf4 in ?? () in plugins\crashdetect.dll
    [13:29:26] [debug] #19 6e683484 in ?? () in plugins\streamer.dll
    [13:29:26] [debug] #20 6ea25cfb in ?? () in plugins\profiler.dll
    [13:29:26] [debug] #21 6ea2128b in ?? () in plugins\profiler.dll
    [13:29:26] [debug] #22 6ea1bb3a in ?? () in plugins\profiler.dll
    [13:29:26] [debug] #23 0046f654 in ?? () in samp-server.exe
    [13:29:26] [debug] #24 65646f6d in ?? () in samp-server.exe
    [13:29:26] [debug] #25 2d422f73 in ?? () in samp-server.exe
    [13:29:26] [debug] #26 444f4f48 in ?? () in samp-server.exe
    [13:29:26] [debug] #27 786d612e in ?? () in samp-server.exe
    [13:29:26] [debug] Registers:
    [13:29:26] [debug] EAX: 02a49828 EBX: 02a49858 ECX: 00000000 EDX: 00000000
    [13:29:26] [debug] ESI: 02a4dec8 EDI: 02a49834 EBP: 444f4f48 ESP: 00515c0c
    [13:29:26] [debug] EIP: 786d612e EFLAGS: 00010202
    [13:29:26] [debug] Stack:
    [13:29:26] [debug] ESP+00000000: 00000000 00000000 00000000 00000000
    [13:29:26] [debug] ESP+00000020: 00000000 00000000 00000000 00000000
    [13:29:26] [debug] ESP+00000040: 00000000 00000000 00000000 00000000
    [13:29:26] [debug] ESP+00000060: 00000000 00000000 00000000 00000000
    [13:29:26] [debug] ESP+00000080: 00000000 00000000 00000000 00000000
    [13:29:26] [debug] ESP+000000a0: 00000000 00000000 00000000 00000000
    [13:29:26] [debug] ESP+000000c0: 00000000 00000000 00000000 00000000
    [13:29:26] [debug] ESP+000000e0: 00000000 00000000 00000000 00000000
    [13:29:26] [debug] ESP+00000100: 00000000 00000000 00000000 00000000
    [13:29:26] [debug] ESP+00000120: 0000008c 00000000 00000000 00000000
    [13:29:26] [debug] ESP+00000140: 00000000 00000000 00000000 00000000
    [13:29:26] [debug] ESP+00000160: 00000006 00000002 00000001 025b13d0
    [13:29:26] [debug] ESP+00000180: 00000000 00516020 00000000 00000000
    [13:29:26] [debug] ESP+000001a0: 00000000 ffffffff ffffffff 00000000
    [13:29:26] [debug] ESP+000001c0: ffffffff 00000000 00000000 00000000
    [13:29:26] [debug] ESP+000001e0: 00000000 00000000 00000fa0 ffffffff
    [13:29:26] [debug] ESP+00000200: 00000fa0 ffffffff ffffffff 00000000
    [13:29:26] [debug] ESP+00000220: ffffffff 00000000 00000000 00000000
    [13:29:26] [debug] ESP+00000240: 00000000 00000000 00000fa0 ffffffff
    [13:29:26] [debug] ESP+00000260: 00000fa0 ffffffff ffffffff 00000000
    [13:29:26] [debug] ESP+00000280: ffffffff 00000000 00000000 00000000
    [13:29:26] [debug] ESP+000002a0: 00000000 00000000 00000fa0 ffffffff
    [13:29:26] [debug] ESP+000002c0: 00000fa0 ffffffff ffffffff 00000000
    [13:29:26] [debug] ESP+000002e0: ffffffff 00000000 00000000 00000000
    [13:29:26] [debug] ESP+00000300: 00000000 00000000 00000000 00000000
    [13:29:26] [debug] ESP+00000320: 00000000 00000000 00000000 ffffff88
    [13:29:26] [debug] ESP+00000340: 00610064 00640072 00540020 006d0069
    [13:29:26] [debug] ESP+00000360: 00000000 00000000 00000000 00000000
    [13:29:26] [debug] ESP+00000380: 00000000 00540047 00200042 00610044
    [13:29:26] [debug] ESP+000003a0: 006d0069 00000065 00000000 00000000
    [13:29:26] [debug] ESP+000003c0: 00000000 00030000 00050000 00000003
    [13:29:26] [debug] ESP+000003e0: 00000001 00000000 00000000 00000000
    [13:29:26] [debug] Loaded modules:
    [13:29:26] [debug] 00400000 - 00519000 samp-server.exe
    [13:29:26] [debug] 77a30000 - 77bd3000 ntdll.dll
    [13:29:26] [debug] 766d0000 - 767c0000 KERNEL32.DLL
    [13:29:26] [debug] 75a30000 - 75c44000 KERNELBASE.dll
    [13:29:26] [debug] 76080000 - 76634000 SHELL32.dll
    [13:29:26] [debug] 76fe0000 - 7705b000 msvcp_win.dll
    [13:29:26] [debug] 76c80000 - 76da0000 ucrtbase.dll
    [13:29:26] [debug] 75ee0000 - 76076000 USER32.dll
    [13:29:26] [debug] 77060000 - 77078000 win32u.dll
    [13:29:26] [debug] 772f0000 - 77313000 GDI32.dll
    [13:29:26] [debug] 770e0000 - 771bc000 gdi32full.dll
    [13:29:26] [debug] 757f0000 - 75818000 WINMM.dll
    [13:29:26] [debug] 67680000 - 67688000 WSOCK32.dll
    [13:29:26] [debug] 76b00000 - 76bbf000 msvcrt.dll
    [13:29:26] [debug] 76ed0000 - 76f33000 ws2_32.DLL
    [13:29:26] [debug] 77940000 - 77a00000 RPCRT4.dll
    [13:29:26] [debug] 76640000 - 76665000 IMM32.DLL
    [13:29:26] [debug] 6edd0000 - 6ee21000 crashdetect.dll
    [13:29:26] [debug] 6eb10000 - 6ebcf000 MSVCR100.dll
    [13:29:26] [debug] 6eaa0000 - 6eb09000 MSVCP100.dll
    [13:29:26] [debug] 10000000 - 1000d000 sscanf.dll
    [13:29:26] [debug] 6ea50000 - 6ea94000 mysql.dll
    [13:29:26] [debug] 6e6f0000 - 6e75c000 MSVCP140.dll
    [13:29:26] [debug] 730d0000 - 730e4000 VCRUNTIME140.dll
    [13:29:26] [debug] 53c00000 - 5410c000 libmysql.dll
    [13:29:26] [debug] 778c0000 - 7793a000 ADVAPI32.dll
    [13:29:26] [debug] 76a80000 - 76af6000 sechost.dll
    [13:29:26] [debug] 6f580000 - 6f58a000 Secur32.dll
    [13:29:26] [debug] 6f550000 - 6f578000 SSPICLI.DLL
    [13:29:26] [debug] 6ed80000 - 6ed91000 napinsp.dll
    [13:29:26] [debug] 6e060000 - 6e076000 pnrpnsp.dll
    [13:29:26] [debug] 6ed40000 - 6ed50000 wshbth.dll
    [13:29:26] [debug] 6d2a0000 - 6d2b6000 NLAapi.dll
    [13:29:26] [debug] 720f0000 - 72122000 IPHLPAPI.DLL
    [13:29:26] [debug] 73070000 - 730c2000 mswsock.dll
    [13:29:26] [debug] 72130000 - 721c2000 DNSAPI.dll
    [13:29:26] [debug] 76bc0000 - 76bc7000 NSI.dll
    [13:29:26] [debug] 6e870000 - 6e87e000 winrnr.dll
    [13:29:26] [debug] 720e0000 - 720e8000 rasadhlp.dll
    [13:29:26] [debug] 6e680000 - 6e6e7000 streamer.dll
    [13:29:26] [debug] 6ea10000 - 6ea4e000 profiler.dll
    [13:29:26] [debug] 72080000 - 720d8000 fwpuclnt.dll
    [13:29:26] [debug] 77a00000 - 77a19000 bcrypt.dll
    [13:29:26] [debug] 76bd0000 - 76c2d000 bcryptPrimitives.dll

  6. stock DestroyPlayerCar(dbid) {
        if(CarInfo[dbid][Spawned] == 0) return true;
        
        VehicleOwned[CarInfo[dbid][Spawned]] = 0;
        VehicleSQL[CarInfo[dbid][Spawned]] = 0;
        CarInfo[dbid][cTime] = -1;
            
        new Float: Pos[3];
        GetVehiclePos(CarInfo[dbid][Spawned], Pos[0], Pos[1], Pos[2]);
        if(strlen(CarInfo[dbid][cText]) >= 3) DestroyDynamicObject(nameobject[CarInfo[dbid][Spawned]]);
        if(CarInfo[dbid][cNeon]) {
            DestroyDynamicObject(NeonObj[0][CarInfo[dbid][Spawned]]);
            DestroyDynamicObject(NeonObj[1][CarInfo[dbid][Spawned]]);
        }
        Iter_Remove(PersonalVSpawned, dbid);
        MyVehicleSpawn[CarInfo[dbid][cOnline]] --;
        CarInfo[dbid][cFuel] = Gas[CarInfo[dbid][Spawned]];
        new query[256];
        mysql_format(SQL, query, sizeof(query), "UPDATE `cars` SET `Fuel`='%d' WHERE `ID`='%d'", CarInfo[dbid][cFuel], CarInfo[dbid][cID]);
        mysql_tquery(SQL, query, "", "");

        CarInfo[dbid][cLastPos][0] = Pos[0];
        CarInfo[dbid][cLastPos][1] = Pos[1];
        CarInfo[dbid][cLastPos][2] = Pos[2];    
            
        DestroyVehicle(CarInfo[dbid][Spawned]);
        CarInfo[dbid][Spawned] = 0;
        return true;
    }

  7. Am spawnat 3 masini personale, au id in ordinea asta la DB ID: cum mi-ai zis tu sa pun: 37, 32 si 67, ultima valoare e 67. Cand se despawneaza primesc asta:

    [debug] Run time error 4: "Array index out of bounds"
    [debug]  Attempted to read/write array element at index 10001 in array of size 10000
    [debug] AMX backtrace:
    [debug] #0 003ecf3c in public DecreaseTimer () at C:\Users\x\Desktop\y\gamemodes\B-HOOD.pwn:35674
    [debug] Run time error 4: "Array index out of bounds"
    [debug]  Attempted to read/write array element at index 10001 in array of size 10000
    [debug] AMX backtrace:
    [debug] #0 003ecf3c in public DecreaseTimer () at C:\Users\x\Desktop\y\gamemodes\B-HOOD.pwn:35674
    [debug] Run time error 4: "Array index out of bounds"
    [debug]  Attempted to read/write array element at index 10001 in array of size 10000
    [debug] AMX backtrace:
    [debug] #0 003ecf3c in public DecreaseTimer () at C:\Users\x\Desktop\y\gamemodes\B-HOOD.pwn:35674

  8. function LoadPlayerCars(playerid) {
        gQuery[0] = EOS;
        mysql_format(SQL, gQuery, sizeof(gQuery), "SELECT * FROM `cars` WHERE `Userid`='%d' LIMIT %d", PlayerInfo[playerid][pSQLID], MAX_PLAYER_VEHICLE);
        mysql_tquery(SQL, gQuery, "SQL_LoadVehicles", "i", playerid);
        return true;
    }
    function SQL_LoadVehicles(playerid) {
        new componenets[20], coordonate[50], Mods[50];
        if(cache_num_rows() == 0) 
            return true;

        for(new i = 0; i < cache_num_rows(); i++) {
            new id = Iter_Free(PersonalVehicles);

            new ORM:ormid = orm_create("cars");
            
            orm_addvar_string(ormid, CarInfo[id][cOwner], 32, "Owner");                                                                       
            orm_addvar_string(ormid, CarInfo[id][cText], 32, "Text");                                                                       
            orm_addvar_string(ormid, CarInfo[id][cLicense], 32, "License");

            orm_addvar_int(ormid, CarInfo[id][cID], "ID");
            orm_addvar_int(ormid, CarInfo[id][cModel], "Model");     
            orm_addvar_int(ormid, CarInfo[id][cNeon], "Neon");                                                                               
            orm_addvar_float(ormid, CarInfo[id][cLocationx], "Locationx");                                                                              
            orm_addvar_float(ormid, CarInfo[id][cLocationy], "Locationy");                                                                              
            orm_addvar_float(ormid, CarInfo[id][cLocationz], "Locationz");                                                                              
            orm_addvar_float(ormid, CarInfo[id][cAngle], "Angle");         
            orm_addvar_float(ormid, CarInfo[id][KM], "KM");                                                                          
            orm_addvar_int(ormid, CarInfo[id][cTemporarTime], "TemporarTime");                                                                        
            orm_addvar_int(ormid, CarInfo[id][cTemporar], "Temporar");                                                                                    
            orm_addvar_int(ormid, CarInfo[id][cVirtual], "Virtual");                                                                                    
            orm_addvar_int(ormid, CarInfo[id][cColorOne], "ColorOne");                                                                                    
            orm_addvar_int(ormid, CarInfo[id][cColorTwo], "ColorTwo");                                                                                 
            orm_addvar_int(ormid, CarInfo[id][cTextColor], "ColorText");                                                                                
            orm_addvar_int(ormid, CarInfo[id][cValue], "Value");                                                                                    
            orm_addvar_int(ormid, CarInfo[id][cAlarm], "Alarm");                                                                                    
            orm_addvar_int(ormid, CarInfo[id][cLock], "Lockk");                                                                                                                                                                              
            orm_addvar_int(ormid, CarInfo[id][paintjob], "paintjob");                                                                                                                                                                     
            orm_addvar_int(ormid, CarInfo[id][Userid], "Userid");
            orm_addvar_int(ormid, CarInfo[id][cTimeGoto], "TimeGoto");                                                                                   
            orm_addvar_int(ormid, CarInfo[id][Confiscated], "Confiscated");                                                                           
            orm_addvar_int(ormid, CarInfo[id][cSpecial], "Special");                                                                                    
            orm_addvar_int(ormid, CarInfo[id][cTax], "Tax");                                                                                        
            orm_addvar_int(ormid, CarInfo[id][cPoints], "Points");                                                                                    
            orm_addvar_int(ormid, CarInfo[id][cFuel], "Fuel");                                                                                        
            orm_addvar_int(ormid, CarInfo[id][cVip], "VIP");                                                                                        
            orm_addvar_int(ormid, CarInfo[id][cRainBow], "RainBow");                                                                                    
            orm_addvar_int(ormid, CarInfo[id][cLegendary], "Legendary");                                                                                
            orm_addvar_int(ormid, CarInfo[id][cStage], "Stage");                                                                                                                                                                     
            orm_addvar_int(ormid, CarInfo[id][Dayss], "Days");                                                                                        
            orm_addvar_string(ormid, componenets, 20, "Components");
            orm_addvar_string(ormid, Mods, 50, "Mods");
            orm_addvar_string(ormid, coordonate, 50, "Cordonate");

            orm_apply_cache(ormid, i);

            CarInfo[id][cMaxSpeed] = GetVehicleMaxSpeed(CarInfo[id][cModel]);
            CarInfo[id][cTime] = -1;
            CarInfo[id][cOnline] = playerid;

            sscanf(Mods, "p<|>iiiiiiiiiiiiii", CarInfo[id][cMod][0], CarInfo[id][cMod][1], CarInfo[id][cMod][2], CarInfo[id][cMod][3], CarInfo[id][cMod][4], CarInfo[id][cMod][5], CarInfo[id][cMod][6],
                CarInfo[id][cMod][7], CarInfo[id][cMod][8], CarInfo[id][cMod][9], CarInfo[id][cMod][10], CarInfo[id][cMod][11], CarInfo[id][cMod][12], CarInfo[id][cMod][13]);
            sscanf(coordonate, "p<|>ffffff", CarInfo[id][cVipPos][0], CarInfo[id][cVipPos][1], CarInfo[id][cVipPos][2], CarInfo[id][cVipPos][3], CarInfo[id][cVipPos][4], CarInfo[id][cVipPos][5]);

            Iter_Add(MyVehicle[playerid], id);
            Iter_Add(PersonalVehicles, id);
        }
        return true;
    }

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.