• logo_cipsoft
    Nowe serwery zostały otwarte 19 Lut 2025:
    Noctalia (Open PvP) Ignitera (Open PvP) us_logo Xybra (Open PvP)

Player Kick TFS 0.35

Status
Zamknięty.

xxxfilipekxxx1

Advanced User
Dołączył
Lipiec 1, 2009
Posty
215
Liczba reakcji
5
Wiek
33
Witam mam Silnik tfs 0.3.5 i mam problem z Kick w Config.lua mam:
replaceKickOnLogin = "yes"
kickIdlePlayerAfterMinutes = 10 * 60 * 1000
I moim zdaniem powino kicka? po 10 min. Ale nie kicka wog?le.
Wie kto? jak zrobi? ?eby gracza kicka?o Po 10 min. ??
 
Odp: Player Kick TFS 0.35

Hi.

PHP:
	-- Limits
	idleWarningTime = 9 * 60 * 1000
	idleKickTime = 10 * 60 * 1000
	expireReportsAfterReads = 1
	playerQueryDeepness = 2
	maxItemsPerPZTile = 0
	maxItemsPerHouseTile = 0

Pozdrawiam.
 
Odp: Player Kick TFS 0.35

Sprawd? tw?j plik idle.lua w CreatureScripts. Je?eli jest inny ni? poni?szy - zmie? go:

Kod:
local config = {
	idleWarning = getConfigValue('idleWarningTime'),
	idleKick = getConfigValue('idleKickTime')
}

function onThink(cid, interval)
	if(getTileInfo(getCreaturePosition(cid)).nologout or getCreatureNoMove(cid) or
		getPlayerCustomFlagValue(cid, PlayerCustomFlag_AllowIdle)) then
		return true
	end

	local idleTime = getPlayerIdleTime(cid) + interval
	doPlayerSetIdleTime(cid, idleTime)
	if(config.idleKick > 0 and idleTime > config.idleKick) then
		doRemoveCreature(cid)
	elseif(config.idleWarning > 0 and idleTime == config.idleWarning) then
		local message = "You have been idle for " .. math.ceil(config.idleWarning / 60000) .. " minutes"
		if(config.idleKick > 0) then
			message = message .. ", you will be disconnected in "
			local diff = math.ceil((config.idleWarning - config.idleKick) / 60000)
			if(diff > 1) then
				message = message .. diff .. " minutes"
			else
				message = message .. "one minute"
			end

			message = message .. " if you are still idle"
		end

		doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, message .. ".")
	end

	return true
end
 
Odp: Player Kick TFS 0.35

W creaturescripts\scripts nie mam pliku idle.lua.
Powinieniem go stworzy? ??
 
Odp: Player Kick TFS 0.35

Tak i plik powinienien mie? zawarto?? tak jak zapisa? Xayan
 
Odp: Player Kick TFS 0.35

Zrobi?em to wszystrko ale dalej nie kicka ;/
Ma kto? jeszcze jaki? pomys???
 
Odp: Player Kick TFS 0.35

Dodaj do login.lua (te? w creaturescripts), mi?dzy innymi takimi funkcjami:

Kod:
registerCreatureEvent(cid, "Idle")

Oraz do creaturescripts.xml:

Kod:
<event type="login" name="PlayerLogin" event="script" value="login.lua"/>
 
Status
Zamknięty.
Do góry