initial
This commit is contained in:
commit
0d14a5e929
32
init.lua
Normal file
32
init.lua
Normal file
@ -0,0 +1,32 @@
|
||||
minetest.register_privilege("teamskin", {
|
||||
description = "Player can set the team-skin.",
|
||||
give_to_singleplayer= false,
|
||||
})
|
||||
|
||||
minetest.register_chatcommand("setskin", {
|
||||
params = "<player> <team>",
|
||||
description = "set the skin of the player given",
|
||||
privs = { teamskin=true },
|
||||
func = function(name, param)
|
||||
local first_param_end, second_param_start = param:find(" +")
|
||||
if second_param_start == nil then
|
||||
minetest.chat_send_player(name, "invalid Usage of /setskin!")
|
||||
return
|
||||
end
|
||||
second_param_start = second_param_start+1
|
||||
playername = param:sub(0, first_param_end-1)
|
||||
team = param:sub(second_param_start, #param)
|
||||
minetest.chat_send_player(name, "set the team_"..team..
|
||||
" skin for player "..playername)
|
||||
local player = minetest.get_player_by_name(playername)
|
||||
if player == nil then
|
||||
minetest.chat_send_player(name, "don't know player "..playername)
|
||||
return
|
||||
end
|
||||
|
||||
player:set_properties({
|
||||
textures = {"team_"..team..".png"},
|
||||
})
|
||||
|
||||
end,
|
||||
})
|
BIN
textures/team_1.png
Normal file
BIN
textures/team_1.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.0 KiB |
BIN
textures/team_2.png
Normal file
BIN
textures/team_2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.2 KiB |
BIN
textures/team_3.png
Normal file
BIN
textures/team_3.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.3 KiB |
BIN
textures/team_4.png
Normal file
BIN
textures/team_4.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.3 KiB |
BIN
textures/team_admin.png
Normal file
BIN
textures/team_admin.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.6 KiB |
Loading…
x
Reference in New Issue
Block a user