• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

GlobalEvent Vip System

nice! got some questions! :p
can i skip the remove vip part if i want the vip to last for ever?
can i use vip for the whole account?
 
data/talkactions/scripts/talkactions.xml/
Code:
<talkaction log="yes" words="/adddays" access="5" event="script" value="adddays.lua"/>


data/talkactions/scripts/adddays.lua
Code:
--- Script by Kekox.
function onSay(cid, words, param, channel)
        if(param == '') then
                doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires param.")
                return true
        end
 
        local t = string.explode(param, ",")
        t[1] = tonumber(t[1])
        if(not t[1]) then
                doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires numeric param.")
                return true
        end
 
        local pid = cid
        if(t[2]) then
                pid = getPlayerByNameWildcard(t[2])
                if(not pid) then
                        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. t[2] .. " not found.")
                        return true
                end
        end
 
        if(t[1] > 365) then
                doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You can only add max 365 vip days.")
                return true
        end
 
        sender = getPlayerByNameWildcard(cid)
 
    doAddVipDays(pid, t[1])
    doPlayerSendTextMessage(cid, "You have added ".. t[1] .." vip days to ".. t[2])
    doPlayerSendTextMessage(pid, sender .." just added you ".. t[1] .." vip days.")    
        return true
end
--- Thanks to Kekox.

rep++ if helped
 
#Sorry Double post

-- I NEED A SCRIPT FOR 2 WHEN PROMOTING THE TIME TO END THE VIP IT'S BACK PLAYER PROMOTION 1 !!
-- ALSO NEED A SCRIPT TO CHECK THE DAYS OF PLAYER THAT STILL HAS VIP

-- REPP++ for those who help me :)
 
For tfs 0.4, globalevents!

removevip.lua
Lua:
function onThink(cid, item, fromPosition, toPosition)

	for _, name in ipairs(getOnlinePlayers()) do
		local player = getPlayerByName(name)
		if getCreatureStorage(player,11551) == 1 then
			doPlayerSetStorageValue(player,11551,0)
		end
	end
end
removevipdays.lua
Lua:
function onThink(cid, item, fromPosition, toPosition)
    for _, name in ipairs(getOnlinePlayers()) do
        local player = getPlayerByName(name)
        if getCreatureStorage(player, 11551) > 1 then
            doPlayerSetStorageValue(player, 11551, getCreatureStorage(player) - 1)
        end
    end
end
 
Can Anyone Fix Door? it Goes Inside Wall When Use It S:!

Lua:
-- Credits StreamSide and Empty
function onUse(cid, item, fromPosition, itemEx, toPosition)
	local cidPosition = getCreaturePosition(cid)
		if (item.actionid == 5788 and getPlayerStorageValue(cid,11551) >= 1) then
			if cidPosition.x < toPosition.x then
				doTeleportThing(cid, {x=toPosition.x+1,y=toPosition.y,z=toPosition.z}, TRUE)
								doCreatureSay(cid, "Welcome VIP Player!", TALKTYPE_ORANGE_1)
			else
				doTeleportThing(cid, {x=toPosition.x-1,y=toPosition.y,z=toPosition.z}, TRUE)
								doCreatureSay(cid, "Welcome VIP Player!", TALKTYPE_ORANGE_1)
			end
			return TRUE
		else
			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Sorry, but only VIP Players can pass here! Buy VIP on the WEB.")
			return TRUE
	end
	return FALSE
end
change these line and prove it
Code:
doTeleportThing(cid, {x=toPosition.x[B]-1[/B],y=toPosition.y,z=toPosition.z}
change by "example"
Code:
doTeleportThing(cid, {x=toPosition.x,y=toPosition.y[B]-1[/B],z=toPosition.z}
 
Everything is working. But when i use the VIP item to become a vip player it works it BC telling me that im vip But i cant use the door. It tells me im not a vip player. help?
 
This VIP system works with TFS 4?

Cuz i have one system vip ( real vip ) don't work
 
worked well
if i wanna make endless vip time i just dont have to make the last 2 lua files in globalevents?
 

Similar threads

Back
Top