Sorting spawning points
So, a friend of me made me a function in the past in 'Python'..
Can someone make for me a 'pawn' version of it? So the point is, there are 4 sides, each side got 3 spawns. This function put's in a variable, all 3 spawns for each side. Code:
def group_spawnpoints(per_side):Thanks. |
Re: Sorting spawning points
Do you still need this? I'm willing to give it a shot, I just forgot about the topic.
|
Re: Sorting spawning points
Well, I made my version of it.
If you can show me a better way, I'm open for it! PHP Code:
|
Re: Sorting spawning points
Untested. This is pretty much a direct translation of the original Python code. Requires 1.8.3 (1.9) though. If you need it for 1.8.2, you can replace ArrayClone(x) with CellArraySlice(x, 0, ArraySize(x)) and use ArraySort instead of ArraySortEx (check the include file to see the differences, you'll need to change the callback code a bit). It will function the same but 1.9 will perform better with new natives (although not even measurable for a small amount of spawn points probably), and the code is tidier as a bonus.
I guess this is for one of your mini-games, where you would split 4 teams into 4 sides on the map? PHP Code:
|
Re: Sorting spawning points
Quote:
I'll test it later, thanks! |
| All times are GMT -4. The time now is 07:36. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.