pleas how to make the lua in my map ?
Forum
Maps/Editor
how to make the lua in my map ??
how to make the lua in my map ??
7 replies
1

pleas how to make the lua in my map ?
First it might be useful to read a TUTORIAL.
create in the maps folder an file
name=mapname.lua
You create a Lua file with the name (In the maps folder):
<MAPNAME>.lua
Is it so hard?
for example
1
2
3
4
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
But not to much!
1
2
3
4
5
6
7
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
1

Offline