The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Help Random variables
Omenapuu Offline
Junior Member

Posts: 31
Threads: 8
Joined: Oct 2013
Reputation: 1
#1
Random variables

Hi everyone, and happy coding! I'm asking if anyone of you know how to use the RandInt code. I basically know the variables and so, but as I can't name the random int, how to I make an if-else statement about that. Heres an example what im talking about:
--------
if(GetLocalVarInt("sounds") == 1
{
PlayGuiSound("sumthing", 100);
}
----------------
Now I want to make that like it generates a random int, if its 1 it plays something, if 2 if plays something else, and so on. I just don't understand how Huh
(This post was last modified: 10-30-2013, 07:50 PM by Omenapuu.)
10-30-2013, 07:49 PM
Find


Messages In This Thread
Random variables - by Omenapuu - 10-30-2013, 07:49 PM
RE: Random variables - by Adrianis - 10-31-2013, 03:12 AM
RE: Random variables - by PutraenusAlivius - 10-31-2013, 07:40 AM



Users browsing this thread: 1 Guest(s)