Belthazor
New Member
- Joined
- Sep 20, 2008
- Messages
- 528
- Reaction score
- 4
Hello,
manny players in my ot complain about noob chars in war or they are blocking some spawn way so i made this command.
The command can be used 1 time in 30 Seconds so they wont spamm
and the player most be lower then lvl 50 caus thats the protection lvl in my server.
You can set for you server the temple spawn and the lvl the storage and the time between use of the command.
manny players in my ot complain about noob chars in war or they are blocking some spawn way so i made this command.
The command can be used 1 time in 30 Seconds so they wont spamm
and the player most be lower then lvl 50 caus thats the protection lvl in my server.
You can set for you server the temple spawn and the lvl the storage and the time between use of the command.
PHP:
local waittime = 30 -- Waiting time between the command
local storage = 50 -- The storage
if getPlayerLevel(pid) < 50 then -- The lvl of Protected Players
nPos = {x=32369, y=32241, z=7} -- The temple Position.
PHP:
local waittime = 30 --Default (30 seconds)
local storage = 50
function onSay(cid, words, param, channel)
if(param == "") then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.")
return TRUE
end
local pid = getPlayerByNameWildcard(param)
if(pid == 0 or (isPlayerGhost(pid) == TRUE and getPlayerAccess(pid) > getPlayerAccess(cid))) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. param .. " is not currently online.")
return TRUE
end
if getPlayerLevel(pid) < 50 then
if exhaustion.get(cid, storage) == FALSE then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, getCreatureName(pid) .. " has been sent to temple.")
nPos = {x=32369, y=32241, z=7}
doTeleportThing(pid, nPos)
exhaustion.set(cid, storage, waittime)
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "You must wait another " .. exhaustion.get(cid, storage) .. " seconds.")
end
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "The player is higer then lvl 50.")
end
return TRUE
end