[Ajuda] Carro Casa sempre aberto
#1

Bem todos os carros das casas estao abertos,e quando dou /trancar ele ele aprece trancado mais continua aberto queria que fechasse o carro e os carros ja ficassem trancados alguem?
acho q n й bug no cmd /trancar mais por via das duvida ta ae o cmd...

PHP код:
    if(strcmp(cmd"/trancar"true) == 0)
    {
        if(
IsPlayerConnected(playerid))
        {
            new 
carid;
            if (
gTeam[playerid] == || gTeam[playerid] == 1)
            {
                if(
gLastCar[playerid] == && PlayerInfo[playerid][pPHousekey] == 255)
                {
                    
SendClientMessage(playeridCOLOR_GRAD2"Vocк nгo tem um carro de casa/alugado.");
                    return 
1;
                }
                else if(
gLastCar[playerid] != && 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)
                {
                    
SendClientMessage(playeridCOLOR_GRAD2"Voce nгo tem um carro.");
                    return 
1;
                }
            }
            
carid PlayerInfo[playerid][pPHousekey]+totalveiculosh;
            if(
HireCar[playerid] > && !SwitchKey[playerid])
            {
                
carid HireCar[playerid];
            }
            
//new driver = gLastDriver[carid];
            
new lockstatus VTrancado[carid];
            new 
Float:cx,Float:cy,Float:cz;
            
GetVehiclePos(caridcxcycz);
            switch (
lockstatus)
            {
                case 
0:
                {
                    if(
HireCar[playerid] == && PlayerInfo[playerid][pPHousekey] == 255)
                    {
                        
SendClientMessage(playeridCOLOR_GRAD2"Voce nгo tem um carro");
                        return 
1;
                    }
                    if(
HireCar[playerid] == carid && !SwitchKey[playerid])
                    {
                        
GameTextForPlayer(playerid"~w~Veiculo Alugado~r~Fechado"50006);
                        
PlayerPlaySound(playerid11450.00.00.0);
                        
VTrancado[carid] = 1;
                        
LockCar(carid);
                    }
                    else if(
PlayerInfo[playerid][pPHouseCarkey] == carid)
                    {
                        
GameTextForPlayer(playerid"~w~Veiculo da Casa ~r~Fechado"50006);
                        
PlayerPlaySound(playerid11450.00.00.0);
                        
VTrancado[carid] = 1;
                        
LockCar(carid);
                        return 
1;
                    }
                }
                case 
1:
                {
                    if(
HireCar[playerid] == && PlayerInfo[playerid][pPHousekey] == 255)
                    {
                        
SendClientMessage(playeridCOLOR_GRAD2"Voce nгo tem um carro");
                        return 
1;
                    }
                    if(
HireCar[playerid] == carid && !SwitchKey[playerid])
                    {
                        
GameTextForPlayer(playerid"~w~Veiculo Alugado~g~Aberto"50006);
                        
PlayerPlaySound(playerid11450.00.00.0);
                        
VTrancado[carid] = 0;
                        
UnLockCar(carid);
                        
SetPlayerVirtualWorld(playerid0);
                        
SetPlayerInterior(playerid0);
                    }
                    if (
PlayerInfo[playerid][pPHouseCarkey] == carid)
                    {
                        
GameTextForPlayer(playerid"~w~Veiculo da Casa ~g~Aberto"50006);
                        
PlayerPlaySound(playerid11450.00.00.0);
                        
VTrancado[carid] = 0;
                        
UnLockCar(carid);
                        
SetPlayerVirtualWorld(playerid0);
                        
SetPlayerInterior(playerid0);
                        return 
1;
                    }
                }
                default:
                {
                    
SendClientMessage(playeridCOLOR_GRAD2"Erro");
                }
            }
            if(
carid == 256)
            {
                
SendClientMessage(playeridCOLOR_GRAD2"Voce nгo tem um carro!");
            }
        }
        return 
1;
    } 
ah meu gm й upado do BMG
Reply


Messages In This Thread
[Ajuda] Carro Casa sempre aberto - by wallacematheus - 25.09.2011, 20:15
Re: [Ajuda] Carro Casa sempre aberto - by Izaac Abreu - 25.09.2011, 20:18
Re: [Ajuda] Carro Casa sempre aberto - by Pharrel - 25.09.2011, 20:59
Re: [Ajuda] Carro Casa sempre aberto - by Izaac Abreu - 25.09.2011, 21:01
Re: [Ajuda] Carro Casa sempre aberto - by Pharrel - 25.09.2011, 21:04
Re: [Ajuda] Carro Casa sempre aberto - by Izaac Abreu - 25.09.2011, 21:09

Forum Jump:


Users browsing this thread: 1 Guest(s)