function onPlayerCheckPremiumTime(cid, targetName)
local target = getPlayerByNameWildcard(targetName)
if target then
local premiumTime = getPlayerPremiumDays(target)
if premiumTime > 0 then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, targetName .. " it has " .. premiumTime .. " premium time days remaining.")
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, targetName .. "does not have premium time.")
end
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Player not found.")
end
end
function onSay(cid, words, param)
local t = string.explode(param, ",")
if #t == 1 then
onPlayerCheckPremiumTime(cid, t[1])
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Use the correct syntax: /pa playername")
end
return true
end