Forum

> > CS2D > Scripts > how to make a shop script?
Forums overviewCS2D overview Scripts overviewLog in to reply

English how to make a shop script?

4 replies
To the start Previous 1 Next To the start

old how to make a shop script?

Dovahkin
User Off Offline

Quote
Hey guys how to make a shop lua with....

>function
>addhook
>and everything

∗please explain
∗please DC help me
∗Pm me

Thanks....

Admin/mod comment

how to make WHAT? title fixed

old Re: how to make a shop script?

Precel97
User Off Offline

Quote
Maybe this script is learn you something.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
addhook("serveraction","yay")
function yay(id,act)
if act==1 then
menu(id,"Name of menu,Shop|You can put here informations about shop")
end
end
addhook("menu","menucheck")
function menucheck (id,m,b)
if m=="Name of menu" then
if b==1 then
menu(id,"Name of shop,Name Of item|informations")
end
if m=="Name of shop"
if b==1 and mon>item cost then
--put here something
--maybe parse health
parse("sethealth "..id.." "..player(id,"health")+Put number of health for example +10 )
parse("setmoney "..id.." "..player(id,"money")-cost of item don't delete -)
elseif mon<item cost
msg("©000255255put here message maybe you don't have money to buy this")
end
end
end

Here your script
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview