Olha, não é necessario usar trigger nessa situação, até por que da pra fazer usando apenas o server-side pois a maioria dessas funções são shared ou server-side, então, neste caso o server-side somente já resolve o problema, fiz um exemplo pra você ver, basta fazer com o restante, alias, nas output's eu alterei algumas coisas, por exemplo, você estava definindo 255, 255, 255 que no caso é branco e definindo a #hex no começo do código como #ffffff isso não tem necessidade pois você estava definindo 255,255,255 no parametro de r,g,b logo ela ira setar branco da mesma forma.
local markerWeapon = createMarker(2678.94214, -1430.34009, 15.25723, "cylinder", 1.5, 25, 25, 112, 200)
function mensagemMarker (thePlayer)
outputChatBox( "Teste.", thePlayer, 255, 255, 255, true)
end
addEventHandler( "onMarkerHit", markerWeapon, mensagemMarker )
function pegarAK (thePlayer)
local acc = getPlayerAccount(thePlayer)
if isObjectInACLGroup ( "user." ..getAccountName(acc), aclGetGroup ("WP")) then
if isElementWithinMarker (thePlayer, markerWeapon) then
if getPlayerMoney (thePlayer) >= 4000 then
takePlayerMoney (thePlayer, 4000)
giveWeapon (thePlayer, 30, 300)
outputChatBox( "Você comprou uma AK-47 com 300 munições.", thePlayer, 255, 255, 255, true)
else
outputChatBox( "Você não tem dinheiro suficiente para comprar.", thePlayer, 255, 0, 0, true)
end
else
outputChatBox( "Você não esta no mercado negro.", thePlayer, 255, 0, 0, true)
end
else
outputChatBox( "Você não tem acesso ao mercado negro.", thePlayer, 255, 0, 0, true)
end
end
addCommandHandler("ak", pegarAK)
@edit coloquei uma output pra avisar caso o jogador tente usar o comando e não esteja no marker.