Problema com o comando /alugarmoto
#1

Quando eu alugo a moto, as pessoas nгo conseguem da a ingnicгo no veiculo. Tem que sair do veiculo e depois entrar para ligar. Alguйm sabe onde errei nesse comando?

Eu acho que pode ser esses 3 linhas aqui.

PHP код:
   gEngine[playerid] = 1;
   
engineOn[GetPlayerVehicleID(playerid)] = false;
   
//TogglePlayerControllable(playerid, 1); 
COMANDO "/alugarmoto"

PHP код:
    if(strcmp(cmd"/alugarmoto"true) == 0)
    {
        if(
IsPlayerConnected(playerid))
        {
            for(new 
0sizeof(rentcar); i++)
            {
                if(
GetPlayerVehicleID(playerid) == rentcar[i]) continue;
            }
            new 
hirefee HireCost(GetPlayerVehicleID(playerid));
            if(
SBizzInfo[1][sbProducts] == 0)
            {
                
GameTextForPlayer(playerid"~r~Fora de estoque"50001);
                return 
1;
            }
            if (
GetPlayerMoney(playerid) <  SBizzInfo[1][sbEntranceCost])
            {
                
SendClientMessage(playeridCOLOR_GRAD2"  Voce nao tem dinheiro !");
                return 
1;
            }
            if(
HireCar[playerid] != 299)
            {
                
gCarLock[HireCar[playerid]] = 0;
                
UnLockCar(HireCar[playerid]);
                
SendClientMessage(playeridCOLOR_GREY"Vocк precisa desalugar seu carro/moto/barco atual primeiro !");
                return 
1;
            }
            for(new 
i=0i<MAX_PLAYERSi++)
            {
                if(
HireCar[i] == GetPlayerVehicleID(playerid))
                {
                    
SendClientMessage(playeridCOLOR_GREY"    Alguem alugou esse carro !");
                    return 
1;
                }
            }
            
/*if(PlayerInfo[playerid][pPbiskey] == 1)
            {
                GameTextForPlayer(playerid, "~w~No charge for the boss", 5000, 3);
                TogglePlayerControllable(playerid, 1);
                return 1;
            }*/
            
SafeGivePlayerMoney(playerid,-SBizzInfo[1][sbEntranceCost]);
            
SBizzInfo[1][sbTill] += SBizzInfo[1][sbEntranceCost];
            
ExtortionSBiz(1SBizzInfo[1][sbEntranceCost]);
            
SBizzInfo[1][sbProducts]--;
            
HireCar[playerid] = GetPlayerVehicleID(playerid);
            
OnPropUpdate(3,1);
            
PlayerPlaySound(playerid10520.00.00.0);
            
format(stringsizeof(string), "~w~Nao esqueca de usar ~r~/desalugarmoto~n~~g~/trancar ~w~para fechar o carro.",hirefee);
            
SendClientMessage(playeridCOLOR_YELLOW2"Voce pode dar a inginicao !");
            
gEngine[playerid] = 1;
            
engineOn[GetPlayerVehicleID(playerid)] = false;
            
//TogglePlayerControllable(playerid, 1);
            
GameTextForPlayer(playeridstring50003);
            new 
ymd;
            new 
h,mi,s;
            
getdate(y,m,d);
            
gettime(h,mi,s);
            
format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s [CMD] -> /alugarmoto",d,m,y,h,mi,s,sendername);
            
CommandLog(string);
        }
        return 
1;
    } 
Reply


Messages In This Thread
Problema com o comando /alugarmoto - by escolano - 24.08.2013, 02:31
Re: Problema com o comando /alugarmoto - by PT - 24.08.2013, 02:38
Re: Problema com o comando /alugarmoto - by escolano - 24.08.2013, 02:43
Re: Problema com o comando /alugarmoto - by focaximubh - 24.08.2013, 02:54
Re: Problema com o comando /alugarmoto - by escolano - 24.08.2013, 05:40
Re: Problema com o comando /alugarmoto - by darkxdll - 24.08.2013, 13:41
Re: Problema com o comando /alugarmoto - by escolano - 24.08.2013, 14:29
Re: Problema com o comando /alugarmoto - by PT - 24.08.2013, 15:34
Re: Problema com o comando /alugarmoto - by escolano - 24.08.2013, 21:08
Re: Problema com o comando /alugarmoto - by PT - 24.08.2013, 21:45

Forum Jump:


Users browsing this thread: 1 Guest(s)