[HELP] Spawing weapon to player when log in

Hello guys i’m new to FiveM scripting and i just tried to do a simple thing that when player joins does this function but apperantly it’s giving me errors… can you help me out?

GiveWeaponToPed(PlayerPedId(), 453432689, 100, false, false)

Hi,

I’ve tried it like this:

RegisterCommand('weapon', (source, args, raw) => {
    GiveWeaponToPed(PlayerPedId(), 453432689, 100, false, false)
}, false);

It works smoothly… old gamebuild or serverbuild?

Thanks!

1 Like