Post your little CSMs!

User avatar
Lone_Wolf
Member
 
Posts: 2193
Joined: Sun Apr 09, 2017 05:50
Location: Hopefully very far from yours, snoop :P
GitHub: LoneWolfHT
IRC: Lone_Wolf
In-game: Lone_Wolf

Post your little CSMs!

by Lone_Wolf » Fri Jan 12, 2018 01:25

This is the place where you can post CSMs that you feel aren't worthy of a topic
Last edited by Lone_Wolf on Fri Jan 12, 2018 01:26, edited 1 time in total.
 

User avatar
Lone_Wolf
Member
 
Posts: 2193
Joined: Sun Apr 09, 2017 05:50
Location: Hopefully very far from yours, snoop :P
GitHub: LoneWolfHT
IRC: Lone_Wolf
In-game: Lone_Wolf

Re: Post your little CSMs!

by Lone_Wolf » Fri Jan 12, 2018 01:25

azekill_DIABLO wrote:I made somthing that disconnects u when taking dmg.
Code: Select all
local modname = core.get_current_modname() or "??"
local modstorage = core.get_mod_storage()

minetest.register_on_damage_taken(function(hp)
   minetest.send_chat_message("nuuuuh I flee...")
   minetest.disconnect()
end)


I don't think it deserves a topic.

Code: Select all
local modname = core.get_current_modname() or "??"
local modstorage = core.get_mod_storage()

minetest.register_on_damage_taken(function(hp)
   minetest.send_chat_message("nuuuuh I flee...")
   minetest.run_server_chatcommand("home")
end)

Haven't tested and my memory isn't that great. Might have messed something up...
 


Return to Client-side modding



Who is online

Users browsing this forum: No registered users and 2 guests