Minimap Script 
40 comments To continue the "cheaty" uploads, I present - the MINIMAP SCRIPT!
This script draws a minimap on a pre-set position (you can set it in the script) that shows everything including players.
It's like the default CS2D minimap, except it shows players, it has more settings, and you can scale it!
The map has three modes:
1. Show to all players on XY on the map;
2. Show to all players on XY on their HUDs;
3. Show to admins on XY on their HUDs.
The map will appear half-transparent.
ATTENTION! If you are the server (running a server through New Game), CS2D can lag when drawing the map - on command and each round start, and when updating player positions - every second - when there are more than 4 players. If you're running it on dedicated, the script may cause little ping spikes, although it wasn't tested.
Chat commands:
!initmap - to initialize the map.
!mapscale <scale> - to scale the map.
By default, there are three scales:
Scale 1 - each tile is 2x2 px
Scale 2 - each tile is 4x4 px
Scale 3 - each tile is 6x6 px
So type "!mapscale 1" without quotes to scale it to 1.
You can add your own scales in the images table. There's a comment telling you how to do that.
Missing file bug fixed.
Report any bugs you find, especially with map's third mode (show on admins' HUD).
PS: there's also a TF2 splash waiting for you in the archive (second screenshot)
This script draws a minimap on a pre-set position (you can set it in the script) that shows everything including players.
It's like the default CS2D minimap, except it shows players, it has more settings, and you can scale it!

1. Show to all players on XY on the map;
2. Show to all players on XY on their HUDs;
3. Show to admins on XY on their HUDs.
The map will appear half-transparent.


!initmap - to initialize the map.
!mapscale <scale> - to scale the map.
By default, there are three scales:
Scale 1 - each tile is 2x2 px
Scale 2 - each tile is 4x4 px
Scale 3 - each tile is 6x6 px
So type "!mapscale 1" without quotes to scale it to 1.

Missing file bug fixed.

PS: there's also a TF2 splash waiting for you in the archive (second screenshot)
edited 3×, last 17.02.11 07:50:25 am

Comments
40 commentsLog in!
You need to log in to be able to write comments!Log in

It's just awesome, but so cheaty that people won't come to my server, so I won't download.
26.05.11 06:55:07 am

ur epic u should go epic urself in a pool of epicness and then just win

So now we can all see where are our enemies on the map
- cool script , maybe more for fun because it would be unfair to see where are your enemies.

the other script isn't mine either
i searched in both files and found the bug in his one
is it such a big problem if someone has found a bug?
if i had programmed this and you told me "hey there's a bug" i would be happy (ok maybe not because i don't like bugs) but i would correct it
and as you can see in my post I would rate 4 because it is indeed an amazing script but with a bug
oh and my solution was editing this script so both can run
i searched in both files and found the bug in his one
is it such a big problem if someone has found a bug?
if i had programmed this and you told me "hey there's a bug" i would be happy (ok maybe not because i don't like bugs) but i would correct it
and as you can see in my post I would rate 4 because it is indeed an amazing script but with a bug
oh and my solution was editing this script so both can run

@Robotic-Brain,
if it crushes your server, guess what is solution to this problem? Then turn off your other scripts or don't use this one! It's an amazing script and he worked on it not for somebody like you to rate it 1/5...
if it crushes your server, guess what is solution to this problem? Then turn off your other scripts or don't use this one! It's an amazing script and he worked on it not for somebody like you to rate it 1/5...
ehh.. I Edited the Post
first I thought: "cool a minimap" so 4 Points but then: "Oh damn it crashes my server" so I updated the rating
and I don't "teach" you, I just say, that you must keep in mind, that your script is propably not the only one running on a server
first I thought: "cool a minimap" so 4 Points but then: "Oh damn it crashes my server" so I updated the rating
and I don't "teach" you, I just say, that you must keep in mind, that your script is propably not the only one running on a server
Oi, I made it in 5 hours, what the hell did you expect? And sir, I code how I want, don't teach ME how to code. And I'm aware that the file is missing, but I don't know why.
And your rating is 1. Is it just me, or 4 =/= 1?
EDIT 1: File is back in place.
Robotic-Brain has written:
5-1 = 4
And your rating is 1. Is it just me, or 4 =/= 1?
EDIT 1: File is back in place.
*sigh*
I figured out how the missing functions have to work and created the file by myself
paste this into a file called basicfuncs.lua and it should work
Btw. its a nice script but there are 2 bugs:
1. the basicfuncs file is missing -> -1
2. you don't see dyn_walls and breakables (like in the normal map)
5-1 = 4
EDIT:
OMG what the hell?
my bots don't work anymore
look at this:
you can't just overwrite DC's functions
that's the reason why you should code like this:
P.S.: I'll rate again if this is fixed
I figured out how the missing functions have to work and created the file by myself
paste this into a file called basicfuncs.lua and it should work
Btw. its a nice script but there are 2 bugs:
1. the basicfuncs file is missing -> -1
2. you don't see dyn_walls and breakables (like in the normal map)
5-1 = 4
EDIT:
OMG what the hell?
my bots don't work anymore

look at this:
you can't just overwrite DC's functions

that's the reason why you should code like this:
Code:
1
2
3
4
5
6
7
8
9
10
11
12
2
3
4
5
6
7
8
9
10
11
12
if myownmod == nil then
mymod={}
function mymod.myfunc1()
-- content goes here
end
mymod.myfunc2 = function ()
-- content goes here
end
else
error("Mod does already exist!")
end
mymod={}
function mymod.myfunc1()
-- content goes here
end
mymod.myfunc2 = function ()
-- content goes here
end
else
error("Mod does already exist!")
end
P.S.: I'll rate again if this is fixed

edited 4×, last 16.02.11 07:39:28 pm