lSenturion2
Active Member
- Joined
- Oct 2, 2019
- Messages
- 124
- Reaction score
- 29
Im trying to do VIP system but it works only in Players database.
I have this script named "vipend.lua" , on creaturescripts.
The server shows an error in console and I cant log in in my serve. Please help me <3
I have this script named "vipend.lua" , on creaturescripts.
Code:
function onLogin(cid)
local temple = { x =32369, y = 32241, z = 7}
if getPlayerVipDay(cid) >= 1 then
if getPlayerStorageValue(cid,55556) ~= 1 then
setPlayerStorageValue(cid,55556,1)
end
else
if getPlayerStorageValue(cid,55556) == 1 then
doTeleportThing(cid, temple)
doPlayerSendTextMessage(cid, 22, "Your VIP Time over!")
db.executeQuery("UPDATE `players` SET `vipday` = 0 WHERE `id` = ".. getAccountIdByName(getPlayerName(cid)) ..";")
setPlayerStorageValue(cid, 55556, 0)
end
end
return true
end
The server shows an error in console and I cant log in in my serve. Please help me <3