Jump to content

How to make a mathrandom betwen some numbers


Axel

Recommended Posts

I do not know if you guys will understand me right so..

I want to make a mathrandom betwen 2,5 numbers. What i mean is not the numbers betwen the 2-5- i mean the 2 and 5 numbers. i used :

vehid = math.random(411,558) 
vehicle = createVehicle(vehid,0,0,-50) 

And it gives me some cars i don't want to(including heli)

Link to comment

Now i am trying it somewhere else and it does not work..

  
hookeridlist = { 85, 87, 85, 90, 152, 169, 178, 238, 244, 256, 257, 264, 68,} 
hookerids = hookeridlist[math.random(#hookeridlist)] 
  
addEvent("haveHookerJob",true) 
function haveHookerJob() 
setElementModel(source,hookerids) 
end 
addEventHandler("haveHookerJob",root,haveHookerJob) 

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...