Script simples,ao usar o comando
!pz Nick
ele checkará se esse tal jogador está ou não em Protection Zone
pzzone.lua
function onSay(cid, words, param, channel) if(param == '') then return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires param.") end local player = getPlayerByNameWildcard(param) if(not player)then return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player not found.") end local name,msg = getCreatureName(player),"" if(getTilePzInfo(getCreaturePosition(player))) then msg = name.." Está em Protection Zone." else msg = name.." Não está em Protection Zone." end return doPlayerPopupFYI(cid, msg) end
talkactions.xml
<talkaction words="!pz" event="script" value="pzzone.lua"/>