BUMP Mustn'/t be before 24 hours.BUMP
mmmmmmmmmmmmmmmm k but i need this script >.<BUMP Mustn'/t be before 24 hours.
if(words == "/checkvip") then
if getPlayerAccess(cid) == 5 then
if not param then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Invalid param specified.")
end
local player = getPlayerByName(param)
if not isPlayer(player) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player "..player.." not found.")
end
local timenow = os.time()
local quantity = math.floor((getPlayerStorageValue(player, XXXX) - timenow)/(24 * 60 * 60))
doPlayerPopupFYI(cid, "The player has".. (quantity < 0 and 0 or quantity) .." VIP days in character.")
return TRUE
end
function onLogin(cid)
if getPlayerVipDays(cid) >= 1 then
doPlayerSendTextMessage(cid, 19, "You have ".. getPlayerVipDays(cid) .." vip days left.")
end
return true
end
<event type="login" name="Vipcheck" event="script" value="vipcheck.lua"/>
registerCreatureEvent(cid, "Vipcheck")
creaturescript
Code:function onLogin(cid) if getPlayerVipDays(cid) >= 1 then doPlayerSendTextMessage(cid, 19, "You have ".. getPlayerVipDays(cid) .." vip days left.") end return true end
Code:<event type="login" name="Vipcheck" event="script" value="vipcheck.lua"/>
in login.lua
Code:registerCreatureEvent(cid, "Vipcheck")
how can your code work ?try my script will work with u
so, you have to wait until someone would help you. or waiting for the support team Limos/Ninja when they checked the forums every night
here is my help (a part of lines ) :-
go edit it in your talkaction script
Code:if(words == "/checkvip") then if getPlayerAccess(cid) == 5 then if not param then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Invalid param specified.") end local player = getPlayerByName(param) if not isPlayer(player) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player "..player.." not found.") end local timenow = os.time() local quantity = math.floor((getPlayerStorageValue(player, XXXX) - timenow)/(24 * 60 * 60)) doPlayerPopupFYI(cid, "The player has".. (quantity < 0 and 0 or quantity) .." VIP days in character.") return TRUE end
so change getPlayerVipDays to getPlayerStorageValue xD
creaturescript
Code:function onLogin(cid) if getPlayerVipDays(cid) >= 1 then doPlayerSendTextMessage(cid, 19, "You have ".. getPlayerVipDays(cid) .." vip days left.") end return true end
Code:<event type="login" name="Vipcheck" event="script" value="vipcheck.lua"/>
in login.lua
Code:registerCreatureEvent(cid, "Vipcheck")
19:38 You have 2 days of VIP.
if getPlayerStorageValue(cid, 11551) >= 1 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have ".. getPlayerStorageValue(cid, 11551) .." days of VIP.")
end
if (getConfigValue("accountManager") == FALSE and getCreatureName(cid) == "Account Manager") then
return false
end
local config = {
loginMessage = getConfigValue('loginMessage'),
useFragHandler = getBooleanFromString(getConfigValue('useFragHandler'))
}
function onLogin(cid)
local config = {
loginMessage = getConfigValue('loginMessage'),
useFragHandler = getBooleanFromString(getConfigValue('useFragHandler'))
}
function onLogin(cid)
if getPlayerStorageValue(cid, 11551) >= 1 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have ".. getPlayerStorageValue(cid, 11551) .." days of VIP.")
end
if (getConfigValue("accountManager") == FALSE and getCreatureName(cid) == "Account Manager") then
return false
end
Ops, sorry dude i wrote it via Mobile 3Gmissing end at the end of script brother![]()
[06/12/2014 02:10:48] [Error - LuaScriptInterface::loadFile] data/creaturescripts/scripts/login.lua:65: 'end' expected (to close 'function' at line 6) near '<eof>'I tested it btw. This appeared as i loged in!
Code:19:38 You have 2 days of VIP.
Just add this to login.lua
Code:if getPlayerStorageValue(cid, 11551) >= 1 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have ".. getPlayerStorageValue(cid, 11551) .." days of VIP.") end if (getConfigValue("accountManager") == FALSE and getCreatureName(cid) == "Account Manager") then return false end
anywhere under this should work
Code:local config = { loginMessage = getConfigValue('loginMessage'), useFragHandler = getBooleanFromString(getConfigValue('useFragHandler')) } function onLogin(cid)
If you cant get it to work line 1 to line 11 should look like this
Code:local config = { loginMessage = getConfigValue('loginMessage'), useFragHandler = getBooleanFromString(getConfigValue('useFragHandler')) } function onLogin(cid) if getPlayerStorageValue(cid, 11551) >= 1 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have ".. getPlayerStorageValue(cid, 11551) .." days of VIP.") end if (getConfigValue("accountManager") == FALSE and getCreatureName(cid) == "Account Manager") then return false end