• 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!

VIP Days end, get teleported home without onLogin, but instantly

Lightonia

Lightonia.servegame.com
Joined
Jun 4, 2007
Messages
492
Reaction score
9
LUA:
function onLogin(cid)
	if getPlayerVipDays(cid) > 0 then
		setPlayerStorageValue(cid, 20500, 1)
	elseif getPlayerVipDays(cid) == 0 and getPlayerStorageValue(cid, 20500) == 1 then
		doTeleportThing(cid, getPlayerMasterPos(cid))		
		setPlayerStorageValue(cid, 20500, -1)
	end
	return true
end
Heres the script!
 
My problem is that players still can stay inside of VIP even after the VIP is done, since they bot. I want them to be teleported immediately when VIP ends back to temple.
 
what TFS do you use???

- - - Updated - - -

did you add
PHP:
registerCreatureEvent(cid, "TempleTeleporter")
to /data/creaturescripts/scripts/login.lua
 
You cant do that with an onLogin script :P You have to use a global event that checks if players are vip for example each hour.
onLogin event only checks when they login if they are VIP or not.
 
Back
Top