Problema com o comando /alugarmoto
#10

esqueci 1 coisa
tenta assim

pawn Код:
if(strcmp(cmd, "/alugarmoto", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            for(new i = 0; i < sizeof(rentcar); i++)
            {
                if(GetPlayerVehicleID(playerid) == rentcar[i]) continue;
            }
            new hirefee = HireCost(GetPlayerVehicleID(playerid));
            if(SBizzInfo[1][sbProducts] == 0)
            {
                GameTextForPlayer(playerid, "~r~Fora de estoque", 5000, 1);
                return 1;
            }
            if (GetPlayerMoney(playerid) <  SBizzInfo[1][sbEntranceCost])
            {
                SendClientMessage(playerid, COLOR_GRAD2, "  Voce nao tem dinheiro !");
                return 1;
            }
            if(HireCar[playerid] != 299)
            {
                gCarLock[HireCar[playerid]] = 0;
                UnLockCar(HireCar[playerid]);
                SendClientMessage(playerid, COLOR_GREY, "Vocк precisa desalugar seu carro/moto/barco atual primeiro !");
                return 1;
            }
            for(new i=0; i<MAX_PLAYERS; i++)
            {
                if(HireCar[i] == GetPlayerVehicleID(playerid))
                {
                    SendClientMessage(playerid, COLOR_GREY, "    Alguem alugou esse carro !");
                    return 1;
                }
            }
            SafeGivePlayerMoney(playerid,-SBizzInfo[1][sbEntranceCost]);
            SBizzInfo[1][sbTill] += SBizzInfo[1][sbEntranceCost];
            ExtortionSBiz(1, SBizzInfo[1][sbEntranceCost]);
            SBizzInfo[1][sbProducts]--;
            HireCar[playerid] = GetPlayerVehicleID(playerid);
            OnPropUpdate(3,1);
            PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
           
            SendClientMessage(playerid, COLOR_YELLOW2, "Voce pode dar a inginicao !");
            gEngine[playerid] = 1;
           
            format(string, sizeof(string), "~w~Nao esqueca de usar ~r~/desalugarmoto~n~~g~/trancar ~w~para fechar o carro.",hirefee);
            GameTextForPlayer(playerid, string, 5000, 3);
           
            new engine, lights, alarm, doors, bonnet, boot, objective, y, m, d, h,mi,s, vehicleid = GetPlayerVehicleID(playerid);
            GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
            SetVehicleParamsEx(vehicleid, 1, lights, alarm, doors, bonnet, boot, objective);
           
            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: 2 Guest(s)