addpremium.lua
function onSay(cid, words, param)
local t = string.explode(param, ",")
local player = getPlayerByNameWildcard(t[1])
local premiumdays = tonumber(t[2])
if (not t[1]) then
doPlayerSendCancel(cid, "You must fill with a player name.")
elseif (premiumdays < 0) then
doPlayerAddPremiumDays(player, premiumdays)
doPlayerSendTextMessage(cid,22,"You have removed " .. t[2] .. " premium days from " .. player .. ".")
doPlayerSendTextMessage(player,25,"You have lost " .. t[2] .. " premium days.")
elseif (premiumdays >= 1 and premiumdays < 150) then
doPlayerAddPremiumDays(player, premiumdays)
doPlayerSendTextMessage(cid,22,"You have added " .. premiumdays .. " premium days from " .. getCreatureName(player) .. ".")
doPlayerSendTextMessage(player,25,"You received " .. premiumdays .. " premium days.")
end
return TRUE
end
talkactions.xml
<talkaction log="yes" words="/addpremium" access="5" event="script" value="addpremium.lua"/>





info
Grupo: Campones
Registrado: 05/03/11
Posts: 0
Reputação: 0
Então como mostra o titulo quero um commando para que o god possa adicionar dias de premium para um char qualquer!!
pois tenho um sistema vip e ele e tipo premium!!!