i need a simple script that makes VIP only be avaible to download from operators
is that possible ?
I hope this one works:
function Main()
frmHub:EnableFullData(1)
Levels = {Master = "1",Operator = "1",VIP = "1",Reg = "0",Default = "0"}
end
function DataArrival(curUser, data)
if (strsub(data, 1, 15) == "$RevConnectToMe" and curUser.iProfile == -1) then
local _,_,towho = strfind(data, "$RevConnectToMe%s+%S+%s+(%S+)|")
if GetItemByName(towho) and GetItemByName(towho).bOperator then
curUser:SendData("*** Only VIPS are able to download from an OP")
return 1
end
elseif (strsub(data, 1, 12) == "$ConnectToMe" and curUser.iProfile == -1) then
local _,_,towho = strfind(data, "$ConnectToMe%s+(%S+)%s+.*|")
if GetItemByName(towho) and GetItemByName(towho).bOperator then
curUser:SendData("*** Only VIPS are able to download from an OP")
end
return 1
end
end
function isEnabled(profile)
ret = "0"
if profile then
for i, v in Levels do
if ( i == profile ) then
ret = v
end
end
end
end
Hi i cant run this script in 0.3.3.0.b16.05 please can any one help me
i got this Syntax ...s\VIP only be avaible to download from operators.lua:2: attempt to call method `EnableFullData' (a nil value))