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

Online Map


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Plugin Info:     Modification:   ALL        Category:   General Purpose       
silkker
Member
Join Date: May 2009
Location: Germany
Old 03-05-2013 , 11:14   Online Map
Reply With Quote #1

Online Map Fix: v2.5

An online map so you can watch what's happening on your server without joining the game. I made it for my own purposes and wanted to share with you guys. It's my first plugin so don't be to hard with your judgement. Most of the credit for helping me with the code goes to Arkshine

Pictures
Spoiler


Online preview: (Note: The server could use a testversion that is not released yet)
currently offline: http://onlinemap.waweasy.com/

How it works:
It acts like a webserver that creates JSON data that can be fetched with a little jQuery - even if it's not on the same domain. You just have to set up the server ip in the index.php and you're good to go. It works on port 1107 (TCP) but you can change that if you want.

I tested it on a server with some bots and it always worked fine. If you have any suggestions on making it even better go ahead.



How to use Online Map:


1. Requirements

- a running hlds server with counter strike 1.6 mod ;)
- port TCP 1107 has to be opened on the server!
- sockets2 (by Bugsy https://forums.alliedmods.net/showthread.php?p=1573388)

2. Prepare your webspace


You now have to download and unzip the onlinemap.zip. Open the index.html and edit the line

PHP Code:
window.server '127.0.0.1'
to fit your needs. For example your server has the IP 85.114.13.88 then the line should look like

PHP Code:
window.server '85.114.13.88'
Save it. Now you can upload the whole unzipped folder to your webspace put it whereever you want it.

You can leave the port as it is. But if you want you can use the CVar "sv_onlinemap" to change the port how you want it.

3. Adding custom overviews (not necessary)


Open the overview file you want to add with some kind of image editing program (e.g. Photoshop, Paint.net). You can swap the green background with the color (Hex #404040) if you want. Then save it as jpeg into the onlinemap/overviews folder. Next step is to add the overviews txt-file (<mapname>.txt) to the onlinemap/overviews folder and thats pretty much it. The overview file should now be recognized and working with Online Map.



Update 2.2

Fixed some bugs.
Updated the onlinescripts - now working without PHP ;)

Update 2.3

Rewrote the code. Should be more efficient now.

Update 2.4

Fixed a problem where strings > ~ 2000 could not be sent.
Press space and see the stats.

Update 2.5

Fixed a bug where the bomb didn't disappear when planted after round end.


Attached Thumbnails
Click image for larger version

Name:	overview_one.jpg
Views:	4867
Size:	64.5 KB
ID:	117116   Click image for larger version

Name:	overview_two.jpg
Views:	4763
Size:	87.7 KB
ID:	117117  
Attached Files
File Type: zip onlinemap.zip (2.28 MB, 748 views)
File Type: sma Get Plugin or Get Source (onlinemap.sma - 1841 views - 4.0 KB)
__________________
404 - Signature not found.

Last edited by YamiKaitou; 06-08-2013 at 20:15. Reason: Updating URL for sockets2 module
silkker is offline
Send a message via ICQ to silkker
 



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 16:48.


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