Search the Community
Showing results for tags 'm4'.
-
I would like to ask if there is a way to make a second weapon, for example to have two M4s, but to shoot differently, e.g. to have a different one with a rate of fire and the other one to deal more hp. Is there a way to do something like this?
-
-
function buyWeapon(thePlayer, command) local mycoins = exports.coinsystem:getPlayerCoin(thePlayer) if (mycoins >= 1) then giveWeapon(thePlayer, 31, 2000) exports.coinsystem:takePlayerCoin(thePlayer, prize) outputChatBox("you bought a M4.", thePlayer, 0, 255, 0, false) else outputChatBox("you don't have enough coins!", thePlayer, 255, 0, 0, false) end end addCommandHandler("buyw", buyWeapon) i got this error: xy.lua:17: attempt to compare number with nil