Skip to content

Commit

Permalink
Added Server Save Talkaction (#46)
Browse files Browse the repository at this point in the history
  • Loading branch information
LuanGP authored Jan 6, 2025
1 parent ea2eb53 commit 59610c2
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
13 changes: 13 additions & 0 deletions data/talkactions/scripts/server_save.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
function onSay(player, words, param)
if not player:getGroup():getAccess() then
return true
end

if player:getAccountType() < ACCOUNT_TYPE_GOD then
return false
end

saveData()
player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "Server Saved.")
return false
end
1 change: 1 addition & 0 deletions data/talkactions/talkactions.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<talkactions>
<!-- commands -->
<talkaction words="/save" script="server_save.lua" />
<talkaction words="/attr" separator=" " script="attributes.lua" />
<talkaction words="/ban" separator=" " script="ban.lua" />
<talkaction words="/ipban" separator=" " script="ipban.lua" />
Expand Down

0 comments on commit 59610c2

Please sign in to comment.