#up
yes, if time has out - player don't have vip (not must relog) : ))
#master-m
it's my script because i post only my scripts and you dont know my skills?
and how the server remove the vip time automatically?? awser my question pleaaaseeeeeee
local days = (params["days"]*3600*24)
[26/08/2009 19:30:31] data/talkactions/scripts/vip.lua:17: attempt to call global 'list' (a nil value)
[26/08/2009 19:30:31] stack traceback:
[26/08/2009 19:30:31] data/talkactions/scripts/vip.lua:17: in function <data/talkactions/scripts/vip.lua:1>
function doRemoveVip(cid)
db.executeQuery("UPDATE `accounts` SET `viptime` = " .. 0 .. " WHERE `id`='" .. getPlayerAccountId(cid) .. "' LIMIT 1;")
return TRUE
end
function onUse(cid, item, fromPosition, itemEx, toPosition)
local cidPosition = getCreaturePosition(cid)
if (item.actionid == 5788 and
#####this is where what I did starts####
if(isVip(accountName))then
time = getAccountVipTime(accountName)
if(time > 0)then
####this is where what i did finishes####
) then
if cidPosition.x < toPosition.x then
doTeleportThing(cid, {x=toPosition.x+1,y=toPosition.y,z=toPosition.z}, TRUE)
doCreatureSay(cid, "BIENVENIDO VIP!", TALKTYPE_ORANGE_1)
else
doTeleportThing(cid, {x=toPosition.x-1,y=toPosition.y,z=toPosition.z}, TRUE)
doCreatureSay(cid, "BIENVENIDO VIP!", TALKTYPE_ORANGE_1)
end
return TRUE
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "sOLO LOS VIP SON PERMITIDOS AQUI! SI QUIERES VIP, TENDRAS QUE COMPRARLO EN LA PAGINA WEB.")
return TRUE
end
return FALSE
end
function onUse(cid, item, fromPosition, itemEx, toPosition)
doSendAnimatedText(getPlayerPosition(cid), "CONGRATulations!", TEXTCOLOR_RED)
doCreatureSay(cid, "Now you are vip blahblahblah!!", TALKTYPE_ORANGE_1)
doAccountAddVipTime(getPlayerAccount(player), days) + 7
doRemoveItem(item.uid, 1)
end
return TRUE
end
it doesnt work on 0.3.6