English Make lua in map?

12 replies
Goto Page
To the start Previous 1 Next To the start
17.09.11 12:10:43 pm
Up
Crazy_Biawak
User
Offline Off
Hi there!
I know make lua in map like this
Example:
Code:
1
2
3
4
5
6
7
addhook('spawn', 'inspawn')
function inspawn(id)
     parse('setmaxhealth '.. id ..' 1')
     parse("equip "..id.." 35")
     parse("setarmor "..id.." 100")
     parse("setweapon "..id.." 35")
end

But i want more to know?
edited 3×, last 17.09.11 01:31:41 pm
http://forum.gemscool.com/thread-384513.html (Sorry,Indonesian people can join this website).
17.09.11 01:09:23 pm
Up
sixpack
User
Offline Off
What do you mean?
17.09.11 01:21:30 pm
Up
Crazy_Biawak
User
Offline Off
@DaKn0b: I mean how to make lua with map. I know but i want more to know?
http://forum.gemscool.com/thread-384513.html (Sorry,Indonesian people can join this website).
17.09.11 01:42:18 pm
Up
Anti-Grav
User
Offline Off
You need to learn Lua. The Best source. Try the basics first.
IMG:http://666kb.com/i/c03qqjjxt4q0cfz1s.png
IMG:http://666kb.com/i/c03qqutalg1c1a2b4.png
IMG:http://666kb.com/i/c03qr0a2394hx8zlc.png
17.09.11 01:47:59 pm
Up
Tajifun
User
Offline Off
Do you mean a lua script, which will be executed automatically, if you play a certain map?
Tajifun yay.
17.09.11 01:51:10 pm
Up
Crazy_Biawak
User
Offline Off
@Anti-Grav:Yeah, I know but i want make lua script like multigame

@Tajifun:Yes!
http://forum.gemscool.com/thread-384513.html (Sorry,Indonesian people can join this website).
17.09.11 02:02:52 pm
Up
Tajifun
User
Offline Off
Giving the script the same name as the map may help.
Tajifun yay.
17.09.11 02:03:26 pm
Up
Yates
Reviewer
Offline Off
Then if you were to start a server. The lua would be sent with the map. Which isn't handy, is it?
17.09.11 02:09:03 pm
Up
Crazy_Biawak
User
Offline Off
@Yates:Yes!
http://forum.gemscool.com/thread-384513.html (Sorry,Indonesian people can join this website).
17.09.11 06:46:32 pm
Up
VegBerg
User
Offline Off
user Anti-Grav has written:
You need to learn Lua. The Best source. Try the basics first.

English grammar too, I didn't understand it...
17.09.11 06:54:45 pm
Up
Apache uwu
User
Offline Off
@Yates, that would be useful if you wanted your map to work for anyone who runs it on their own.
03.10.11 10:16:09 pm
Up
danh
User
Offline Off
if u hav a map named testThingy.map, u need a lua called testThingy.lua. Basically, u need to name the lua the same as the map (and .lua at the end), and put it in /maps
03.10.11 10:24:40 pm
Up
Yates
Reviewer
Offline Off
user danh has written:
[...] and put it in /maps

You don't need to put the Lua in the map folder. As long as it has the same name as the map it will be transfered with the map.
To the start Previous 1 Next To the start