mercredi 20 juillet 2016

[Ajuda] bug de carros

meu comando pega os carros.. porem ao invez de dar a msg de criado ele da a msg de que nao existe na lista.. mas spawna normal.

Code:

CMD:car(playerid, params[]) {


    static
    Float: x,
    Float: y,
    Float: z,
    Float: a;
    GetPlayerPos(playerid, x, y, z);
    GetPlayerFacingAngle(playerid, a);




    if (!IsNumeric(params[0])) {


        static _f;
        for (_f = 0; _f != sizeof(ListaCarros); ++_f) {
            if (strfind(ListaCarros[_f], params[0], true) != -1) {
                CreateVehicleEx(playerid, _f + 400, x, y, z + 1, a, 152, 1, -1);
                break;
            }
        }


        format(String, sizeof(String), "{1E90FF}Veiculo: {FFFFFF}Veículo [%s] criado!", ListaCarros[_f - 400]);
        return Msg(playerid, Branco, String), true;
    } else {
        static
        VeiculoID;

        VeiculoID = strval(params[0]);

        if (400 < (VeiculoID) > 611) {
            format(String, sizeof(String), "{1E90FF}Lista Carros:  {FFFFFF}O Veículo %s não existe em nossa lista.", VeiculoID);
            return Msg(playerid, Branco, String);
        }


        CreateVehicleEx(playerid, VeiculoID + 400, x, y, z + 1, a, 152, 1, -1);

        format(String, sizeof(String), "{1E90FF}Veiculo: {FFFFFF}Veículo [%s] criado!", ListaCarros[VeiculoID - 400]);
        Msg(playerid, Branco, String);
    }

    LigarCarro(playerid);
    return true;
}

Let's block ads! (Why?)



[Ajuda] bug de carros

Aucun commentaire:

Enregistrer un commentaire