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

set the player no logout

Mooosie

mistofdeath.com
Premium User
Joined
Aug 2, 2008
Messages
742
Solutions
2
Reaction score
52
Location
Sweden
How can I set the player nologout in 8 seconds...
I've tried with:

LUA:
local condition = createConditionObject(CONDITION_INFIGHT)
setConditionParam(condition, CONDITION_PARAM_TICKS, 8000)

doAddCondition(cid, condition)
I get errors ;/
 
That script i posted seems to never work anyways.
That I wanted to explain is, that player cannot logout while a effect is active. In 8 seconds.
 
LUA:
local condition = createConditionObject(CONDITION_INFIGHT)
setConditionParam(condition, CONDITION_PARAM_TICKS, 8000)
 
doAddCondition(cid, condition)
wont be helpful at all if that's all you got..

you at least have to do it like this
Example
LUA:
local condition = createConditionObject(CONDITION_INFIGHT)
setConditionParam(condition, CONDITION_PARAM_TICKS, 8000)

function onLogin(cid, pos)
doAddCondition(cid, condition)
end

So.. the "local" thing is outside the function..
and with the doAddCondition you set inside a fuction...
 
I just solved it without conditions...
I used Big Vamp's script:
LUA:
local storage = 102
function onLogout(cid)
	if (getCreatureStorage(cid, storage) == 1) then
		doPlayerSendCancel(cid, "You can not log out during these effects.")
		return false
	end
	return true
end
 

Similar threads

Back
Top