[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 workany idea? thanks
-
i found a solution model hash need to be an int so
int modelTest = Int32.Parse(model[0]);
-
@Santo99 GetHashCode() is not the correct way to get the model hash. Use the Model.Hash variable to get the hash.