Forum

> > CS2D > Scripts > How to create ATM?
Forums overviewCS2D overview Scripts overviewLog in to reply

English How to create ATM?

8 replies
To the start Previous 1 Next To the start

old Re: How to create ATM?

THEMUD
User Off Offline

Quote
I have just given you an example of how it should be have done.
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
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

old Re: How to create ATM?

GeoB99
Moderator Off Offline

Quote
@user 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).

old ATM or BANK

Amanda and Friends
User Off Offline

Quote
What do you mean Same with ATM at rp amstria? If the same script I will give this scripts to you, but with One condition
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview