• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

TalkAction Check Param PZ Tile

Sync

Ø,ø
Joined
May 26, 2009
Messages
1,902
Reaction score
26
Location
Canada
Code:
/check Druid Sample

This code just basically tells you if Param is inside or outside of PZ zone. =p

LUA:
function onSay(cid, words, param, channel)
	if(param == '') then
		return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires param.")
	end
	local target = getPlayerByNameWildcard(param)
	if(not target)then
		return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player not found.")
	end
	local name,msg = getCreatureName(target),""
	if(getTilePzInfo(getCreaturePosition(target))) then
		msg = name.." is inside of a PZ Zone."
	else
		msg = name.." is not inside a PZ Zone." 
	end   
    return doPlayerPopupFYI(cid, msg)   
end

2i9t8g9.jpg
 
Last edited:
Elo!
Make so you kill the target and all who are inside a 25x25 area around him instantly! Would be awesome !!!!!!!!!!!!!!!!
 
Elo!
Make so you kill the target and all who are inside a 25x25 area around him instantly! Would be awesome !!!!!!!!!!!!!!!!

You made that MOD Killing Spree script, So i beleive your capable of adding something easy like that =p
 
Code:
	<talkaction words="/check" event="script" value="scriptname.lua"/>
You can add access="3" if you only want GM's or higher to be able to use this command.
 
stop being a grammar nazi
owned
--
Code:
return doPlayerPopupFYI(cid, getCreatureName(target) .. " is " .. (getTilePzInfo(getThingPos(target)) and "" or "not") .. " inside of a PZ Zone.")
or;
Code:
return doPlayerPopupFYI(cid, getCreatureName(target) .. " is " .. (not getTilePzInfo(getThingPos(target)) and "not") .. " inside of a PZ Zone.")
?
 
Last edited:
Thread cleaned. Be ontopic and stop fight for things like grammar, for God's shake.
 
Back
Top