Tyhawk master
New Member
- Joined
- Jan 10, 2015
- Messages
- 149
- Reaction score
- 4
hey guys how do i make a vip door so only vip players can get through ??
-- Credits StreamSide and Empty
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerStorageValue(cid,11551) < 1 then
if getPlayerLevel(cid) > 1 then
getPlayerStorageValue(cid, 11551)
doSendAnimatedText(getPlayerPosition(cid), "Welcome!", TEXTCOLOR_RED)
doCreatureSay(cid, "CONGRATULATIONS! You are now a VIP for 15 days! You can now enter the VIP-area and use unique features!. ", TALKTYPE_ORANGE_1)
setPlayerStorageValue(cid, 11551, (getPlayerStorageValue(cid,11551) + 15))
doRemoveItem(item.uid, 1)
else
doPlayerSendCancel(cid,"You need to be at least level 2 to use this.")
doRemoveItem(item.uid, 1)
end
else
doPlayerSendCancel(cid,"You are already a donator.")
end
return TRUE
end
where do you want it to teleport onuse?this is the Vip.lua
just make a teleport infront of the VIP door...to the Vip island the coordinates are x: 1191 Y: 902 Z:7
function onUse(cid, item, frompos, item2, topos)
if getPlayerStorageValue(cid,11551) then
pos = getPlayerPosition(cid)
if pos.x == topos.x then
if pos.y < topos.y then
pos.y = topos.y + 1
else
pos.y = topos.y - 1
end
elseif pos.y == topos.y then
if pos.x < topos.x then
pos.x = topos.x + 1
else
pos.x = topos.x - 1
end
else
doPlayerSendTextMessage(cid,22,"Stand in front of the door.")
return true
end
doTeleportThing(cid,pos)
doSendMagicEffect(topos,12)
else
doPlayerSendTextMessage(cid,22,'Only VIP Account can go there.')
end
return true
end
At least tab your shit.just make a teleport infront of the VIP door...
Code:function onUse(cid, item, frompos, item2, topos) if getPlayerStorageValue(cid,11551) then pos = getPlayerPosition(cid) if pos.x == topos.x then if pos.y < topos.y then pos.y = topos.y + 1 else pos.y = topos.y - 1 end elseif pos.y == topos.y then if pos.x < topos.x then pos.x = topos.x + 1 else pos.x = topos.x - 1 end else doPlayerSendTextMessage(cid,22,"Stand in front of the door.") return true end doTeleportThing(cid,pos) doSendMagicEffect(topos,12) else doPlayerSendTextMessage(cid,22,'Only VIP Account can go there.') end return true end
nah, don't like to tabAt least tab your shit.
Can I get a confirmation on this code please?hey guys how do i make a vip door so only vip players can get through ??
local vipStorage = 11551 -- storage value of your vip's
local vipActionid = 1000 -- actionid for the vip door
function onUse(cid, item, fromPosition, itemEx, toPosition)
if item.actionid == vipActionid then
if getPlayerStorageValue(cid, vipStorage) > 0 then
doTeleportThing(cid, toPosition)
doSendAnimatedText(toPosition, "Welcome!", TEXTCOLOR_RED)
else
doPlayerSendCancel(cid, "You are not a vip player :( ")
doTeleportThing(cid, fromPosition)
return false
end
end
return true
end
You look like you know nothing ahout scripting mate, watching this thread & didn't help, you prolly heard someone saying you need to tab so you just repeated what he/she said to look "sick", you sir need to go learn what scripting is.That's why your camel rider server has like 5 players.