Log in to reply
 

[C#] read HashCode from ini



  • int modelHash;
    modelHash = CurrAuto.Model.GetHashCode(); //GET THE HASH OF THE CAR
    string modelString = modelHash.ToString(); //TURN INT IN STRING
    IniFile ini = new IniFile(iniFold); //CREATE INI FILE
    ini.WriteValue("Car" + 0, "Model", modelString); //SAVE [CAR0] MODEL=MODELHASH

    //READ INI FILE
    Vehicle spawnAuto = World.CreateVehicle(model0, player.Position * 4f); //doesn't work :/

    any idea? thanks



  • i found a solution model hash need to be an int so
    int modelTest = Int32.Parse(model[0]);


  • MODERATOR

    @Santo99 GetHashCode() is not the correct way to get the model hash. Use the Model.Hash variable to get the hash.


Log in to reply
 

Looks like your connection to GTA5-Mods.com Forums was lost, please wait while we try to reconnect.