Randomly choosing a player
How can I randomly choose a player in game and execute a function on that player?
Thanks |
Try this:
Code:
|
Thanks for replying so fast. I got one question though. How do I use a stock function?
|
Sorry, if that doesn't work, try this:
Code:
I forgot you didn't specify whether or not the person has to be alive. |
How do I use that? Where do I put my code?
|
Put it at the end of your script, then anywhere use this:
Code:
And a random player will be stored into player. |
I'm sorry man I'm still not really getting you. For example let's say that I just wanted to put a client_print on a random person with a task that checks it. How would I include that code in?
|
Code:
I think that should work. |
Quote:
Code:
|
Hawk that doesn't work for me. Is there any other way?
|
| All times are GMT -4. The time now is 20:16. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.