Jump to content

help please ACL Permission Police reinforcement


magicplayerc

Recommended Posts

function Comando2 ( ThePlayer )
outputChatBox("#ffff00Você CHAMOU REFORÇO ESPERE no local", ThePlayer, 255, 255, 255, true)
end
addCommandHandler("reforco", Comando2 ) --------------- ACL AQUI
----------------------------------------

function chamado2(source)
for i, player in ipairs(getElementsByType("player")) do
local uj = getElementData(player,"PMemprego") or false
if type(uj) == "boolean" then
if uj == true then
outputChatBox("#ffffffPOLICIAL "..getPlayerName(source).." #ffffffCHAMOU REFORCO AGORA",player, 255,255,255,true)
outputChatBox("#ff0000----------------------------------------------------------------",player, 255,255,255,true)
outputChatBox("#ff0000/ir #ffffff "..getPlayerName(source).." #ffffffPara ir ate o local onde jogador chamou",player, 255,255,255,true)
end
end
end        
end
addCommandHandler("reforco",chamado2)  --------------- ACL AQUI

 

Link to comment
function Comando2 ()
	if not isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("PMP")) then 
		outputChatBox("#ffff00Você não é um policial.", source, 255, 255, 255, true)
		return 
	end

	outputChatBox("#ffff00Você CHAMOU REFORÇO ESPERE no local", source, 255, 255, 255, true)

	for _, p in ipairs(getElementsByType("player")) do
		if p ~= source then
			accountname = getAccountName(getPlayerAccount(p))
			if isObjectInACLGroup("user."..accountname, aclGetGroup("PMP")) then
				if getElementData(p, "PMemprego") then
					outputChatBox("#ffffffPOLICIAL "..getPlayerName(source).." #ffffffCHAMOU REFORCO AGORA",p, 255,255,255,true)
					outputChatBox("#ff0000----------------------------------------------------------------",p, 255,255,255,true)
					outputChatBox("#ff0000/ir #ffffff  #ffffffPara ir ate o local onde jogador chamou",p, 255,255,255,true)				
				end
			end
		end
	end
end
addCommandHandler("reforco", Comando2) 

EDIT: i did not tested

Edited by Tommy.
  • Thanks 1
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...