You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the giveComponent from WeaponObject does not exist
Reproduction steps
async function test() {
let ppos = alt.Player.local.pos;
let npos = new alt.Vector3(ppos.x,ppos.y,ppos.z + 1);
const w = new alt.WeaponObject(3220176749,npos,new alt.Vector3(0,0,0));
await w.waitForSpawn();
w.frozen = true;
await alt.Utils.wait(5000);
w.giveComponent(3689981245);
await alt.Utils.wait(5000)
w.destroy();
}
Expected behaviour
giveComponent be a part of WeaponObject
Additional context
try to confirm this issue on Dev, but the current dev client does not Start (crash)
so i posted it to not forget
Operating system
Win/Linux
Version
release
Scope
client
Reproduction tested
I confirm that I have made sure that this issue is also present on the newest dev version
The text was updated successfully, but these errors were encountered:
first every with alt.WeaponObject created Weapon
is on First create
instanceof WeaponObject and LocalObject Positive
on Second Create Only Positive on LocalObject
tested this many times with 20 weapon hashes (like the code above exclude the givecomponent part
Now the suspect part Beginns
All Test Rounds starting with a Clean Client start
the only change now is to call this before the create test
alt.on("baseObjectCreate",(entity) => {
if (entity instanceof alt.WeaponObject) alt.log("BaseObjectCreate is WeaponObject " + entity.hash);
if (entity instanceof alt.LocalObject) alt.log("BaseObjectCreate is LocalObject" + entity.hash);
});
If i do this Before the create
All are Instant LocalObject never WeaponObject
Description of the problem
the giveComponent from WeaponObject does not exist
Reproduction steps
async function test() {
let ppos = alt.Player.local.pos;
let npos = new alt.Vector3(ppos.x,ppos.y,ppos.z + 1);
const w = new alt.WeaponObject(3220176749,npos,new alt.Vector3(0,0,0));
await w.waitForSpawn();
w.frozen = true;
await alt.Utils.wait(5000);
w.giveComponent(3689981245);
await alt.Utils.wait(5000)
w.destroy();
}
Expected behaviour
giveComponent be a part of WeaponObject
Additional context
try to confirm this issue on Dev, but the current dev client does not Start (crash)
so i posted it to not forget
Operating system
Win/Linux
Version
release
Scope
client
Reproduction tested
The text was updated successfully, but these errors were encountered: