English [xNir] ATM icon

22 comments
12.07.16 03:26:47 pm
like 8 like it!
117 kb, 37 Downloads
xNir
User
Offline Off
> Description <
This mod allows you to place ATM machines on maps.

spam Versions
v1.0.0 - 07.12.2016 >


illegal Rules
√ You can use/edit this script on your server.
× You are not allowed to copy some parts of this script without permission.
× You are not allowed to say this script as yours.

off-topic Installation
1. Download the archive
2. Extract the content of the archive into your cs2d root folder.
3. Edit the config file.

spam Configuration
You can edit the following settings in the config file <sys/lua/atm/cfg/config.lua>

Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
-- Enable/Disable debug mode
ATM.DEBUG = false

-- Model Infos
ATM.MODEL = "gfx/xNir/atm/model/atm.png"

-- Maximum Distance (in tiles) for using an ATM
ATM.MAX_USE_DIST = 2

-- AFK Delay in seconds
ATM.AFK_DELAY = 10

-- Add your positions here 
-- ["map"] = { { x, y, rot (optionnal) }, ... }
-- Example:
--[[ ATM.Locations = {
     [ "de_dust" ] = {
          { 671, 2292 },
          { 732, 2292 },
          { 793, 2292 },
     },
     
     [ "de_dust2" ] = {
          { 732, 2292 },
          { 732, 2400 },
     },
}
--]]
ATM.Locations = {
}


flame How to add ATMs on my server ?

Let's say I want to add tow ATMs on cs_office at the position 500, 500 (random one) and at the position 1000, 1000 with 90° rotation. Add the following lines in the cfg file inside the ATM.Locations array !

Code:
1
2
3
4
5
6
ATM.Locations = {
     ["cs_office"] = {
          {500,500},
          {1000,1000,90},
     }
}


INFO ATMs spawn on each restart !
If you don't see ATMs restart the round first !
imageimageimageimageimage
edited 4×, last 12.07.16 03:42:42 pm
ok This file has been reviewed and approved by Sparty (18.07.16 03:22:41 am)

Comments

22 comments
Goto Page
To the start Previous 1 2 Next To the start

Log in!

You need to log in to be able to write comments!Log in
28.09.16 07:21:17 pm
like I like it!
Up
kerker
User
Offline Off
Cool.
Reminiscent of the script on ….C-4.…
17.07.16 02:25:57 pm
like I like it!
Up
Xirot
User
Offline Off
I really like the idea it's completly new and just cool.
15.07.16 03:21:57 pm
like I like it!
Up
CyanBros
User
Offline Off
Never seen this on servers,like it!
15.07.16 01:33:54 am
like I like it!
Up
P_206
BANNED
Offline Off
Cool script , you can make a better work in the future !
14.07.16 02:04:52 pm
like I like it!
Up
2LiveLegend1
User
Offline Off
cool shit nigga
13.07.16 08:27:45 pm
like I like it!
Up
Rel4tive
User
Offline Off
Nice script!
12.07.16 08:04:24 pm
Up
Yates
Reviewer
Offline Off
Make sure you do! I am very interested to see what is causing this.

By the way I guess we should kind of stop here before we all get temporary bans for off-topic
12.07.16 08:03:05 pm
like I like it!
Up
Goo
User
Offline Off
That is very weird since I remember getting an error that is related to the } expected where the , was...
Never mind then if I'll ever get it again I might post it somewhere.
12.07.16 08:02:30 pm
Up
Yates
Reviewer
Offline Off
@user Goo: I have not been able to reproduce any error. Even the table you provided gave me no error ending the last item with a comma. The only thing I can currently think of is file encoding, but that's a long shot.
12.07.16 07:52:48 pm
Up
TrialAndError
User
Offline Off
@user Goo: I have tested that and it works perfectly, I have been using tables for a very long time now, I haven't gotten a single error that has been affecting commas.

What error do you get by putting an extra comma there?
12.07.16 07:47:08 pm
like I like it!
Up
Goo
User
Offline Off
Example:

Code:
1
2
3
4
5
Table = {
[1] = 'FIRST',
[2] = 'SECOND',
[3] = 'THIRD' -- Adding a ',' here will result in an error
}
12.07.16 07:40:11 pm
Up
TrialAndError
User
Offline Off
@user Goo: It shouldn't give any errors. Pretty much the ways it can give errors by "," are by these ways, maybe there are more ways that I've missed.
Code:
1
2
3
4
5
Test = {1,2},

Test = {1,2,,}

Test = {,}
12.07.16 07:10:19 pm
Up
Yates
Reviewer
Offline Off
@user Goo: That's weird. It shouldn't throw an error at all.

I'll check to see what is happening then edit my post.
12.07.16 07:07:33 pm
like I like it!
Up
Goo
User
Offline Off
Weird for me it makes errors, maybe because its on the actual table but not on the table inside the table?
12.07.16 06:41:20 pm
Up
Yates
Reviewer
Offline Off
@user Goo: Lua is not as strict as for example JSON or JavaScript (even thought JavaScript is lazy when it comes to checking if objects exist). The table with a comma behind the last entry is valid - it makes no difference. It's the same as doing this:

Code:
1
2
3
function foo(bar)
  return bar;
end


The semicolon
;
has no use. Lua will intepretate it the same and it will work either way.
12.07.16 06:24:18 pm
like I like it!
Up
Goo
User
Offline Off
Actually if you guys know some Lua you can just make a menu on startup that will ask if you want to save via IP or USGN or even a password (!login <password>)
It's pretty easy...

@user xNir: has written:
Code:
1
2
3
4
5
6
ATM.Locations = {
     ["cs_office"] = {
          {500,500},
          {1000,1000,90},
     }
}


Pretty sure it's meant to be like that:
Code:
1
2
3
4
5
6
ATM.Locations = {
     ["cs_office"] = {
          {500,500},
          {1000,1000,90}
     }
}
12.07.16 06:21:12 pm
Up
Waldin
User
Offline Off
illegal Rules has written:
√ You can use/edit this script on your server.

Why you dont edit it? it is allowed in rules.
Set
player( id, "ip" )
to
player( id, "usgn" )
and other things.
12.07.16 06:11:09 pm
Up
Mora_rus
User
Offline Off
After some time you would be surprised why do you have 0$ in your account and all the time you spent is going down.
Atleast you have to change it: if player has no usgn - use ip..
12.07.16 05:20:48 pm
Up
xNir
User
Offline Off
@_T

Actually, I've noticed that servers with sv_usgnonly on have less people than servers without it that's why I choosed this option.
12.07.16 05:14:38 pm
Up
THEMUD
User
Offline Off
Why are you saving the account data in a file based on the player's IP? It could be volatile, because anybody can change their IPs fast. So make it rely on the USGN better.
To the start Previous 1 2 Next To the start