Get random spawn coordinates
I'm trying to make a function which will teleport the player to a random spawn location.
PHP Code:
|
Re: Get random spawn coordinates
try
entity_set_vector(id, EV_VEC_origin, origin) |
Re: Get random spawn coordinates
It's working now. Thank you! Only one problem - it keeps teleporting me to the same spawn point, although I made it with random_num(-1, 10), so shouldn't it cycle through 12 different ones?
|
Re: Get random spawn coordinates
Quote:
|
Re: Get random spawn coordinates
|
Re: Get random spawn coordinates
Loop through all spawn points in plugin_init and store them in an array, then when you want to teleport the player, simply take a random spawn point from the array.
Answering my own question like a boss. |
Re: Get random spawn coordinates
Quote:
How to get all spawn points ? |
Re: Get random spawn coordinates
|
| All times are GMT -4. The time now is 22:11. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.