Forum

> > CS2D > General > Lua Script Help?
Forums overviewCS2D overviewGeneral overviewLog in to reply

English Lua Script Help?

1 reply
To the start Previous 1 Next To the start

old closed Lua Script Help?

KaBooMa
User Off Offline

Quote
Alright...So im working on this rp ( if you haven't seen my other thread ) and i have a building or store thats player owned. when you type !m it sets var. S1ID to the players name. how do i make it so when the player dies and/or leaves S1ID changes to "". because when the house is unowned S1ID = "" if its...nvm heres the code i cant explain good

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
31
32
33
34
35
S1ID=""


addhook("say","say_drop")
function say_drop(id,txt)
addhook ("leave","left")
function left(S1ID)
S1ID=""
end
if (txt=="!m") or (txt=="!M") then
--menu (id,"Shops For Sale, Kills 'R' Us")
	if S1ID=="" then
		if (player(id,"money")>9999) then
			parse ("setpos "..id.." ".."384".." "..1120)
			parse("setmoney "..id.." "..player(id,"money")-10000)
			S1ID=playername
			
		end
	end
end

	if (txt=="!b2") or (txt=="!B2") then
		if (player(id,"money")>14999) then
			parse ("setpos "..id.." ".."768".." "..1056)
		parse("setmoney "..id.." "..player(id,"money")-15000)
		end
	end

	if (txt=="!b3") or (txt=="!B3") then
		if (player(id,"money")>14999) then
			parse ("setpos "..id.." ".."1248".." "..1088)
		parse("setmoney "..id.." "..player(id,"money")-15000)
		end
	end
end
To the start Previous 1 Next To the start
Log in to replyGeneral overviewCS2D overviewForums overview