Forum

> > CS2D > Scripts > How to create ATM?
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch How to create ATM?

8 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Re: How to create ATM?

THEMUD
User Off Offline

Zitieren
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

alt Re: How to create ATM?

GeoB99
Moderator Off Offline

Zitieren
@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).

alt ATM or BANK

Amanda and Friends
User Off Offline

Zitieren
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
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht