Skip to content

Commit

Permalink
changing color system
Browse files Browse the repository at this point in the history
  • Loading branch information
wildrun0 committed Oct 31, 2022
1 parent aa28eb0 commit 3fb4087
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions homesetter.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
function Initialize(Plugin)
Plugin:SetName("HomeSetter")
Plugin:SetVersion(3)
Plugin:SetVersion(4)

dofile(cPluginManager:GetPluginsPath() .. "/InfoReg.lua")
RegisterPluginInfoCommands()
Expand All @@ -14,22 +14,22 @@ end

function TpHome(command, Player)
if #command > 2 then
Player:SendMessageFailure("@cThe home name is too long")
Player:SendMessageFailure("&cThe home name is too long")
return true
end
local homename = (#command ~= 2 and "home" or command[2])
if TpPlayerHome(Player, homename) then
Player:SendMessageSuccess("@aTeleported to @d" .. homename)
Player:SendMessageSuccess("&aTeleported to &d" .. homename)
else
Player:SendMessageFailure("@cHome not found!")
Player:SendMessageFailure("&cHome not found!")
end
return true
end


function SetHome(command, Player)
if #command > 2 then
Player:SendMessageFailure("@cThe home name is too long")
Player:SendMessageFailure("&cThe home name is too long")
return true
end

Expand All @@ -40,26 +40,26 @@ function SetHome(command, Player)
)

if sethome_state == nil then
Player:SendMessageFailure("@cMaximum homes have been set!")
Player:SendMessageFailure("&cMaximum homes have been set!")
elseif sethome_state then
Player:SendMessageSuccess("@aHome set!")
Player:SendMessageSuccess("&aHome set!")
else
Player:SendMessageFailure("@cHome already exist!")
Player:SendMessageFailure("&cHome already exist!")
end
return true
end


function DelHome(command, Player)
if #command > 2 then
Player:SendMessageFailure("@cThe home name is too long")
Player:SendMessageFailure("&cThe home name is too long")
return true
end
local homename = (#command ~= 2 and "home" or command[2])
if DelPlayerHome(Player:GetName(), homename) then
Player:SendMessageSuccess("@aHome deleted!")
Player:SendMessageSuccess("&aHome deleted!")
else
Player:SendMessageFailure("@cHome not found!")
Player:SendMessageFailure("&cHome not found!")
end
return true
end
Expand Down

0 comments on commit 3fb4087

Please sign in to comment.