Raised This Month: $ Target: $400
 0% 

Choosing a random player


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
WATCH_D0GS UNITED
Senior Member
Join Date: Jan 2023
Old 04-16-2024 , 18:48   Re: Choosing a random player
Reply With Quote #11

random() will select a random value from 0 to the specified max value.

random(7) -> {0,1,2,3,4,5,6,7}

which sometimes, will lead to this:

PHP Code:
iRandom iPlayers 
Valid client entity indexes are from 1 to 32.

As an additional note, there are two more issues which are related to the use of get_players() native which we will not point out here,
but we are pretty sure that if someone knows how entity index slots works in the game this person will understand why.
__________________
💻Know Our New Blog👄
🔗tube2downs.blogspot.com
WATCH_D0GS UNITED is offline
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 06:33.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode