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

/attr help

phern

alysiaots.com
Joined
Nov 2, 2008
Messages
195
Reaction score
2
Location
Poland
Hi there.
I need some1 to make a talkaction for me. I think every1 knows how /attr is working. The only problem is, that the effect works only if player is standing in face to gm...
I need it to work in certain player eg.
Code:
/attr cannotmove, xxx
where xxx is the name of player.
 
Code:
function onSay(cid, words, param)
	local player = getPlayerByNameWildcard(param)
	if not isPlayer(player) then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'Player is not online.')
		return true
	end
	local b = not getCreatureNoMove(player)
	doCreatureSetNoMove(player, b)
	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, b and 'Player can\'t move any longer.' or 'Player can now move again.')
	doPlayerSendTextMessage(player, MESSAGE_STATUS_CONSOLE_BLUE, b and 'You can no longer move.' or 'You can now move again.')
	doSendAnimatedText(getThingPos(player), b and 'Frozen' or 'Can Move', b and 64 or 168)
	doSendMagicEffect(getThingPos(player), b and CONST_ME_ICEATTACK or CONST_ME_HOLYAREA)
	return true
end
 
I got the solution!

Code:
function onSay(cid, words, param)
	local player = getPlayerByNameWildcard(param)
	if not isPlayer(player) then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'Player is not online.')
		return true
	end
	local b = not getCreatureNoMove(player)
	doCreatureSetNoMove(player, b)
	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, b and 'Player can\'t move any longer.' or 'Player can now move again.')
	doPlayerSendTextMessage(player, MESSAGE_STATUS_CONSOLE_BLUE, b and 'You can no longer move.' or 'You can now move again.')
	doSendAnimatedText(getThingPos(player), b and 'Frozen' or 'Can Move', b and 64 or 168)
	doSendMagicEffect(getThingPos(player), b and CONST_ME_ICEATTACK or CONST_ME_HOLYAREA)
	return true
end
 
Hi there.
I need some1 to make a talkaction for me. I think every1 knows how /attr is working. The only problem is, that the effect works only if player is standing in face to gm...
I need it to work in certain player eg.
Code:
/attr cannotmove, xxx
where xxx is the name of player.


/attr cannotmove ,30
 
Back
Top