Forum
Scripts
How to create ATM?
How to create ATM?
8 replies
1

CaT1322: You are soooo stupid.... Admin/mod comment
§3.1 - No posts which offend/provoke/insult (flame) All you have to do is, to give a value for both of the ATM.x and the ATM.y with your ATM's position, and continue that empty section with your own script.
1
2
3
4
5
6
7
8
9
10
11
12
2
3
4
5
6
7
8
9
10
11
12
ATM = {};
ATM.x = --ATM X coordination
ATM.y = --ATM Y coordination
addhook("use", "_use")
function _use(id, event, data, x, y)
	if event == 100 then
		if x == ATM.x and y == ATM.y then
			--Do your script here
		end
	end
end
THEMUD: What to write in ATM = {}?
Kolia_rus: You actually don't have to write anything inside the brackets of ATM table. This should be left alone as a table itself as we'll use it to index two variables x and y coordinations, therefor ATM.x and ATM.y is what you have to specify the coordination. The 9 line must be replaced with a snippet of code which it's the core functionality of what a ATM should do (or at least what you want a ATM should do for you).
1

Offline