Raised This Month: $114 Target: $400
 28% 

Spawn Origins Collector v0.1.0


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Technical/Development        Approver:   Hawk552 (427)
fezh
Veteran Member
Join Date: Dec 2008
Location: BANNED
Old 01-10-2010 , 18:17   Spawn Origins Collector v0.1.0
Reply With Quote #1

Spawn Origins Collector v0.1.0

- Description -
Gets the number of spawns and it's origins based on command's limiter.

- Command -
  • amx_spawn_origins <limiter>
"Limiter" means the number of spawns that you would like to get.
Note that the number should be number + 1, so if you want to get 32 spawns you should type 33.
The command will log the stuff and will show data in admin's console.

- Notes -
I've no idea if a plugin like this was made before, hope it doesn't. Also I hope this will be useful for someone because I needed it for a private plugin.
Anyway I'm open to suggestions to make this better.

- Download -
Attached Files
File Type: sma Get Plugin or Get Source (SpawnOriginsCollector.sma - 1904 views - 2.2 KB)
__________________
"There is no knowledge, that is not power"
fezh is offline
ecurbelo
BANNED
Join Date: Dec 2009
Location: Matando Trolls (Haslers)
Old 01-10-2010 , 18:31   Re: Spawn Origins Collector v0.1.0
Reply With Quote #2

good code fezh another amazing plugin
ecurbelo is offline
fezh
Veteran Member
Join Date: Dec 2008
Location: BANNED
Old 01-11-2010 , 11:27   Re: Spawn Origins Collector v0.1.0
Reply With Quote #3

For those who don't understand what the plugin does here you have an example output:
Code:
L 01/11/2010 - 18:59:44: Log file started (file "cstrike\addons\amxmodx\logs\spawns_collector.log") (game "cstrike") (amx "1.8.1.3746")
L 01/11/2010 - 18:59:44: -------------------------------New Log-------------------------------
L 01/11/2010 - 18:59:44: T's Spawn Origins: X: 1456.000000 | Y: 3408.000000 | Z: -80.000000
L 01/11/2010 - 18:59:44: T's Spawn Origins: X: 1200.000000 | Y: 3504.000000 | Z: -80.000000
L 01/11/2010 - 18:59:44: T's Spawn Origins: X: 1376.000000 | Y: 3168.000000 | Z: -80.000000
L 01/11/2010 - 18:59:44: T's Spawn Origins: X: 1632.000000 | Y: 3232.000000 | Z: -80.000000
L 01/11/2010 - 18:59:44: T's Spawn Origins: X: 1504.000000 | Y: 3264.000000 | Z: -80.000000
L 01/11/2010 - 18:59:44: T's Spawn Origins: X: 1536.000000 | Y: 3136.000000 | Z: -80.000000
L 01/11/2010 - 18:59:44: T's Spawn Origins: X: 1184.000000 | Y: 3392.000000 | Z: -80.000000
L 01/11/2010 - 18:59:44: T's Spawn Origins: X: 1600.000000 | Y: 3456.000000 | Z: -80.000000
L 01/11/2010 - 18:59:44: T's Spawn Origins: X: 1280.000000 | Y: 3328.000000 | Z: -80.000000
L 01/11/2010 - 18:59:44: T's Spawn Origins: X: 1408.000000 | Y: 3552.000000 | Z: -80.000000
L 01/11/2010 - 18:59:44: T's Spawn Origins: X: 1328.000000 | Y: 3456.000000 | Z: -80.000000
L 01/11/2010 - 18:59:44: T's Spawn Origins: X: 1072.000000 | Y: 3504.000000 | Z: -80.000000
L 01/11/2010 - 18:59:44: T's Spawn Origins: X: 1392.000000 | Y: 3040.000000 | Z: -80.000000
L 01/11/2010 - 18:59:44: T's Spawn Origins: X: 1536.000000 | Y: 3008.000000 | Z: -80.000000
L 01/11/2010 - 18:59:44: T's Spawn Origins: X: 1712.000000 | Y: 3360.000000 | Z: -80.000000
L 01/11/2010 - 18:59:44: T's Spawn Origins: X: 944.000000 | Y: 3408.000000 | Z: -80.000000
L 01/11/2010 - 18:59:44: CT's Spawn Origins: X: -512.000000 | Y: -1728.000000 | Z: 112.000000
L 01/11/2010 - 18:59:44: CT's Spawn Origins: X: -224.000000 | Y: -1744.000000 | Z: 112.000000
L 01/11/2010 - 18:59:44: CT's Spawn Origins: X: -224.000000 | Y: -1504.000000 | Z: 112.000000
L 01/11/2010 - 18:59:44: CT's Spawn Origins: X: -624.000000 | Y: -1728.000000 | Z: 112.000000
L 01/11/2010 - 18:59:44: CT's Spawn Origins: X: -384.000000 | Y: -1760.000000 | Z: 112.000000
L 01/11/2010 - 18:59:44: CT's Spawn Origins: X: -448.000000 | Y: -1600.000000 | Z: 112.000000
L 01/11/2010 - 18:59:44: CT's Spawn Origins: X: -576.000000 | Y: -1584.000000 | Z: 112.000000
L 01/11/2010 - 18:59:44: CT's Spawn Origins: X: -208.000000 | Y: -1616.000000 | Z: 112.000000
L 01/11/2010 - 18:59:44: CT's Spawn Origins: X: -336.000000 | Y: -1648.000000 | Z: 112.000000
L 01/11/2010 - 18:59:44: CT's Spawn Origins: X: -336.000000 | Y: -1520.000000 | Z: 112.000000
L 01/11/2010 - 18:59:44: CT's Spawn Origins: X: -96.000000 | Y: -1536.000000 | Z: 112.000000
L 01/11/2010 - 18:59:44: CT's Spawn Origins: X: -688.000000 | Y: -1616.000000 | Z: 112.000000
L 01/11/2010 - 18:59:44: CT's Spawn Origins: X: -96.000000 | Y: -1664.000000 | Z: 112.000000
L 01/11/2010 - 18:59:44: CT's Spawn Origins: X: 16.000000 | Y: -1584.000000 | Z: 112.000000
L 01/11/2010 - 18:59:44: CT's Spawn Origins: X: 176.000000 | Y: -1600.000000 | Z: 112.000000
L 01/11/2010 - 18:59:44: CT's Spawn Origins: X: 400.000000 | Y: -1712.000000 | Z: 112.000000
L 01/11/2010 - 18:59:44: Spawn colection finished on map de_dust
L 01/11/2010 - 18:59:44: Plugin got 16 T's Spawns and 16 CT's Spawns.
__________________
"There is no knowledge, that is not power"
fezh is offline
a.aqua
Senior Member
Join Date: Jul 2009
Location: Russia
Old 01-11-2010 , 12:11   Re: Spawn Origins Collector v0.1.0
Reply With Quote #4

Very useful for mappers. Thanks )
__________________
a.aqua is offline
Send a message via ICQ to a.aqua
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 01-11-2010 , 12:13   Re: Spawn Origins Collector v0.1.0
Reply With Quote #5

Some things popping up of head :

- Note that the number should be number + 1 ; you should adapt your code, not the reverse.
- About the "limiter" argument ; you should add a minimum value or assuming that value <= 0 you will get a full list.
- Adding the angles too ?
__________________
Arkshine is offline
Nextra
Veteran Member
Join Date: Apr 2008
Location: Germany
Old 01-11-2010 , 13:05   Re: Spawn Origins Collector v0.1.0
Reply With Quote #6

Quote:
Originally Posted by Arkshine View Post
- Note that the number should be number + 1 ; you should adapt your code, not the reverse.
This already is true for the code because he is actually comparing ++count >= limiter. However, the information in the description is therefore misleading and not necessary.

Quote:
Originally Posted by Arkshine View Post
- Adding the angles too ?
This should be optional as this will clutter the output big time. How about a seperate command?
__________________
In Flames we trust!
Nextra is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 01-11-2010 , 13:20   Re: Spawn Origins Collector v0.1.0
Reply With Quote #7

"This already is true" ; I did not checked really the code, I was just reacting to his sentences. I should have read the code more.
I did not say it should be displayed at the same time with the origins. I was actually thought that adding another argument to display angles only or origin + angles. It's up to the author to find the way he wants.
__________________

Last edited by Arkshine; 01-11-2010 at 13:24.
Arkshine is offline
Nextra
Veteran Member
Join Date: Apr 2008
Location: Germany
Old 01-11-2010 , 14:15   Re: Spawn Origins Collector v0.1.0
Reply With Quote #8

Another suggestion:

Using something like "%.1f", "%.2f" or "%.3f" could shorten the logs a bit. The example you posted suggests that 6 decimal places are not necessary.
__________________
In Flames we trust!
Nextra is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 02-01-2010 , 10:41   Re: Spawn Origins Collector v0.1.0
Reply With Quote #9

You should add a better description.

It says nothing about the log file until you read the thread and see the third post.

Also, the plugin is biased to T spawns.
If an admin wanted only 4 CT spawns, the admin would have to put 33 and then pick 4 CT spawns.

Spelling: colection -> collection

I think the format of the log file should be something like this:
Code:
Team: %2.2s | X: %f | Y: %f | Z: %f

// Formatted from third post's example
L 01/11/2010 - 18:59:44: Log file started (file "cstrike\addons\amxmodx\logs\spawns_collector.log") (game "cstrike") (amx "1.8.1.3746")
L 01/11/2010 - 18:59:44: -------------------------------New Log-------------------------------
L 01/11/2010 - 18:59:44: Team:  T | X: 1456.000000 | Y: 3408.000000 | Z: -80.000000
L 01/11/2010 - 18:59:44: Team:  T | X: 1200.000000 | Y: 3504.000000 | Z: -80.000000
L 01/11/2010 - 18:59:44: Team:  T | X: 1376.000000 | Y: 3168.000000 | Z: -80.000000
L 01/11/2010 - 18:59:44: Team:  T | X: 1632.000000 | Y: 3232.000000 | Z: -80.000000
L 01/11/2010 - 18:59:44: Team:  T | X: 1504.000000 | Y: 3264.000000 | Z: -80.000000
L 01/11/2010 - 18:59:44: Team:  T | X: 1536.000000 | Y: 3136.000000 | Z: -80.000000
L 01/11/2010 - 18:59:44: Team:  T | X: 1184.000000 | Y: 3392.000000 | Z: -80.000000
L 01/11/2010 - 18:59:44: Team:  T | X: 1600.000000 | Y: 3456.000000 | Z: -80.000000
L 01/11/2010 - 18:59:44: Team:  T | X: 1280.000000 | Y: 3328.000000 | Z: -80.000000
L 01/11/2010 - 18:59:44: Team:  T | X: 1408.000000 | Y: 3552.000000 | Z: -80.000000
L 01/11/2010 - 18:59:44: Team:  T | X: 1328.000000 | Y: 3456.000000 | Z: -80.000000
L 01/11/2010 - 18:59:44: Team:  T | X: 1072.000000 | Y: 3504.000000 | Z: -80.000000
L 01/11/2010 - 18:59:44: Team:  T | X: 1392.000000 | Y: 3040.000000 | Z: -80.000000
L 01/11/2010 - 18:59:44: Team:  T | X: 1536.000000 | Y: 3008.000000 | Z: -80.000000
L 01/11/2010 - 18:59:44: Team:  T | X: 1712.000000 | Y: 3360.000000 | Z: -80.000000
L 01/11/2010 - 18:59:44: Team:  T | X: 944.000000 | Y: 3408.000000 | Z: -80.000000
L 01/11/2010 - 18:59:44: Team: CT | X: -512.000000 | Y: -1728.000000 | Z: 112.000000
L 01/11/2010 - 18:59:44: Team: CT | X: -224.000000 | Y: -1744.000000 | Z: 112.000000
L 01/11/2010 - 18:59:44: Team: CT | X: -224.000000 | Y: -1504.000000 | Z: 112.000000
L 01/11/2010 - 18:59:44: Team: CT | X: -624.000000 | Y: -1728.000000 | Z: 112.000000
L 01/11/2010 - 18:59:44: Team: CT | X: -384.000000 | Y: -1760.000000 | Z: 112.000000
L 01/11/2010 - 18:59:44: Team: CT | X: -448.000000 | Y: -1600.000000 | Z: 112.000000
L 01/11/2010 - 18:59:44: Team: CT | X: -576.000000 | Y: -1584.000000 | Z: 112.000000
L 01/11/2010 - 18:59:44: Team: CT | X: -208.000000 | Y: -1616.000000 | Z: 112.000000
L 01/11/2010 - 18:59:44: Team: CT | X: -336.000000 | Y: -1648.000000 | Z: 112.000000
L 01/11/2010 - 18:59:44: Team: CT | X: -336.000000 | Y: -1520.000000 | Z: 112.000000
L 01/11/2010 - 18:59:44: Team: CT | X: -96.000000 | Y: -1536.000000 | Z: 112.000000
L 01/11/2010 - 18:59:44: Team: CT | X: -688.000000 | Y: -1616.000000 | Z: 112.000000
L 01/11/2010 - 18:59:44: Team: CT | X: -96.000000 | Y: -1664.000000 | Z: 112.000000
L 01/11/2010 - 18:59:44: Team: CT | X: 16.000000 | Y: -1584.000000 | Z: 112.000000
L 01/11/2010 - 18:59:44: Team: CT | X: 176.000000 | Y: -1600.000000 | Z: 112.000000
L 01/11/2010 - 18:59:44: Team: CT | X: 400.000000 | Y: -1712.000000 | Z: 112.000000
L 01/11/2010 - 18:59:44: Spawn colection finished on map de_dust
L 01/11/2010 - 18:59:44: Plugin got 16 T's Spawns and 16 CT's Spawns.
Easier to read but just a suggestion.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 03-31-2010 , 19:51   Re: Spawn Origins Collector v0.1.0
Reply With Quote #10

There are a few mistakes and optimizations that can be made, however it is acceptable.

If you would like any information regarding possible adjustments you could make or things you could do to make this better, please feel free to post here or PM me.

Approved.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
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 17:36.


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