Preciso De Ajuda Com Meu Script De PORTE DE ARMAS ...
eu adicionei ele pra digitar o comando no marker, mas quem não tem dinheiro também é adicionado a ACL "PorteDeArmas", preciso de ajuda pra deixar em somente quem possui o dinheiro!
Script:
porte = createMarker (1491.136, -1768.475, 17.796, "cylinder", 2, 255, 0, 0, 50)
function infoporte(source)
outputChatBox ("#000000[INFO] #bababaPorte De Arma Custa R$300.000, Deseja Comprar? #FF0000[/comprarporte]", source, 255, 255, 255,true)
end
addEventHandler ("onMarkerHit", porte, infoporte)
function comprarporte(player)
if isElementWithinMarker(player, porte) then
if getPlayerMoney(player) >= 300000 then
takePlayerMoney(player, 300000)
outputChatBox("#000000[INFO] #FF0000Você Comprou o Porte De Armas!", player, 255, 255, 0, true)
else
outputChatBox("#000000[INFO] #FF0000Você Não Possui Dinheiro, Vá Trabalhar!", player, 255, 255, 0, true)
end
end
end
addCommandHandler ("comprarporte", comprarporte)
function trport ( source )
if isElementWithinMarker (source, porte ) then
aclGroupAddObject (aclGetGroup("PorteDeArmas"), "user."..getAccountName(getPlayerAccount(source))) ---- Acl
outputChatBox ("#000000[ #ff0000Sistema #000000] #ffffff Agora Você #00ff00Possui #ffffffo #ffff00"..NomeTag,source,255,255,255,true)
else
outputChatBox ('#000000[ #ff0000Sistema #000000] #ffffff Voce Tem Que Estar na #ff0000Prefeitura Para Pegar o Porte',source,255,255,255,true)
end
end
addCommandHandler ( "comprarporte", trport )