Forum

> > CS2D > Scripts > About Trigger
Forums overviewCS2D overview Scripts overviewLog in to reply

English About Trigger

5 replies
To the start Previous 1 Next To the start

old About Trigger

X-Files
User Off Offline

Quote
hi i m maked rp lua for own server.but I could not pass here.
my English is bad, so I'll give an example.

player = x-files
x-files have 10000$
x-files want to buy house
but
house is 15000$

so x-files press house's trigger but it doesnt work,because x-files not have 15000$ money

I hope you understand
plss help me

old help

X-Files
User Off Offline

Quote
yess √

Does anyone know this???
helpp
edited 2×, last 08.01.11 02:39:05 pm

old Re: About Trigger

EngiN33R
Moderator Off Offline

Quote
1
2
3
4
5
6
addhook("use","buyhouse")
function buyhouse(id)
	if (player(id,"tilex")==BUYTILEX and player(id,"tiley")==BUYTILEY and MONEYVAR>=15000) then
		-- WHATEVER YOU PUT HERE
	end
end

Where BUYTILEX and BUYTILEY - position of the trigger, MONEYVAR is your server's money variable, WHATEVER YOU PUT HERE - you write the house owning part there.

old Re: About Trigger

X-Files
User Off Offline

Quote
thx engineer I solved this problem

again if another problem occurs, you can ask?
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview