JDB
OtLand Veteran
- Joined
- Jun 1, 2009
- Messages
- 4,145
- Solutions
- 2
- Reaction score
- 115
PHP:
/tp <storage>, <town>
It will teleport anyone with that storage value to that town.
data/talkactions/talkactions.xml
Code:
<talkaction log="yes" words="/tp" access="5" event="script" value="tp.lua"/>
data/talkactions/scripts/tp.lua
Code:
function onSay(cid, words, param, channel)
local p = string.explode(param, ',')
local storage = tonumber(p[1])
if storage then
for _, cid in ipairs(getPlayersOnline()) do
if(getPlayerStorageValue(cid, storage) == 1) then
doTeleportThing(cid, getTownTemplePosition(getTownId(p[2])))
end
end
else
doPlayerSendCancel(cid, "Sorry, you must enter a storage type.")
end
return true
end
Last edited: