local whereto = {x= 1, y=1, z=7} --change to place to kick them to
local itemyouneed = 1232 --replace with item they have to have
-----------------------------------------------<--- need more info before I can do this bit
if getPlayerItemCount(cid, itemyouneed) < 1 then
doTeleportThing(cid, whereto, TRUE)
end
return TRUE
end
<globalevent name="checkitem" interval="60000" event="script" value="checkitem.lua"/>
local whereto = {x= 1, y=1, z=7} --change to place to kick them to
local itemyouneed = 1232 --replace with item they have to have
function onThink(interval, lastExecution)
if getPlayerItemCount(cid, itemyouneed) < 1 then
doTeleportThing(cid, whereto, TRUE)
end
return TRUE
end
local whereto = {x= 1, y=1, z=7} --change to place to kick them to
local itemyouneed = 1232 --replace with item they have to have
function onThink(interval, lastExecution)
for _, pl in pairs(getPlayersOnline()) do
if getPlayerStorageValue(pl,500) == 1
if getPlayerItemCount(pl, itemyouneed) < 1 then
doTeleportThing(pl, whereto, TRUE)
setPlayerStorageValue(pl,500,0)
end
end
return TRUE
end
local cfg = {
position = {x= 1000, y=1000, z=7} , --change to place to kick them to
item = 1232, --replace with item they have to have
storage = 500
}
function onThink(interval, lastExecution)
for _, cid in ipairs(getPlayersOnline()) do
if getPlayerStorageValue(cid, cfg.storage) == 1 then
if getPlayerItemCount(cid, cfg.item) < 1 then
doTeleportThing(cid, cfg.position)
setPlayerStorageValue(cid, cfg.storage, 0)
end
end
end
return true
end
Thankies so much![]()