Godely
Member
- Joined
- Aug 19, 2007
- Messages
- 233
- Reaction score
- 19
Is it possible to make a Storagevalue disappear after a certain time? Because, on my server, the people that pay out-game would have the Premium Days + The Counting Storagevalue (is will be the same, so, if the player pays for 15 days of premium, the Storagevalue will disappear in 15 days).
Here is the premium talkaction, so, if you can add the Storagevalue thing to this script, I will appreciate.
Btw: This Storagevalue would make the player enter in locals that the other players can't, but now I am thinking: the other characters of the premium account won't have this storagevalue, but only the player that I have add. So, you guys got any idea? There's any Storagevalue for all account?
Thanks!
Here is the premium talkaction, so, if you can add the Storagevalue thing to this script, I will appreciate.
Code:
function onSay(cid, words, param)
local idgroup = 2 --Min Group Access
if getPlayerGroupId(cid) < idgroup then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, "You can not use this command.")
elseif param ~= "" then
if string.find(param, ',') ~= nil then
local sep1 = string.find(param, ',')
local param1 = string.sub(param, 1, sep1-1)
local param2 = string.sub(param,sep1+1,string.len(param))
local target = getPlayerByName(param1)
if target == FALSE then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, "A player with that name is not online.")
elseif param1 == "" then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, "You must type a player.")
elseif (param2 == "") then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, "You must type an amount of days.")
elseif isNumber(param2) == FALSE then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, "The days must be written as numbers.")
elseif words == "/premium" then
local player = getCreatureName(target)
local days = param2
if days ~= 0 then
doPlayerAddPremiumDays(target, days)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, "You have added "..days.." days of premium account to "..player..".")
doPlayerSendTextMessage(target, MESSAGE_STATUS_DEFAULT, "You are now premium account for "..days.." days.")
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, "Days have to be higher than 0.")
end
end
end
end
end
Btw: This Storagevalue would make the player enter in locals that the other players can't, but now I am thinking: the other characters of the premium account won't have this storagevalue, but only the player that I have add. So, you guys got any idea? There's any Storagevalue for all account?
Thanks!
Last edited: