isa_Khamdan Posted August 10, 2013 Share Posted August 10, 2013 Is there any script in the community that create pickups in a selected area but in random places in the selected area and when you take the pickup the player will get amount of money and another pickup will spawn directly in another location so if there is a script like that can someone give me the link for it and if not just tell me how to make one and I will script it myself Link to comment
Castillo Posted August 10, 2013 Share Posted August 10, 2013 I don't think there's such script, but is not hard to do it. Link to comment
golanu21 Posted August 10, 2013 Share Posted August 10, 2013 you need to createColRectangle createPickup -- there you need to create 2,3,4 table with pickups.. for math.random, when you use the command on a colRectangle, then.. to start a math.random on pickups in that area. math.random givePlayerMoney unpack --Events "addCommandHandler" "onPickupHit" Link to comment
tosfera Posted August 10, 2013 Share Posted August 10, 2013 Managed to get it fixed? Else I could give you a little hand. @goluna21; you dont need to use the "createColRectangle" function. Why dont you just use the math.random and give it 2 parameters. local posX, posY, posZ = getElementPosition ( source ); local X = math.random ( posX - 150, posX + 150 ); local Y = math.random ( posY - 150, posY + 150 ); local pickup = createPickup ( X, Y, posZ, 3, 1212 ); Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now