Jump to content
Luft08

getClientStateNumber question

Recommended Posts

I looked this command up in the wiki and it gave two examples.  I don't understand the second example:

_inGame = getClientStateNumber > 8;

 

I thought it simply returns a value.  I understand _ingame = getClientStateNumber but what does the "> 8" do?

Share this post


Link to post
Share on other sites
16 hours ago, Luft08 said:

I thought it simply returns a value.

It does, it then checks whether that number is greater than(>) 8.

Which 8 is "GAME LOADED" Island loaded, vehicles received.

Share this post


Link to post
Share on other sites
On 1/28/2021 at 8:11 AM, Larrow said:

It does, it then checks whether that number is greater than(>) 8.

Which 8 is "GAME LOADED" Island loaded, vehicles received.

Sorry but maybe I'm just slow. I still don't understand.  So if it determines that the value is less than 8 what does it return? i.e. does it wait until the return value WILL BE greater than 8 before returning?

Share this post


Link to post
Share on other sites
3 hours ago, Luft08 said:

So if it determines that the value is less than 8 what does it return?

 

Did you have a look at the link i posted? It explains exactly that and also gives an example. getClientStateNumber returns a number and > compares it with 8. If you want to wait until getClientStateNumber > 8 you need to put it in a https://community.bistudio.com/wiki/waitUntil. But you need to read the info on those commands. 

Share this post


Link to post
Share on other sites

The command returns number, > is not part of the command, it is comparison operator to compare your number to the number command returns, when you use comparison operator the expression will return true or false.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×