Raised This Month: $12 Target: $400
 3% 

Random locations generator


Post New Thread Reply   
 
Thread Tools Display Modes
^SmileY
Veteran Member
Join Date: Jan 2010
Location: Brazil [<o>]
Old 01-12-2018 , 11:40   Re: Random locations generator
Reply With Quote #21

Quote:
Originally Posted by edon1337 View Post
Would I be able to use this to spawn players in the highest map point but making sure they'll fall into a safe place (not in water or any other unsafe zone) also to have a minimal distance (enough to not stuck a player into another) between players?
Yes, but have two ways of use this

1. Caching spawns positions like csdm: Create spawns -> Cache -> Use in a static (Read spawns.txt file)
2. Dynamically creating and use without store spawns.

I prefer first way so you can edit spawn points, removing that you do not want. And finally store removed spawns to not be generated again.
__________________
Projects:

- See my Git Hub: https://github.com/SmileYzn
PHP Code:
set_pcvar_num(pCvar, !get_pcvar_num(pCvar)); 
^SmileY is offline
Send a message via MSN to ^SmileY Send a message via Skype™ to ^SmileY
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 01-12-2018 , 13:08   Re: Random locations generator
Reply With Quote #22

Quote:
Originally Posted by ^SmileY View Post
Yes, but have two ways of use this

1. Caching spawns positions like csdm: Create spawns -> Cache -> Use in a static (Read spawns.txt file)
2. Dynamically creating and use without store spawns.

I prefer first way so you can edit spawn points, removing that you do not want. And finally store removed spawns to not be generated again.
I need the spawn points to be generated automatically, as there won't be just one map, I'm already using the manual way of storing origins in an external file.
__________________
edon1337 is offline
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 01-13-2018 , 19:25   Re: Random locations generator
Reply With Quote #23

It creates random locations as obviously, it says. Can be in non-sense point. The first way is better to me because you can select a point where you want, like in the corners, that's the best position to be respawned (in DM mod, I mean). This include is pretty useful for plugins like Respawn Boxes with bonus or anything else that needs to be respawned randomly.
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo
EFFx is offline
joropito
AlliedModders Donor
Join Date: Mar 2009
Location: pfnAddToFullPack
Old 01-15-2018 , 08:16   Re: Random locations generator
Reply With Quote #24

You can use this once per map, dump the results and build your custom respawns file.
__________________

Divide et vinces
approved plugins | steam account

I don't accept PM for support. Just ask on forums.
If you're looking for private work, PM me.
joropito is offline
Send a message via MSN to joropito
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 01-15-2018 , 08:53   Re: Random locations generator
Reply With Quote #25

Quote:
Originally Posted by joropito View Post
You can use this once per map, dump the results and build your custom respawns file.
How would I implement a method to spawn players in the highest map point in your plugin?

EDIT: I implemented it myself, never mind.
__________________

Last edited by edon1337; 01-18-2018 at 16:56.
edon1337 is offline
Old 01-28-2018, 23:34
EFFx
This message has been deleted by EFFx. Reason: .
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 07-13-2018 , 10:41   Re: Random locations generator
Reply With Quote #26

Just wanted to let you know that 1 out of 15 times (not exactly) it generates a location outside of the map. Tested in de_mon map.
__________________
edon1337 is offline
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 07-14-2018 , 11:04   Re: Random locations generator
Reply With Quote #27

It's good to use, but sometimes in some maps, it creates points that players can't access normally, de_dust2 is one of them, it's randomly, but still a negative point.
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo
EFFx is offline
^SmileY
Veteran Member
Join Date: Jan 2010
Location: Brazil [<o>]
Old 07-14-2018 , 16:12   Re: Random locations generator
Reply With Quote #28

Quote:
Originally Posted by EFFx View Post
It's good to use, but sometimes in some maps, it creates points that players can't access normally, de_dust2 is one of them, it's randomly, but still a negative point.
You can check when this point is invalid when generating it.
After do these checks you can save in a file, and edit it later with a editor
__________________
Projects:

- See my Git Hub: https://github.com/SmileYzn
PHP Code:
set_pcvar_num(pCvar, !get_pcvar_num(pCvar)); 
^SmileY is offline
Send a message via MSN to ^SmileY Send a message via Skype™ to ^SmileY
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 07-14-2018 , 16:18   Re: Random locations generator
Reply With Quote #29

Quote:
Originally Posted by ^SmileY View Post
You can check when this point is invalid when generating it.
After do these checks you can save in a file, and edit it later with a editor
There's cases when even SsGetOrigin returns true but the location is inproper.
__________________
edon1337 is offline
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 07-14-2018 , 20:20   Re: Random locations generator
Reply With Quote #30

Quote:
Originally Posted by edon1337 View Post
There's cases when even SsGetOrigin returns true but the location is inproper.
And when we say invalid points, we mean points that players can't access, like a big box, or a build, etc..
That include is good, but I still suggest to create a customized .ini file to spawn things randomly on the map.

And for some reason, when the point is used, the code removes it, so that point will not be used again. After some rounds, it's out of points, so we must reset all points, whichfor some reason causes lag.
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo

Last edited by EFFx; 07-14-2018 at 20:22.
EFFx is offline
Reply


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 04:21.


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