[Ajuda] /trancar veiculo bugado
#1

Aew Galera Tava Revisando Meu Sistema de Carros Vip e Percebi Que Os Meus Veнculos Vips Nгo Destrancam Prуximo Do Veiculo Ele So Estб Destrancando Dentro de interiores, e Outro problema e que os Carros Eles So Trancam Quando o Player Dono do Veiculo Estб Dentro Dele!

Revisando: Veiculo So Destranca Dentro de Interiores, e So Tranca Dentro Do Veiculo!

o Meu /veiculo trancar

PHP код:
        if(strcmp(tmp"trancar"true) == 0)
        {
            if(
PlayerInfo[playerid][pCarKey] == && PlayerInfo[playerid][pCarKey2] == 0)
            {
                
SendClientMessage(playeridCOLOR_GREY"Vocк nгo tem um Carro VIP.");
                return 
true;
            }
            if(
PlayerInfo[playerid][pCarKey] != vehid && PlayerInfo[playerid][pCarKey2] != vehid)
            {
                
SendClientMessage(playeridCOLOR_GREY"Esse nгo й seu Carro VIP.");
                return 
true;
            }
            new 
keycar GetPlayerVehicleID(playerid);
            if(
vehid == PlayerInfo[playerid][pCarKey]) { keycar PlayerInfo[playerid][pVeiculo]; }
            else if(
vehid == PlayerInfo[playerid][pCarKey2]) { keycar PlayerInfo[playerid][pVeiculo2]; }
            if(
IsPlayerConnected(playerid))
            {
                if(
CarInfo[keycar][cLock] == 1)
                {
                for(new 
0MAX_PLAYERSi++)
                {
                    if(
IsPlayerConnected(i)) SetVehicleParamsForPlayer(CarInfo[keycar][ownedvehicle],i,0,0);
                }
                
format(stringsizeof(string), "~w~Veiculo VIP~n~~g~Aberto");
                
PlayerPlaySound(playerid11450.00.00.0);
                
GameTextForPlayer(playeridstring100003);
                
CarInfo[keycar][cLock] = 0;
                return 
true;
                }
                else
                {
                for(new 
0MAX_PLAYERSi++)
                {
                    if(
IsPlayerConnected(i)) SetVehicleParamsForPlayer(CarInfo[keycar][ownedvehicle],i,0,1);
                }
                
format(stringsizeof(string), "~w~Veiculo VIP~n~~r~Trancado");
                
PlayerPlaySound(playerid11450.00.00.0);
                
GameTextForPlayer(playeridstring100003);
                
CarInfo[keycar][cLock] = 1;
                return 
true;
                }
            }
            return 
true;
        } 
Reply
#2

Olб lucasbjs0!

realmente nгo consegui entender o que vocк quis dizer.

Vlw!
Reply
#3

Cara o Meu Problema e Que Quando eu Digito /veiculo trancar Ele Nгo Destranca Quando a Gente A Esta Perto Dele ele So e Destrancando Quando a Gente Digita /veiculo trancar dentro de algum interior tipo Prefeitura Banco Loteria Loja e etc..
Reply
#4

Nossa cara, me explica qual a graзa de editar um GM bugado? Nгo adianta falar que este GM й do seu amigo porque NГO й. E como vocк tб fazendo a versгo 4.7 sendo que tu nгo sabe nada? (pode dar -REP, caralho a quatro mais eu disse a verdade.)
Reply
#5

sofina falta poucos dias pra hospedar meu server quando hospedar dar uma passadinha la pra vc ver a magia!
Como Disse o GM Era do Meu Amigo o server nun era tгo famoso batia uns 90/150 por dia ai ele fechou o server e me passou os arquivos ai o server tinha parado na versгo 4.6! e so estou continuando oq ele parou eu sei que sou novato mais eu sou vc e chato pra caralh#!
Reply
#6

Mano, para que pegar o GM dele? Vocк pode fazer um muito melhor, imagina quando vocк abrir seu server e comeзar aparecer sugestхes "fodas" o que vocк vai fazer? Vim aqui no fуrum pedir? Me poupe nй amigo. Sim sou chato mesmo, mais quero futuro melhor para os coders brasileiros.
Reply
#7

kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk Quer Futuro Melhor Para o coders do brasil kkkkkk fode caralho!
Reply
#8

lucas, conta todos os carros do servidor, e quase decerteza se for verificar a max_vehicles nao vai bater certo, ou seja o bug estara na define max_vehicles, voce ou tem mais ou menos carros no gm so que mal contabilizados, quando efectuar a contagem dos carros vai na define e ajusta lб ... faz isso e vem aqui dizer alguma coisa.
Reply
#9

ow bastiga ta batendo certo cara pq todas as outras funзхes dos veiculo vip ta funcionado tipo /veiculo modelo /veiculo cor /veiculo estacionar /veiculo vender tгo tudo funcionado legal mais o problema e esse aew que o veiculo so destranca em interiores e so tranca dentro do veiculo!
Reply
#10

Tenta e me diz alguma coisa
pawn Код:
if(strcmp(cmd, "/trancar", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            new carid;
            if (gTeam[playerid] == 2 || gTeam[playerid] == 1)
            {
                if(gLastCar[playerid] == 0 && PlayerInfo[playerid][pPHousekey] == 255)
                {
                    MSGPLAYER(playerid, COR_BRANCO, "Vocк nгo tem um carro de casa/alugado.");
                    return 1;
                }
                else if(gLastCar[playerid] != 0 && gLastCar[playerid] != PlayerInfo[playerid][pPHousekey]+totalveiculos)
                {
                    if (HireCar[playerid] != gLastCar[playerid] && HireCar[playerid] > 0)
                    {
                        gLastDriver[HireCar[playerid]] = 300;
                        VTrancado[HireCar[playerid]] = 0;
                        UnLockCar(HireCar[playerid]);
                    }
                    HireCar[playerid] = gLastCar[playerid];
                }
            }
            if (PlayerInfo[playerid][pPHousekey] == 255)
            {
                if(HireCar[playerid] == 0)
                {
                    MSGPLAYER(playerid, COR_BRANCO, "Voce nгo tem um carro.");
                    return 1;
                }
            }
            carid = PlayerInfo[playerid][pPHousekey]+totalveiculosh;
            if(HireCar[playerid] > 0 && !SwitchKey[playerid])
            {
                carid = HireCar[playerid];
            }
            //new driver = gLastDriver[carid];
            new lockstatus = VTrancado[carid];
            new Float:cx,Float:cy,Float:cz;
            GetVehiclePos(carid, cx, cy, cz);
            switch (lockstatus)
            {
                case 0:
                {
                    if(HireCar[playerid] == 0 && PlayerInfo[playerid][pPHousekey] == 255)
                    {
                        MSGPLAYER(playerid, COR_BRANCO, "Voce nгo tem um carro");
                        return 1;
                    }
                    if(HireCar[playerid] == carid && !SwitchKey[playerid])
                    {
                        GameTextForPlayer(playerid, "~w~Veiculo Alugado~r~Fechado", 5000, 6);
                        PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
                        VTrancado[carid] = 1;
                        LockCar(carid);
                    }
                    else if(PlayerInfo[playerid][pPHouseCarkey] == carid)
                    {
                        GameTextForPlayer(playerid, "~w~Veiculo da Casa ~r~Fechado", 5000, 6);
                        PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
                        VTrancado[carid] = 1;
                        LockCar(carid);
                        return 1;
                    }
                }
                case 1:
                {
                    if(HireCar[playerid] == 0 && PlayerInfo[playerid][pPHousekey] == 255)
                    {
                        MSGPLAYER(playerid, COR_BRANCO, "Voce nгo tem um carro");
                        return 1;
                    }
                    if(HireCar[playerid] == carid && !SwitchKey[playerid])
                    {
                        GameTextForPlayer(playerid, "~w~Veiculo Alugado~g~Aberto", 5000, 6);
                        PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
                        VTrancado[carid] = 0;
                        UnLockCar(carid);
                        SetPlayerVirtualWorld(playerid, 0);
                        SetPlayerInterior(playerid, 0);
                    }
                    if (PlayerInfo[playerid][pPHouseCarkey] == carid)
                    {
                        GameTextForPlayer(playerid, "~w~Veiculo da Casa ~g~Aberto", 5000, 6);
                        PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
                        VTrancado[carid] = 0;
                        UnLockCar(carid);
                        SetPlayerVirtualWorld(playerid, 0);
                        SetPlayerInterior(playerid, 0);
                        return 1;
                    }
                }
                default:
                {
                    MSGPLAYER(playerid, COR_BRANCO, "Erro");
                }
            }
            if(carid == 256)
            {
                MSGPLAYER(playerid, COR_BRANCO, "Voce nгo tem um carro!");
            }
        }
        return 1;
    }
Reply


Forum Jump:


Users browsing this thread: