Jump to content

Need quick help


Soldier666

Recommended Posts

Okay but how does it work?

if math.random( 1, 2 ) == 1 then 
    here goest the script 
  

AND how to call IF NOT 1? smth like

if math.random( 1, 2 ) == 1 then 
    here goest the script 
else 
    the action if it's not 1.. 
  
 

But I've tried it and it doesnt work properly.. maybe because my if math.random is already in another IF ..?

Link to comment

addCommandHandler("Text", 
            function ( ) 
local Text = math.random(1,2) 
    if ( Text == 1 ) then return outputChatBox("* Text Found!") end -- if found the text then return to ...  
        outputChatBox(tostring(Text)) -- output the other text (2)  
    end 
) 
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...