Basiun Posted January 17, 2019 Share Posted January 17, 2019 (edited) Olá pessoal, bem eu preciso de uma ajuda para finalizar o meu script da minha agencia de empregos, já fiz o ate o painel, agora preciso de ajuda para quando o player clicar na profissão marcar no minimap o local da profissão para ir ate la e pegar ela... Se poder postar somente os passos do que falta agradeço, pois somente praticando que se aprende. E se tiver dicas do que colocar para deixar mais completo é de grande ajuda hehe. Edited January 17, 2019 by Basiun Link to comment
DNL291 Posted January 17, 2019 Share Posted January 17, 2019 Mostre como está seu código, será melhor pois indicaremos nele aonde adicionar as funções. Mas com base no que você disse, você irá precisar destas funções: createBlip createMarker "onMarkerHit" ou "onClientMarkerHit" Link to comment
Basiun Posted January 17, 2019 Author Share Posted January 17, 2019 function empregos () dxDrawLine(637 - 1, 149 - 1, 637 - 1, 716, tocolor(254, 254, 254, 207), 1, false) dxDrawLine(1025, 149 - 1, 637 - 1, 149 - 1, tocolor(254, 254, 254, 207), 1, false) dxDrawLine(637 - 1, 716, 1025, 716, tocolor(254, 254, 254, 207), 1, false) dxDrawLine(1025, 716, 1025, 149 - 1, tocolor(254, 254, 254, 207), 1, false) dxDrawRectangle(637, 149, 388, 567, tocolor(0, 0, 0, 134), false) dxDrawText("Profissões", 677, 153, 988, 219, tocolor(255, 255, 255, 255), 3.00, "pricedown", "center", "top", false, false, false, false, false) dxDrawLine(677 - 1, 252 - 1, 677 - 1, 281, tocolor(195, 195, 195, 141), 1, false) dxDrawLine(988, 252 - 1, 677 - 1, 252 - 1, tocolor(195, 195, 195, 141), 1, false) dxDrawLine(677 - 1, 281, 988, 281, tocolor(195, 195, 195, 141), 1, false) dxDrawLine(988, 281, 988, 252 - 1, tocolor(195, 195, 195, 141), 1, false) dxDrawRectangle(677, 252, 311, 29, tocolor(0, 0, 0, 175), false) dxDrawLine(677 - 1, 291 - 1, 677 - 1, 320, tocolor(195, 195, 195, 148), 1, false) dxDrawLine(988, 291 - 1, 677 - 1, 291 - 1, tocolor(195, 195, 195, 148), 1, false) dxDrawLine(677 - 1, 320, 988, 320, tocolor(195, 195, 195, 148), 1, false) dxDrawLine(988, 320, 988, 291 - 1, tocolor(195, 195, 195, 148), 1, false) dxDrawRectangle(677, 291, 311, 29, tocolor(0, 0, 0, 175), false) dxDrawLine(677 - 1, 330 - 1, 677 - 1, 359, tocolor(191, 191, 191, 148), 1, false) dxDrawLine(988, 330 - 1, 677 - 1, 330 - 1, tocolor(191, 191, 191, 148), 1, false) dxDrawLine(677 - 1, 359, 988, 359, tocolor(191, 191, 191, 148), 1, false) dxDrawLine(988, 359, 988, 330 - 1, tocolor(191, 191, 191, 148), 1, false) dxDrawRectangle(677, 330, 311, 29, tocolor(0, 0, 0, 175), false) dxDrawText("Entregador De Jornal Level 0", 684, 257, 983, 275, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, false, false, false) dxDrawText("Entregador De Pizza Level 5", 683, 296, 982, 314, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, false, false, false) dxDrawText("Petroleiro Level 10", 683, 335, 982, 353, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, false, false, false) dxDrawText("", 654, 677, 654, 677, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, false, false, false) dxDrawText("www.gbgp.com.br", 655, 690, 1006, 702, tocolor(255, 255, 255, 255), 1.00, "bankgothic", "center", "top", false, false, false, false, false) dxDrawText("Aperte X para fechar!", 647, 672, 1015, 687, tocolor(255, 255, 255, 255), 1.00, "default", "center", "top", false, false, false, false, false) end function abrirpainel () if painel == false then addEventHandler ("onClientRender", root, empregos) showCursor (true) painel = true playSoundFrontEnd(7) end end addEvent ("open", true) addEventHandler ("open", root, abrirpainel) function fecharpainel () if painel == true then removeEventHandler ("onClientRender", root, empregos) showCursor (false) painel = false playSoundFrontEnd(7) end end addEvent ("fecharpainel", true) bindKey ("x", "down", fecharpainel) local x,y = guiGetScreenSize() function isCursorOnElement(x,y,w,h) local mx,my = getCursorPosition () local fullx,fully = guiGetScreenSize() cursorx,cursory = mx*fullx,my*fully if cursorx > x and cursorx < x + w and cursory > y and cursory < y + h then return true else return false end end 1 Link to comment
Other Languages Moderators Lord Henry Posted January 17, 2019 Other Languages Moderators Share Posted January 17, 2019 Indente seu código com tabulações. E vc vai precisar da função onClientClick. Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now