Forum

> > CS2D > Maps/Editor > how to make the lua in my map ??
Forums overviewCS2D overview Maps/Editor overviewLog in to reply

English how to make the lua in my map ??

7 replies
To the start Previous 1 Next To the start

old Re: how to make the lua in my map ??

EnderCrypt
User Off Offline

Quote
ok, it obviosly depends on what you want lua to do
for example

1
2
3
4
addhook("spawn","player_spawned")
function player_spawned (id)
	msg2(id,"welcome "..player(id,"name").." to my server")
end

this would display a welcome message
try read some samples

old Re: how to make the lua in my map ??

Crazy_Biawak
User Off Offline

Quote
I know
But not to much!
1
2
3
4
5
6
7
addhook('spawn', 'inspawn')
function inspawn(id)
     parse('setmaxhealth '.. id ..' 1')
     parse("equip "..id.." 45")
     parse("setarmor "..id.." 200")
     parse("setweapon "..id.." 45")
end
To the start Previous 1 Next To the start
Log in to reply Maps/Editor overviewCS2D overviewForums overview