kimokimo
Kimo
in talkactions.xml
in talkactions,scripts vipteleport.lua
l
all you need to do is to edit this part
domodlib('VipFuctions')
if getPlayerVipDays(cid) <= 0 then
for your vip system storage
and the positions ofc
and you can edit players cannot use in some areas like events just edit this part
local warArena = {
frompos = {x=638, y=711, z=7},
topos = {x=751, y=780, z=7},
}
PHP:
<talkaction words="!fly" event="script" value="vipteleport.lua"/>
in talkactions,scripts vipteleport.lua
l
PHP:
ocal config = {
temple = {x = 1000, y = 1000, z = 7},
depot = {x = 31942, y = 31965, z = 7},
viparea = {x = 33112, y = 30931, z = 6},
trainers = {x = 32356, y = 32542, z = 7}
}
local ctfArena = {
frompos = {x=659, y=483, z=7},
topos = {x=769, y=569, z=7},
}
local warArena = {
frompos = {x=638, y=711, z=7},
topos = {x=751, y=780, z=7},
}
function onSay(cid, words, param, channel)
if(param == '') then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You must specify where you would like to go.")
return true
end
param = param:lower()
local tmp = getCreaturePosition(cid)
domodlib('VipFuctions')
if getPlayerVipDays(cid) <= 0 then
doPlayerSendTextMessage(cid,25,"Only Vip players can use this command!")
return true
end
if isInArea(getPlayerPosition(cid), warArena.frompos, warArena.topos) or isInArea(getPlayerPosition(cid), ctfArena.frompos, ctfArena.topos) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You can not teleport while in team pvp event.")
return true
end
if hasCondition(cid, CONDITION_INFIGHT) == TRUE then
doPlayerSendCancel(cid, "You may not teleport while in combat.")
return true
end
if param == 'temple' then
if doTeleportThing(cid, config.temple, true) then
doSendMagicEffect(tmp, CONST_ME_POFF)
broadcastMessage(getPlayerName(cid) .. ": used word !fly and teleported to " .. param,25)
doSendMagicEffect(config.temple, CONST_ME_TELEPORT)
end
elseif param == 'depot' then
if doTeleportThing(cid, config.depot, true) then
doSendMagicEffect(tmp, CONST_ME_POFF)
broadcastMessage(getPlayerName(cid) .. ": used word !fly and teleported to " .. param,25)
doSendMagicEffect(config.depot, CONST_ME_TELEPORT)
end
elseif param == 'vip' then
if doTeleportThing(cid, config.viparea, true) then
doSendMagicEffect(tmp, CONST_ME_POFF)
broadcastMessage(getPlayerName(cid) .. ": used word !fly and teleported to " .. param,25)
doSendMagicEffect(config.viparea, CONST_ME_TELEPORT)
end
elseif param == 'house' then
local playerGID = getPlayerGUID(cid)
local playerHouse = getHouseByPlayerGUID(playerGID)
if playerHouse ~= nil then
local housePos = getHouseInfo(playerHouse).entry
if doTeleportThing(cid, housePos, true) then
doSendMagicEffect(tmp, CONST_ME_POFF)
doSendMagicEffect(housePos, CONST_ME_TELEPORT)
end
else
doPlayerSendCancel(cid, "You do not own a house.")
end
else
doPlayerSendCancel(cid, "There is no such place.")
return true
end
return true
end
all you need to do is to edit this part
domodlib('VipFuctions')
if getPlayerVipDays(cid) <= 0 then
for your vip system storage
and the positions ofc
and you can edit players cannot use in some areas like events just edit this part
local warArena = {
frompos = {x=638, y=711, z=7},
topos = {x=751, y=780, z=7},
}