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

Lua I got an issue with talkaction

phern

alysiaots.com
Joined
Nov 2, 2008
Messages
195
Reaction score
2
Location
Poland
Hello everyone. I got a little problem with talkaction script.
Here is the script:
Code:
function onSay(cid, words, param)
	local player = getPlayerByNameWildcard(param)
	if not isPlayer(player) then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'blahblabhlah.')
		return true
	end
	local b = not getCreatureNoMove(player)
	doCreatureSetNoMove(player, b)
	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, b and 'blahblabhlah.' or 'blahblabhlah.')
	doPlayerSendTextMessage(player, MESSAGE_STATUS_CONSOLE_BLUE, b and 'blahblabhlah.' or 'blahblabhlah.')
	doSendAnimatedText(getThingPos(player), b and 'Frozen' or 'Can Move', b and 64 or 168)
	doSendMagicEffect(getThingPos(player), b and CONST_ME_GIANTICE or CONST_ME_HOLYAREA)
	return true
end

And i want to make this scripts to repeat "frozen" every one second when this command is on (eg. /frozen Player [and then player can not move and sending animated "frozen" every one second untill command is off], /frozen Player [used 2nd time- player is able to move and stopped repeating anything]

I hope You have understood what I meant ;)
 
Last edited:
replace:
getPlayerByNameWildCard(t[2])
with
getPlayerByNameWildcard(t[2])
-
sry i tried and epic fail happened, i couldn't stop the added event, seems like stopEvent is bugedS.
 
It is working, but does not looping "freeze" :(

Ok..Forget it. I will just use the old one.
Thanks For trying anyway, rep for u.
 
Last edited:
Back
Top