Forum

> > CS2D > Scripts > How To Buy Class?
Forums overviewCS2D overview Scripts overviewLog in to reply

English How To Buy Class?

1 reply
To the start Previous 1 Next To the start

old How To Buy Class?

Qater
User Off Offline

Quote
I working on lua script (original classes.lua script).
Part of the script:
1
2
3
4
sample.classes.class=initArray(32)
function sample.classes.classmenu(id)
	menu(id,"Something,Somebody1,Somebody2,Somebody3,Somebody4,(Somebody5)")	
end
(Somebody5) - I want him for money, but how I can do it?
Thanks for advices.

old Re: How To Buy Class?

Rainoth
Moderator Off Offline

Quote
1
2
3
4
5
6
7
8
9
10
addhook("menu","a")
function a(id,t,b)
	if t == "Something" then
		if b == 5 then
			if player(id,"money") >=4999 then
				parse("setmoney "..id.." "..player(id,"money")-5000)
			end
		end
	end
end
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview