[Ajuda] Rum timer error
#1

Boa noite, nunca aconteceu isto comigo, mas de um tempo pra ca, no console estб dando este "erro" nгo й bem um erro acho, pфs no GM (In-game) estб tudo perfeito, mas queria retirar esse erro, pфs no futuro pode acontecer alguma coisa certo?

Meu log:


PHP Code:
Loaded log file"server_log.txt".
----------
SA-MP Dedicated Server
----------------------
v0.3.7, (C)2005-2015 SA-MP Team
[19:03:33filterscripts ""  (string)
[
19:03:33
[
19:03:33Server Plugins
[19:03:33] --------------
[
19:03:33]  Loading pluginstreamer
[19:03:33
*** 
Streamer Plugin v2.6.1 by Incognito loaded ***
[
19:03:33]   Loaded.
[
19:03:33]  Loading plugincrashdetect
[19:03:33]   CrashDetect v4.13 is OK.
[
19:03:33]   Loaded.
[
19:03:33]  Loaded 2 plugins.
[
19:03:33
[
19:03:33Ban list
[
19:03:33] --------
[
19:03:33]  Loadedsamp.ban
[19:03:33
[
19:03:33
[
19:03:33Filterscripts
[19:03:33] ---------------
[
19:03:33]   Loaded 0 filterscripts.
[
19:03:33
|-------------------------------|
[
19:03:33]        [11/09/2015 19:03:33]      
[
19:03:33] |-------------------------------|
[
19:03:33] [BSG]: 25 Orgs
[19:03:34] [BSG]: 216 Casas
[19:03:34] [BSG]: 6 Empresas
[19:03:34] [BSG]: 24 MiniEmpresas
[19:03:34] [BSG]: 70 Carros Carregados com sucesso.
[
19:03:34] [BSG]: Mбximo de pickups = [400], pickups em uso = [306]
[
19:03:34NPCs conectados com sucessso!
[
19:03:34]  ________________________________________________________________
[19:03:34] |»»        Brasil Spirit Games Sua diversao comeca aqui!!            ««|
[
19:03:34] |----------------------------------------------------------------|
[
19:03:34] |»»        [RPG/BRASIL] - [Dono/Scripter] - Guilherme/Lucas     ««|
[
19:03:34] |----------------------------------------------------------------|
[
19:03:34]  
[
19:03:34Number of vehicle models81
[19:03:34] [connection127.0.0.1:50633 requests connection cookie.
[
19:03:35Incoming connection127.0.0.1:50633 id0
[19:03:35] [npc:joinBuzao_Preto has joined the server (0:127.0.0.1)
[
19:06:15] [connection127.0.0.1:51830 requests connection cookie.
[
19:06:16Incoming connection127.0.0.1:51830 id1
[19:06:17] [joinLucaS_Carvalho has joined the server (1:127.0.0.1)
[
19:06:39LucaS_Carvalho has logged in.
[
19:06:57] [debugRun time error 4"Array index out of bounds"
[19:06:57] [debug]  Accessing element at index 658 past array upper bound 301
[19:06:57] [debugAMX backtrace:
[
19:06:57] [debug#0 00084c50 in public OnPlayerStateChange (0x00000001, 0x00000002, 0x00000001) from BSG.amx 
Obrigado a todos que tentarem ajudar ou me esclarecer sobre esse "problema"!
Reply
#2

Poste a OnPlayerStateChange. Parece que vocк estб acessando um нndice superior ao limite de algum array.
Reply
#3

Estб aqui:

PHP Code:
public OnPlayerStateChange(playeridnewstateoldstate) {
    {
        new 
vehicleid GetPlayerVehicleID(playerid);
        if (
IsPlayerNPC(playerid)) return true;
        
PlayerInactivity[playerid] = 0;

        if (
newstate == PLAYER_STATE_PASSENGER) {
            
pweapon[playerid] = GetPlayerWeapon(playerid);
        }
        if (
newstate == PLAYER_STATE_DRIVER) {
            
TextDrawShowForPlayer(playeridBlindInfo[GetPlayerVehicleID(playerid)][TDS]);
        }
        if (
oldstate == PLAYER_STATE_DRIVER) {
            for (new 
o!= MAX_VEHICLES; ++o) {
                
TextDrawHideForPlayer(playeridBlindInfo[o][TDS]);
            }
        }
        if (
oldstate == PLAYER_STATE_DRIVER) {
            if (
FazendoTeste[playerid] == && FazendoTesteAVIAO[playerid] == 1) {
                new 
Habilitacao GetPlayerVehicleID(playerid);
                
SetVehicleToRespawn(Habilitacao);
                
FazendoTeste[playerid] = 0;
                
FazendoTesteAVIAO[playerid] = 0;
                
VelocidadeTeste[playerid] = 0;
                
SetPlayerPos(playerid1416.6458, -1699.286113.5395);
                
SetPlayerFacingAngle(playerid107.5803);
                
SendClientMessage(playerid0xFF0A00FF"Vocк saiu do veiculo e por causa disso seu teste foi cancelado!");
                
KillTimer(Verificar[playerid]);
                
KillTimer(VerificarMoto[playerid]);
                
KillTimer(VerificarAviao[playerid]);
                
DisablePlayerCheckpoint(playerid);
            }
        }
        if (
newstate == PLAYER_STATE_ONFOOT) {
            if (
TransportDuty[playerid] > 0) {
                if (
TransportDuty[playerid] == 1) {
                    
TaxiDrivers -= 1;
                } else if (
TransportDuty[playerid] == 2) {
                    
BusDrivers -= 1;
                }
                
TransportDuty[playerid] = 0;
                
format(gstringsizeof(gstring), "* Estб fora de serviзo, ganhou R$%d."TransportMoney[playerid]);
                
SendClientMessage(playeridCOLOR_LIGHTBLUEgstring);
                
GivePlayerMoney(playeridTransportMoney[playerid]);
                
ConsumingMoney[playerid] = 1;
                
TransportValue[playerid] = 0;
                
TransportMoney[playerid] = 0;
            }
            if (
TransportCost[playerid] > && TransportDriver[playerid] < 999) {
                if (
IsPlayerConnected(TransportDriver[playerid])) {
                    
TransportMoney[TransportDriver[playerid]] += TransportCost[playerid];
                    
TransportTime[TransportDriver[playerid]] = 0;
                    
TransportCost[TransportDriver[playerid]] = 0;
                    
format(gstringsizeof(gstring), "~w~Custo da corrida~n~~r~R$%d"TransportCost[playerid]);
                    
GameTextForPlayer(playeridgstring50001);
                    
format(gstringsizeof(gstring), "~w~Passageiro saiu do taxi~n~~g~ganhou R$%d"TransportCost[playerid]);
                    
GameTextForPlayer(TransportDriver[playerid], gstring50001);
                    
GivePlayerMoney(playerid, -TransportCost[playerid]);
                    
TransportCost[playerid] = 0;
                    
TransportTime[playerid] = 0;
                    
TransportDriver[playerid] = 999;
                }
            }
            
TelePos[playerid][0] = 0.0;
            
TelePos[playerid][1] = 0.0;
        }
        if (
newstate == PLAYER_STATE_PASSENGER// TAXI, BUSSES, BOTS
    
{
            new 
name[MAX_PLAYER_NAME];
            
GetPlayerName(playeridnamesizeof(name));
            for (new 
0MAX_PLAYERSi++) {
                if (
IsPlayerConnected(i)) {
                    if (
IsPlayerInVehicle(ivehicleid) && GetPlayerState(i) == && TransportDuty[i] > 0) {
                        if (
GetPlayerMoney(playerid) < TransportValue[i]) {
                            
format(gstringsizeof(gstring), "* Vocк precisa de R$%d para entrar."TransportValue[i]);
                            
SendClientMessage(playeridCOLOR_LIGHTBLUEgstring);
                            
RemovePlayerFromVehicleEx(playerid);
                        } else {
                            if (
TransportDuty[i] == 1) {
                                
format(gstringsizeof(gstring), "* Pagou R$%d para o taxista."TransportValue[i]);
                                
SendClientMessage(playeridCOLOR_LIGHTBLUEgstring);
                                
format(gstringsizeof(gstring), "* Passageiro %s entrou no Taxi."name);
                                
SendClientMessage(iCOLOR_LIGHTBLUEgstring);
                                
TransportTime[i] = 1;
                                
TransportTime[playerid] = 1;
                                
TransportCost[playerid] = TransportValue[i];
                                
TransportCost[i] = TransportValue[i];
                                
TransportDriver[playerid] = i;
                            } else if (
TransportDuty[i] == 2) {
                                
format(gstringsizeof(gstring), "* Pagou R$%d para o Motorista De Onibus."TransportValue[i]);
                                
SendClientMessage(playeridCOLOR_LIGHTBLUEgstring);
                                
format(gstringsizeof(gstring), "* Passageiro %s entrou no Onibus."name);
                                
SendClientMessage(iCOLOR_LIGHTBLUEgstring);
                            }
                            
GivePlayerMoney(playerid, -TransportValue[i]);
                            
TransportMoney[i] += TransportValue[i];
                        }
                    }
                }
            }

        if(
GetPlayerVehicleID(playerid) == BuzaoPretoBSG)
        {

            
GameTextForPlayer(playerid"~w~Passagem onibus azul ~r~- 500"30001);
            
GivePlayerMoney(playerid, -500);

        }

    }
        if (
newstate == 2) {
            for (new 
0sizeof(CarInfo); i++) {
                new 
newcar GetPlayerVehicleID(playerid);
                new 
Aluguelbox[128];
                if (
newcar == CarInfo[i][ownedvehicle]) {
                    if (
CarInfo[i][cOwned] == 0) {
                        
Controle(playerid0);
                        
CarOffered[playerid] = 1;
                        
//format(string,sizeof(string),"~w~Carro: %s~n~Preco: ~g~%d~n~~w~/veiculo comprar para comprar",CarInfo[i][cDescription],CarInfo[i][cValue]);
                        
format(Aluguelboxsizeof(Aluguelbox), "Carro: %s Preco: %d\nGostaria de compra-lo ?"CarInfo[i][cDescription], CarInfo[i][cValue]);
                        
Controle(playerid0);
                        
ShowPlayerDialog(playerid2624DIALOG_STYLE_MSGBOX"Deseja comprar este veнculo ?"Aluguelbox"Sim""Nгo");
                    }
                    if (
CarInfo[i][cOwned] == 1) {
                        new 
playername[MAX_PLAYER_NAME];
                        
GetPlayerName(playeridplayernamesizeof(playername));
                        if (
strcmp(playernameCarInfo[i][cOwner], true) == 0) {
                            
format(gstringsizeof(gstring), "Vocк entrou no seu carro ele tem %d de grana no porta luva. Use: /retirargrana para pegar."CarInfo[i][cGrana]);
                            
SendClientMessage(playeridCOR_GROgstring);
                            
TogglePlayerControllable(playerid1);
                        } else {
                            new 
playerdinheiro GetPlayerMoney(playerid);
                            if (
playerdinheiro 1500) {
                                
SendClientMessage(playeridCOLOR_GRAD1"Vocк nгo estб com essa grana no bolso.");
                                
RemovePlayerFromVehicle(playerid);
                                return 
1;
                            }
                            
format(gstringsizeof(gstring), "Vocк pagou %d para andar no veiculo de (%s)"granacarroCarInfo[i][cOwner]);
                            
SendClientMessage(playerid0x33CCFFAAgstring);
                            
CarInfo[i][cGrana] += granacarro;
                            
GivePlayerMoney(playerid, -granacarro);
                        }
                    }
                }
            }
        }
        if (
newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER) {
            if (
PlayerInfo[playerid][pJailed] != 0) {
                
RemovePlayerFromVehicleEx(playerid);
            }
        }
        if (
newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER) {
            if (
IsABike(GetPlayerVehicleID(playerid))) {
                switch (
GetPlayerSkin(playerid)) {
                
#define SPAO{%0,%1,%2,%3,%4,%5} SetPlayerAttachedObject(playerid, SLOT, 18977, 2, (%0), (%1), (%2), (%3), (%4), (%5));
                
case 06574149208273:  SPAO{0.0700000.0000000.00000088.00000075.0000000.000000}
                case 
1..6814162227293341..4982..848687119289SPAO{0.0700000.0000000.00000088.00000077.0000000.000000}
                case 
710SPAO{0.0900000.0199990.00000088.00000090.0000000.000000}
                case 
9SPAO{0.0599990.0199990.00000088.00000090.0000000.000000}
                case 
11..13SPAO{0.0700000.0199990.00000088.00000090.0000000.000000}
                case 
15SPAO{0.0599990.0000000.00000088.00000082.0000000.000000}
                case 
17..21SPAO{0.0599990.0199990.00000088.00000082.0000000.000000}
                case 
23..262830..3234..3957589899104..118120..131SPAO{0.0799990.0199990.00000088.00000082.0000000.000000}
                case 
40SPAO{0.0500000.0099990.00000088.00000082.0000000.000000}
                case 
50100..103148150..189222SPAO{0.0700000.0099990.00000088.00000082.0000000.000000}
                case 
51..54SPAO{0.1000000.0099990.00000088.00000082.0000000.000000}
                case 
5556636466..73757678..81133..143147190..207209..219221247..272274..288290..293SPAO{0.0700000.0199990.00000088.00000082.0000000.000000}
                case 
59..62SPAO{0.0799990.0299990.00000088.00000082.0000000.000000}
                case 
77SPAO{0.0599990.0199990.00000087.00000082.0000000.000000}
                case 
858889SPAO{0.0700000.0399990.00000088.00000082.0000000.000000}
                case 
90..97SPAO{0.0500000.0199990.00000088.00000082.0000000.000000}
                case 
132SPAO{0.0000000.0199990.00000088.00000082.0000000.000000}
                case 
144..146SPAO{0.0900000.0000000.00000088.00000082.0000000.000000}
                case 
220SPAO{0.0299990.0199990.00000088.00000082.0000000.000000}
                case 
223246SPAO{0.0700000.0500000.00000088.00000082.0000000.000000}
                case 
224..245SPAO{0.0700000.0299990.00000088.00000082.0000000.000000}
                case 
294SPAO{0.0700000.0199990.00000091.00000084.0000000.000000}
                case 
295SPAO{0.0500000.0199980.00000086.00000082.0000000.000000}
                case 
296..298SPAO{0.0649990.0099990.00000088.00000082.0000000.000000}
                case 
299SPAO{0.0649980.0199990.00000088.00000082.0000000.000000}
            }
        }
    }
    else
    {
        
RemovePlayerAttachedObject(playeridSLOT);
       }
    }
    if (
newstate == PLAYER_STATE_DRIVER) { // 38 / 49 / 56 = SS
        
new newcar GetPlayerVehicleID(playerid);
        new 
oldcar gLastCar[playerid];
        new 
HouseCar PlayerInfo[playerid][pPHousekey] + totalveiculos;
        
TelePos[playerid][0] = 0.0;
        
TelePos[playerid][1] = 0.0;
        new 
carid GetVehicleModel(newcar);
        if (
carid == || carid == || carid == 0) {} else {
            if (
IsAAztecaCar(newcar)) {
                if (!
IsAAzteca(playerid)) {
                    
SendClientMessage(playeridCOR_AZTECAS"Vocк nгo й um Azteca.");
                    
RemovePlayerFromVehicleEx(playerid);
                }
            } else if (
IsAOniCar(newcar)) {
                if (
PlayerInfo[playerid][pEmprego] != 7) {
                    
SendClientMessage(playeridCOLOR_GRAD2"Vocк nгo й um Motorista De Onibus.");
                    
RemovePlayerFromVehicleEx(playerid);
                }
            } else if (
IsAMecCar(newcar)) {
                if (
GetPlayerOrg(playerid) != 24) {
                    
SendClientMessage(playeridCOLOR_GRAD2"Vocк nгo й um Mecвnico.");
                    
RemovePlayerFromVehicleEx(playerid);
                }
            } else if (
IsAMec2Car(newcar)) {
                if (
GetPlayerOrg(playerid) != 24) {
                    
SendClientMessage(playeridCOLOR_GRAD2"Vocк nгo й um Mecвnico.");
                    
RemovePlayerFromVehicleEx(playerid);
                }
            } else if (
IsADriCar(newcar)) {
                if (!
IsADri(playerid)) {
                    
SendClientMessage(playeridCOR_DRIFTERS"Vocк nгo й um Hells Angels.");
                    
RemovePlayerFromVehicleEx(playerid);
                }
            } else if (
IsABloodzCar(newcar)) {
                if (
GetPlayerOrg(playerid) != 19) {
                    
SendClientMessage(playerid0xF6000000"Vocк nгo й dos Comando Vermelho.");
                    
RemovePlayerFromVehicleEx(playerid);
                }
            } else if (
IsACaminhoneiroCar(newcar)) {
                if (
PlayerInfo[playerid][pEmprego] != 9) {
                    
SendClientMessage(playeridCOLOR_GRAD2"Vocк nгo й um Caminhoneiro.");
                    
RemovePlayerFromVehicleEx(playerid);
                }
            } else if (
IsAJornalCar(newcar)) {
                if (!
IsAJornal(playerid)) {
                    
SendClientMessage(playeridCOR_REP"Vocк nгo й um Repуrter.");
                    
RemovePlayerFromVehicleEx(playerid);
                }
            } else if (
IsAHamasCar(newcar)) {
                if (!
IsAHamas(playerid)) {
                    
SendClientMessage(playeridCOR_HAMAS"Vocк nгo й do Hamas.");
                    
RemovePlayerFromVehicleEx(playerid);
                }
            } else if (
IsASonsofAnarchyCar(newcar)) {
                if (!
IsASonsofAnarchy(playerid)) {
                    
SendClientMessage(playeridCOR_SONS"Vocк nгo й dos Sons of Anarchy.");
                    
RemovePlayerFromVehicleEx(playerid);
                }
            } else if (
IsASegurancaCar(newcar)) {
                if (
PlayerInfo[playerid][pEmprego] != 5) {
                    
SendClientMessage(playeridCOLOR_GRAD2"Vocк nгo й Seguranзa.");
                    
RemovePlayerFromVehicleEx(playerid);
                }
            } else if (
IsATriadCar(newcar)) {
                if (!
IsATriad(playerid)) {
                    
SendClientMessage(playeridCOR_TRIADS"Vocк nгo й dos Triads.");
                    
RemovePlayerFromVehicleEx(playerid);
                }
            } else if (
IsABallasCar(newcar)) {
                if (!
IsABallas(playerid)) {
                    
SendClientMessage(playeridCOR_BALLAS"Vocк nгo й dos Ballas.");
                    
RemovePlayerFromVehicleEx(playerid);
                }
            } else if (
IsAVagosCar(newcar)) {
                if (!
IsAVagos(playerid)) {
                    
SendClientMessage(playeridCOR_VAGOS"Vocк nгo й dos Vagos.");
                    
RemovePlayerFromVehicleEx(playerid);
                }
            } else if (
IsATransportadorCar(newcar)) {
                if (!
IsATransportador(playerid)) {
                    
SendClientMessage(playeridCOR_WHITE"Vocк nгo й um Transportador Aйreo.");
                    
RemovePlayerFromVehicleEx(playerid);
                }
                if (!
AereaMission[playerid]) {
                    
SendClientMessage(playeridCOR_WHITE"Este veiculo sу poderб ser usado quando vocк estiver trabalhando, /transportar.");
                    
RemovePlayerFromVehicleEx(playerid);
                }
            } else if (
IsABombeiroCar(newcar)) {
                if (!
IsABombeiro(playerid)) {
                    
SendClientMessage(playeridCOR_SAMU"Vocк nгo й da S.A.M.U");
                    
RemovePlayerFromVehicleEx(playerid);
                }
            } else if (
IsATaxiCar(newcar)) {
                if (!
IsATaxi(playerid)) {
                    
SendClientMessage(playeridCOLOR_TAXISTA"Vocк nгo й um Taxista.");
                    
RemovePlayerFromVehicleEx(playerid);
                }
            } else if (
IsAGrooveCar(newcar)) {
                if (!
IsAGroove(playerid)) {
                    
SendClientMessage(playeridCOR_GRO"Vocк nгo й da Grove Street.");
                    
RemovePlayerFromVehicleEx(playerid);
                }
            } else if (
IsAAlCar(newcar)) {
                if (!
IsAAl(playerid)) {
                    
SendClientMessage(playeridCOR_AL"Vocк nгo й da Al'Qaeda.");
                    
RemovePlayerFromVehicleEx(playerid);
                }
            } else if (
IsAFARCCar(newcar)) {
                if (!
IsAFARC(playerid)) {
                    
SendClientMessage(playeridCOR_FARC"Vocк nгo й do PCC");
                    
RemovePlayerFromVehicleEx(playerid);
                }
            } else if (
IsAVagoCar(newcar)) {
                if (
PlayerInfo[playerid][pEmprego] != 2) {
                    
SendClientMessage(playeridCOR_WHITE"Vocк nгo й um advogado");
                    
RemovePlayerFromVehicleEx(playerid);
                }
            } else if (
IsAPoliciaCivilCar(newcar)) {
                if (
GetPlayerOrg(playerid) != 16) {
                    
SendClientMessage(playeridCOR_PC"Vocк nгo й da Polнcia Civil.");
                    
RemovePlayerFromVehicleEx(playerid);
                }
                if (
OnDuty[playerid] != 1) {
                    
SendClientMessage(playeridCOLOR_RED"Vocк nгo Bateu o Cartгo.");
                    
RemovePlayerFromVehicleEx(playerid);
                }
            } else if (
IsABOPEsCar(newcar)) {
                if (
GetPlayerOrg(playerid) != 2) {
                    
SendClientMessage(playeridCOR_BOPE"Vocк nгo й do B.O.P.E.");
                    
RemovePlayerFromVehicleEx(playerid);
                }
                if (
OnDuty[playerid] != 1) {
                    
SendClientMessage(playeridCOLOR_RED"Vocк nгo bateu o cartгo.");
                    
RemovePlayerFromVehicleEx(playerid);
                }
            } else if (
IsAAdmins(newcar)) {
                if (
PlayerInfo[playerid][pAdmin]) {
                    
SendClientMessage(playeridCOR_BOPE"Vocк nгo й Admin");
                    
RemovePlayerFromVehicleEx(playerid);
                }
            } else if (
IsAPFCar(newcar)) {
                if (
GetPlayerOrg(playerid) != 11) {
                    
SendClientMessage(playeridCOR_PF"Vocк nгo й da Polнcia Federal.");
                    
RemovePlayerFromVehicleEx(playerid);
                }
                if (
OnDuty[playerid] != 1) {
                    
SendClientMessage(playeridCOLOR_RED"Vocк nгo bateu o cartгo.");
                    
RemovePlayerFromVehicleEx(playerid);
                }
            } else if (
IsAExCar(newcar)) {
                if (
GetPlayerOrg(playerid) != 3) {
                    
SendClientMessage(playeridCOR_EXE"Vocк nгo й do Exйrcito.");
                    
RemovePlayerFromVehicleEx(playerid);
                }
                if (
OnDuty[playerid] != 1) {
                    
SendClientMessage(playeridCOLOR_RED"Vocк nгo bateu o cartгo.");
                    
RemovePlayerFromVehicleEx(playerid);
                }
            } else if (
IsACopCar(newcar)) {
                if (
GetPlayerOrg(playerid) != 1) {
                    
SendClientMessage(playeridCOR_PM"Vocк nгo й da Polнcia Mнlitar.");
                    
RemovePlayerFromVehicleEx(playerid);
                }
                if (
OnDuty[playerid] != 1) {
                    
SendClientMessage(playeridCOLOR_RED"Vocк nгo bateu o cartгo.");
                    
RemovePlayerFromVehicleEx(playerid);
                }
            } else if (
IsAHitCar(newcar)) {
                if (!
IsAHit(playerid)) {
                    
SendClientMessage(playeridCOR_HITMAN"Vocк nгo й um Hitman.");
                    
RemovePlayerFromVehicleEx(playerid);
                }
            } else if (
IsAYaCar(newcar)) {
                if (!
IsAYa(playerid)) {
                    
SendClientMessage(playeridCOR_YAK"Vocк nгo й da Mбfia Yakuza.");
                    
RemovePlayerFromVehicleEx(playerid);
                }
            } else if (
IsACosaNostraCar(newcar)) {
                if (!
IsACosaNostra(playerid)) {
                    
SendClientMessage(playeridCOR_COSA"Vocк nгo й da Mбfia Cosa Nostra.");
                    
RemovePlayerFromVehicleEx(playerid);
                }
            } else if (
IsAGOVCar(newcar)) {
                if (!
IsAGOV(playerid)) {
                    
SendClientMessage(playeridCOR_PRE"Vocк nгo й do Governo.");
                    
RemovePlayerFromVehicleEx(playerid);
                }
            } else if (
IsAnAmbulanceCar(newcar)) {
                if (!
IsAAmbu(playerid)) {
                    
SendClientMessage(playeridCOR_SAMU"Vocк nгo й um Mйdico.");
                    
RemovePlayerFromVehicleEx(playerid);
                }
            }
        }
        if (
IsHabCar(newcar)) {
            if (
FazendoTeste[playerid] < && FazendoTesteAVIAO[playerid] < 1) {
                
SendClientMessage(playeridCOR_GRO"Vocк nгo estб fazendo teste de habilitaзгo.");
                
RemovePlayerFromVehicleEx(playerid);
                return 
true;
            }
        }
        if (
IsAviao(newcar)) {
            if (
PlayerInfo[playerid][pFlyLic] == 0) {
                if (
IsHabCar(newcar)) {
                    return 
1;
                }
                
SendClientMessage(playeridCOLOR_GREY"Vocк nгo tem licenзa para voar!");
                
SendClientMessage(playeridCOLOR_GREY"Para adquirir todas as suas licenзas digite /GPS");
                
SendClientMessage(playeridCOLOR_GREY"Clique em 'Los Santos' depois selecione 'Centro de licenзas'.");
                
RemovePlayerFromVehicleEx(playerid);
            }
        }
        if (
IsAMotinha(newcar)) {
            if (
PlayerInfo[playerid][pMotoLic] == 0) {
                if (
IsHabCar(newcar)) {
                    return 
1;
                }
                
SendClientMessage(playeridCOLOR_GREY"Vocк nгo tem licenзa para pilotar!");
                
SendClientMessage(playeridCOLOR_GREY"Para adquirir todas as suas licenзas digite /GPS");
                
SendClientMessage(playeridCOLOR_GREY"Clique em 'Los Santos' depois selecione 'Centro de licenзas'.");
                
RemovePlayerFromVehicleEx(playerid);
            }
        } else {
            if (
PlayerInfo[playerid][pCarLic] == 0) {
                if (
IsABikeCar(newcar)) {}
                if (
IsHabCar(newcar)) {}
                if (
IsAviao(newcar)) {
                    return 
1;
                }
                if (!
IsAMotinha(newcar)) {
                    return 
1;
                } else {
                    
SendClientMessage(playeridCOLOR_GREY"Vocк nгo tem licenзa para dirigir carro!");
                    
SendClientMessage(playeridCOLOR_GREY"Para adquirir todas as suas licenзas digite /GPS");
                    
SendClientMessage(playeridCOLOR_GREY"Clique em 'Los Santos' depois selecione 'Centro de licenзas'.");
                    
RemovePlayerFromVehicleEx(playerid);
                }
            }
        }
        if ((
newcar >= 322 && newcar <= 367)) {
            if (
HireCar[playerid] != newcar) {
                new 
Aluguelbox[128];
                
format(Aluguelboxsizeof(Aluguelbox), "Voce pode alugar Este Veiculo pelo Preзo:R$%d\nDeseja Aluga-lo ?"SBizzInfo[1][sbEntranceCost]);
                
Controle(playerid0);
                
ShowPlayerDialog(playeridDIALOG_ALUGARDIALOG_STYLE_MSGBOX"Aluguel de Veiculos"Aluguelbox"Sim""Nгo");
            }
        }
        if ((
newcar >= 368 && newcar <= 370)) {
            if (
HireCar[playerid] != newcar) {
                new 
Aluguelbox[128];
                
format(Aluguelboxsizeof(Aluguelbox), "Voce pode alugar Este Helicуptero pelo Preзo:R$%d\nDeseja Aluga-lo ?"SBizzInfo[1][sbEntranceCost]);
                
Controle(playerid0);
                
ShowPlayerDialog(playeridDIALOG_ALUGARDIALOG_STYLE_MSGBOX"Aluguel de Veiculos"Aluguelbox"Sim""Nгo");
            }
        } else if (
IsABikeCar(newcar)) {
            if (
PlayerInfo[playerid][pMembro] != || PlayerInfo[playerid][pLider] != 0) {
                
SendClientMessage(playeridCOLOR_GREY"Vocк possui uma org, nгo poderб andar no veiculos de novatos.");
                
RemovePlayerFromVehicleEx(playerid);
                return 
true;
            }
            
SendClientMessage(playeridCOR_VAGOS"Seja Bem-Vindo, precisando de alguma ajuda, digite: /relatorio e fale com um administrador.");
            
SendClientMessage(playeridCOR_VAGOS"Novato, vocк poderб chegar aos locais desejados utilizando o comando: /gps");
            
SendClientMessage(playeridCOR_VAGOS"Para selecionar alguma opзгo no /gps, clique com o mouse ou selecione com as setas do seu teclado.");
            
SendClientMessage(playeridCOR_VAGOS"Vб atй o centro de licenзas para adquirir suas licenзas e tenha um уtimo jogo!");
        }
        if (
oldcar != 301) {
            if ((
HouseCar != oldcar && oldcar != 0) && (HireCar[playerid] != oldcar && newcar != HouseCar)) {
                if (
gLastDriver[oldcar] == playerid && oldcar != newcar) {
                    
gLastDriver[oldcar] = 300;
                    
VTrancado[oldcar] = 0;
                    
UnLockCar(oldcar);
                }
            }
        }
        
gLastCar[playerid] = newcar;
        
gLastDriver[newcar] = playerid;
    }
    if (
newstate == PLAYER_STATE_SPAWNED && logouagora[playerid] == 0) {
        if (
sincronizando[playerid] == 1) {
            return 
true;
        }
        new 
Floatlwx,
        
Floatlwy,
        
Floatlwz;
        
GetPlayerPos(playeridlwxlwylwz);
        if ((
lwz 530.0 && PlayerInfo[playerid][pInt] == 0) || PlayerToPoint(1000.0playerid, -1041.9, -1868.479.1)) //the highest land point in sa = 526.8
        
{
            if (
sincronizando[playerid] == 1) {
                return 
true;
            }
            
SetPlayerSpawn(playerid);
        }
        
TelePos[playerid][0] = 0.0;
        
TelePos[playerid][1] = 0.0;
        
gPlayerSpawned[playerid] = 1;
        
SafeTime[playerid] = 60;
    }

    return 
true;

Reply
#4

Aproveita e leia esse meu tуpico sobre o CrashDetect. Vocк tem o plugin CrashDetect em execuзгo mas nгo tem configurado o seu Pawn para compilar o GM em "debug mode". A consequкncia disso й que informaзгo ъtil adicional (como por exemplo o nъmero da linha exata onde ocorre o erro) nгo й mostrada.
https://sampforum.blast.hk/showthread.php?tid=587209
Reply
#5

Mostre a linha com a declaraзгo de BlindInfo.
Reply
#6

Nixtren muito obrigado, a linha agora do erro eu achei, vou tentar corrigi-lo agora, fui muita burrice de minha parte usar o plugin de maneira errada ^^

PHP Code:
----------
Loaded log file"server_log.txt".
----------
SA-MP Dedicated Server
----------------------
v0.3.7, (C)2005-2015 SA-MP Team
[20:40:30filterscripts ""  (string)
[
20:40:30
[
20:40:30Server Plugins
[20:40:30] --------------
[
20:40:30]  Loading pluginstreamer
[20:40:30
*** 
Streamer Plugin v2.6.1 by Incognito loaded ***
[
20:40:30]   Loaded.
[
20:40:30]  Loading plugincrashdetect
[20:40:30]   CrashDetect v4.13 is OK.
[
20:40:30]   Loaded.
[
20:40:30]  Loaded 2 plugins.
[
20:40:30
[
20:40:30Ban list
[
20:40:30] --------
[
20:40:30]  Loadedsamp.ban
[20:40:30
[
20:40:30
[
20:40:30Filterscripts
[20:40:30] ---------------
[
20:40:30]   Loaded 0 filterscripts.
[
20:40:30
|-------------------------------|
[
20:40:30]        [11/09/2015 20:40:30]      
[
20:40:30] |-------------------------------|
[
20:40:30] [BSG]: 25 Orgs
[20:40:30] [BSG]: 216 Casas
[20:40:30] [BSG]: 6 Empresas
[20:40:30] [BSG]: 24 MiniEmpresas
[20:40:30] [BSG]: 70 Carros Carregados com sucesso.
[
20:40:30] [BSG]: Mбximo de pickups = [400], pickups em uso = [306]
[
20:40:30NPCs conectados com sucessso!
[
20:40:30]  ________________________________________________________________
[20:40:30] |»»        Brasil Spirit Games Sua diversao comeca aqui!!            ««|
[
20:40:30] |----------------------------------------------------------------|
[
20:40:30] |»»        [RPG/BRASIL] - [Dono/Scripter] - Guilherme/Lucas     ««|
[
20:40:30] |----------------------------------------------------------------|
[
20:40:30]  
[
20:40:30Number of vehicle models81
[20:40:30] [connection127.0.0.1:51042 requests connection cookie.
[
20:40:31Incoming connection127.0.0.1:51042 id0
[20:40:31] [npc:joinBuzao_Preto has joined the server (0:127.0.0.1)
[
20:40:34] [connection127.0.0.1:51043 requests connection cookie.
[
20:40:35Incoming connection127.0.0.1:51043 id1
[20:40:36] [joinLucaS_Carvalho has joined the server (1:127.0.0.1)
[
20:40:43LucaS_Carvalho has logged in.
[
20:41:18] [debugRun time error 4"Array index out of bounds"
[20:41:18] [debug]  Accessing element at index 773 past array upper bound 301
[20:41:18] [debugAMX backtrace:
[
20:41:18] [debug#0 000a6d68 in public OnPlayerStateChange (playerid=1, newstate=2, oldstate=1) at C:\Users\lucas\Desktop\Brasil Spirit Games\gamemodes\BSG.pwn:12870 
Linha 12870

PHP Code:
gLastDriver[newcar] = playerid
Muito obrigado mesmo.

Alguem poderia explicar o que seria Rum timer error 4? Assim eu resolveria o problema da linha 12870, desculpe incomodar, nunca tive problema com o mesmo, por isso peзo a ajuda ^^
Reply
#7

newcar possui um valor maior do que o maior нndice possнvel da array gLastDriver.

Se nгo entendeu, poste a linha em que gLastDriver й declarada.
Reply
#8

No caso estб
PHP Code:
new gLastDriver[302
eu teria que aumentar o 302? Vou ler mais sobre isso depois
Reply
#9

Sim. Troque para MAX_VEHICLES.
Reply
#10

Funcionou, obrigado a todos, zPain, e Nixtren, estб dando que nгo posso reputar nenhum dos 2 mas quando puder eu reputo, de qualquer forma, muito obrigado!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)