legolas23
New Member
- Joined
- Jan 8, 2009
- Messages
- 537
- Reaction score
- 3
Hello
This script checks players premium days on login and if the premium is finished tps player to free temple
Remember to edit temple position cords in scripts!!!
For 0.3.5pl1
For 0.3+ save this code below in
creaturescripts as pacc.lua
and in Creaturescripts.xml add
and in login.lua before
add
rep ++
This script checks players premium days on login and if the premium is finished tps player to free temple

Remember to edit temple position cords in scripts!!!
For 0.3.5pl1
Code:
<?xml version="1.0" encoding="UTF-8"?>
<mod name="Pacc information" version="1.0" author="Legolas23" contact="otland.net" enabled="yes">
<config name="PaccInformation"><![CDATA[
config = {
kickpos = { x=1234, y=123, z=4, stackpos=1 }
paccStorage = 45322
}
]]></config>
<event type="login" name="PaccInformation" event="script"><![CDATA[
domodlib('PaccInformation')
function onLogin(cid)
if getPlayerPremiumDays(cid) == 0 then
doTeleportThing(cid, config.kickpos)
doPlayerSendTextMessage(cid, 25, "Your premium time has ran out!")
setPlayerStorageValue(cid, config.paccStorage, (getPlayerStorageValue(cid, config.paccStorage)+1))
else
if getPlayerStorageValue(cid, config.paccStorage) <= 0 then
return true
end
return true
end
]]></event>
<event type="login" name="PaccInformation" event="buffer"><![CDATA[
registerCreatureEvent(cid, "PaccInformation")
_result = true
]]></event>
</mod>
getPlayerPremiumDays(cid)
For 0.3+ save this code below in
creaturescripts as pacc.lua
Code:
function onLogin(cid)
if getPlayerPremiumDays(cid) == 0 then
doTeleportThing(cid, config.kickpos)
doPlayerSendTextMessage(cid, 25, "Your premium time has ran out!")
setPlayerStorageValue(cid, config.paccStorage, (getPlayerStorageValue(cid, config.paccStorage)+1))
else
if getPlayerStorageValue(cid, config.paccStorage) <= 0 then
return true
end
return true
end
and in Creaturescripts.xml add
Code:
<event type="login" name="PaccInformation" event="script" value="pacc.lua"/>
and in login.lua before
Code:
return true
Code:
registerCreatureEvent(cid, "PaccInformation")
rep ++

Last edited: