Jump to content

math.random_don't work..


boro

Recommended Posts

Hi all i try set math.random for clothes but this don't work.. Please help, what is bad "CONSOLE IS CLEAR"..

THIS IS FOR SPAWN PLAYER EVENT..

   addPedClothes ( math.random ( skinped, "player_torso", "torso", 0 ) or ( skinped, "vestblack", "vest", 0) ) 

Link to comment

math.random returns an random int between 0 to 1. You've to give 2 parameters to it to get another int, since you are giving a int, 2x string and 1x int again. It will never work. Split the 2 functions;

local rand = math.random ( 0, 2 ); 
addPedClothes ( player, "player_torso", "torso", rand ); 

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...