Forum




Weapon spawn laser problem, editor
4 replies



1
2
3
4
2
3
4
addhook("spawn", "laser_spawner") function laser_spawner(id) 	parse("equip "..id.." 45") end
1. you want to have the script for the whole server, then you need to put it in a file ( ANYNAME.lua ), save it in the /sys/lua/ folder and add
dofile("sys/lua/ANYNAME.lua") to the bottom of server.lua.
2. you want the script only to work on this map.
Create a file called YOURMAPNAME.lua in /maps/ and put the script i gave you in there. if you now start the map the script works too.
attention, if you want to spread the map, you need to give the people the scriptfile too!
1
2
3
4
2
3
4
addhook("buy","sample.weapon.buy") function sample.weapon.buy() 	return 1 end



