News: Welcome back to Bullworth! If you haven't already, you will need to reset your password..


Author Topic: Can't Give Jimmy Skateboard With Lua  (Read 1417 times)

0 Members and 1 Guest are viewing this topic.

Offline JustSomeGuy24

  • Jr. Member
  • **
  • Posts: 16
    • View Profile
Can't Give Jimmy Skateboard With Lua
« on: September 18, 2021, 03:47:35 PM »
I made a Lua code where Jimmy can be given most of the best items in the beginning of the game, however, whenever I spawn the Skateboard he loses it as soon as its unequiped. Any help?

Offline JustSomeGuy24

  • Jr. Member
  • **
  • Posts: 16
    • View Profile
Re: Can't Give Jimmy Skateboard With Lua
« Reply #1 on: September 18, 2021, 03:52:37 PM »
Code: [Select]
main = function()
  Wait(500)
  repeat
if IsButtonBeingPressed(0,0) then
    PedSetWeapon(gplayer, 437)
    GiveWeaponToPlayer(gplayer, 437)
Wait(1000)
PedSetWeapon(gplayer, 306)
GiveWeaponToPlayer(gplayer, 306)
Wait(1000)
PedSetWeapon(gplayer, 307)
GiveWeaponToPlayer(gplayer, 307)
GiveAmmoToPlayer(308, 12)
Wait(1000)
PedSetWeapon(gplayer, 305)
GiveWeaponToPlayer(gplayer, 305)
GiveAmmoToPlayer(316, 8)
Wait(1000)
GiveWeaponToPlayer(gplayer, 301)
GiveAmmoToPlayer(301, 5)
Wait(1000)
GiveWeaponToPlayer(gplayer, 320)
GiveAmmoToPlayer(320, 1)
Wait(1000)
end
if IsButtonBeingPressed(1,0) then
    PedSetWeapon(gplayer, 372)
Wait(1000)
end
    if IsButtonBeingReleased(14,0) then
    PedSetWeapon(gplayer, 397)
Wait(1000)
end
    Wait(0)
  until not Alive
end

Offline SimonBestia

  • Full Member
  • ***
  • Posts: 294
  • Gender: Male
  • Bully-Board's Best Weeb
    • View Profile
    • Youtube Channel
Re: Can't Give Jimmy Skateboard With Lua
« Reply #2 on: September 19, 2021, 03:21:30 AM »
This works for me:
Code: [Select]
PedSetWeaponNow(gplayer, 415, -1)

Offline JustSomeGuy24

  • Jr. Member
  • **
  • Posts: 16
    • View Profile
Re: Can't Give Jimmy Skateboard With Lua
« Reply #3 on: September 24, 2021, 12:33:49 AM »
Thanks so much! Btw I love your videos on Bully Beta content :D