function adminpm ( thePlayer, command, taraf,... )
local message = table.concat ({...}, " ")
if not ( isPlayerOnGroup ( thePlayer ) ) then
outputChatBox("#ff0000[Error]: #ffffffShoma Dastresi Be In Dastoor Nadarid!", thePlayer, 255, 255, 255, true)
return false
end
if taraf == nil then
outputChatBox("#00ff00Bezan: /pm <PartOfName> <Matn>", thePlayer, 255, 255, 255, true)
return false
end
if not findPlayer(taraf) then
outputChatBox("#ff0000[Error]: #ffffffPlayer Peyda Nashod!", thePlayer, 255, 255, 255, true)
return false
end
local playerpm = findPlayer(taraf)
local nameadmin = getPlayerName( thePlayer )
outputChatBox("#F39C12<< Be " ..taraf.. ": " ..message.. " >>", thePlayer, 255, 255, 255, true)
outputChatBox("#F39C12<< [Admin PM] " ..nameadmin.. ": " ..message.. " >>", playerpm, 255, 255, 255, true)
end
addCommandHandler("pm", adminpm)
try that