function onLogin
if getPlayerStorageValue(cid, 5000) == -1 then
doPlayerAddPremiumDays(cid, 365)
setPlayerStorageValue(cid, 5000, 1)
end
function onLogin(cid)
local newPremDays = 365 - getPlayerPremiumDays(cid)
doPlayerAddPremiumDays(cid, newPremDays)
registerCreatureEvent(cid, "PlayerDeath")
return TRUE
end
This would make sure that the days stays at 365 and won't go past it.PHP:function onLogin(cid) local newPremDays = 365 - getPlayerPremiumDays(cid) doPlayerAddPremiumDays(cid, newPremDays) registerCreatureEvent(cid, "PlayerDeath") return TRUE end
function onLogin(cid)
if getPlayerPremiumDays(cid) > 365 then
doPlayerAddPremiumDays(cid, - getPlayerPremiumDays(cid))
doPlayerAddPremiumDays(cid, 365)
else
local newPremDays = 365 - getPlayerPremiumDays(cid)
doPlayerAddPremiumDays(cid, newPremDays)
end
registerCreatureEvent(cid, "PlayerDeath")
return TRUE
end
Alright, how about this one then? o_oPHP:function onLogin(cid) if getPlayerPremiumDays(cid) > 365 then doPlayerAddPremiumDays(cid, - getPlayerPremiumDays(cid)) doPlayerAddPremiumDays(cid, 365) else local newPremDays = 365 - getPlayerPremiumDays(cid) doPlayerAddPremiumDays(cid, newPremDays) end registerCreatureEvent(cid, "PlayerDeath") return TRUE end
doPlayerAddPremiumDays(cid, - getPlayerPremiumDays(cid))
doPlayerAddPremiumDays(cid, 365)
doPlayerAddPremiumDays(cid, paccdays - getPlayerPremiumDays(cid))
7.6 does not have creaturescripts n' onLogin plx?
doPlayerAddPremiumDays(cid, - getPlayerPremiumDays(cid))this looks like it gives him the difference of 365 and momentanly pacc days and after that it gives him 365 more...Code:doPlayerAddPremiumDays(cid, - getPlayerPremiumDays(cid)) doPlayerAddPremiumDays(cid, 365)
Thats why justin get around 700 pacc days
cant you just do a local paccdays = 365 and then
if its totally nabbish just excuse me im still nabby xDCode:doPlayerAddPremiumDays(cid, paccdays - getPlayerPremiumDays(cid))
I have no idea to be honest, just made a guess out of function that was already in this topic.So there is no function like
doPlayerRemovePremiumDays ?!