SET_AMMO_IN_CLIP in Tick
-
I made a list of weapon hashes:
List<uint> weaponHashes = new List<uint> {
453432689(pistol), 1593441988(Combat Pistol)
};In a Tick function, I know that I can call:
Function.Call(Hash.SET_AMMO_IN_CLIP, Game.Player.Character, weaponHashes[0], 12);
Function.Call(Hash.SET_AMMO_IN_CLIP, Game.Player.Character, weaponHashes[1], 12);But I would rather not do that to a million different weapons, so here is what I tried:
for (int i = 0; i < weaponHashes.Count; i++) {
Function.Call(Hash.SET_AMMO_IN_CLIP, Game.Player.Character, weaponHashes[i], 12);
}That crashes the menu every time it is called. Am I missing something obvious or is this way of calling the function not possible in this context?