LucasFerraz
Systems Analyst
I need script that when vip_time ends player get teleported to home Town AND lose promotion vip (9, 10, 11, 12)
function onLogin(cid)
if vip.hasVip(cid) == FALSE then
doTeleportThing(cid,{x=EDIT, y=EDIT, z=EDIT}) ----- Change to ur "home town" for no VIPs
setPlayerPromotionLevel(cid,1)
end
return true
end
LUA:function onLogin(cid) if vip.hasVip(cid) == FALSE then doTeleportThing(cid,{x=EDIT, y=EDIT, z=EDIT}) ----- Change to ur "home town" for no VIPs setPlayerPromotionLevel(cid,1) end return true end
<movevent type="StepIn" uniqueid="5559" event="script" value="VIPtp.lua"/>
local VIPposition = {x=EDIT, y=EDIT, z=EDIT}---- Tp to vip zone
function onStepIn(cid, item, pos)
if vip.hasVip(cid) == TRUE then
if getPlayerStorageValue(cid,8900) == -1 then
setPlayerStorageValue(cid,8900,1)
doTeleportThing(cid,VIPposition)
doPlayerPopupFYI(cid,"Welcome to vip zone!!")
else
doTeleportThing(cid,VIPposition)
end
end
return true
end
function onLogin(cid)
if vip.hasVip(cid) == FALSE then
if getPlayerStorageValue(cid,8900) == 1 then
doTeleportThing(cid,{x=EDIT, y=EDIT, z=EDIT}) ----- Change to ur "home town" for no VIPs
setPlayerPromotionLevel(cid,1)
end
end
return true
end
function onLogin(cid)
if vip.hasVip(cid) == true then
setPlayerStorageValue(cid, 20500, 1)
elseif vip.hasVip(cid) == false and getPlayerStorageValue(cid, 20500) == 1 then
doTeleportThing(cid, getPlayerMasterPos(cid))
setPlayerStorageValue(cid, 20500, -1)
setPlayerPromotionLevel(cid,1)
end
return true
end
It's not better do it in one script?? :huh:
LUA:function onLogin(cid) if vip.hasVip(cid) == true then setPlayerStorageValue(cid, 20500, 1) elseif vip.hasVip(cid) == false and getPlayerStorageValue(cid, 20500) == 1 then doTeleportThing(cid, getPlayerMasterPos(cid)) setPlayerStorageValue(cid, 20500, -1) setPlayerPromotionLevel(cid,1) end return true end