English How To Buy Class?

1 reply
Goto Page
To the start Previous 1 Next To the start
27.09.14 04:06:59 pm
Up
Qater
User
Offline Off
I working on lua script (original classes.lua script).
Part of the script:
Code:
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.
Actions speak louder than words.
27.09.14 04:55:39 pm
Up
Rainoth
Moderator
Offline Off
Code:
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