Sou novo nessa parte sim, sou mais mapper e texturizador.
Então Não foi kk sou pessimo Mas estou aprendendo
Client:
local PanelGun = createMarker(1503.3000488281, -666.59997558594, 95.599998474121, 'cylinder', 1.5, 255, 255, 0, 170 ) function PanelGun( hitElement, matchingDimension ) -- define MarkerHit function for the handler local elementType = getElementType( hitElement ) -- get the hit element's type outputChatBox ( "#FF0000[BCR]#FFFFFF Compre Sua Arma", getRootElement(), 255, 0, 0, true ) end addEventHandler( "onMarkerHit", PanelGun, PanelGun ) -- attach onMarkerHit event to MarkerHit function
function dxGui addEventHandler("onClientRender", root, function() dxDrawLine(494 - 1, 98 - 1, 494 - 1, 552, tocolor(254, 254, 254, 108), 1, false) dxDrawLine(877, 98 - 1, 494 - 1, 98 - 1, tocolor(254, 254, 254, 108), 1, false) dxDrawLine(494 - 1, 552, 877, 552, tocolor(254, 254, 254, 108), 1, false) dxDrawLine(877, 552, 877, 98 - 1, tocolor(254, 254, 254, 108), 1, false) dxDrawRectangle(494, 98, 383, 454, tocolor(0, 0, 0, 149), false) dxDrawRectangle(494, 98, 383, 60, tocolor(255, 255, 255, 255), false) dxDrawText("Máfia Armas", 560, 108, 892, 148, tocolor(0, 0, 0, 254), 1.10, "bankgothic", "left", "top", false, false, false, false, false) dxDrawLine(508 - 1, 173 - 1, 508 - 1, 252, tocolor(249, 249, 249, 122), 1, false) dxDrawLine(861, 173 - 1, 508 - 1, 173 - 1, tocolor(249, 249, 249, 122), 1, false) dxDrawLine(508 - 1, 252, 861, 252, tocolor(249, 249, 249, 122), 1, false) dxDrawLine(861, 252, 861, 173 - 1, tocolor(249, 249, 249, 122), 1, false) dxDrawRectangle(508, 173, 353, 79, tocolor(0, 0, 0, 254), false) dxDrawText("Pistola 9MM - 2500R$", 518, 193, 817, 222, tocolor(255, 255, 255, 255), 0.90, "bankgothic", "left", "top", false, false, false, false, false) dxDrawLine(508 - 1, 290 - 1, 508 - 1, 369, tocolor(249, 249, 249, 122), 1, false) dxDrawLine(861, 290 - 1, 508 - 1, 290 - 1, tocolor(249, 249, 249, 122), 1, false) dxDrawLine(508 - 1, 369, 861, 369, tocolor(249, 249, 249, 122), 1, false) dxDrawLine(861, 369, 861, 290 - 1, tocolor(249, 249, 249, 122), 1, false) dxDrawRectangle(508, 290, 353, 79, tocolor(0, 0, 0, 254), false) dxDrawText("AK47 S/Coronha- 5000R$", 513, 317, 812, 346, tocolor(255, 255, 255, 255), 0.80, "bankgothic", "left", "top", false, false, false, false, false) dxDrawLine(508 - 1, 406 - 1, 508 - 1, 485, tocolor(249, 249, 249, 122), 1, false) dxDrawLine(861, 406 - 1, 508 - 1, 406 - 1, tocolor(249, 249, 249, 122), 1, false) dxDrawLine(508 - 1, 485, 861, 485, tocolor(249, 249, 249, 122), 1, false) dxDrawLine(861, 485, 861, 406 - 1, tocolor(249, 249, 249, 122), 1, false) dxDrawRectangle(508, 406, 353, 79, tocolor(0, 0, 0, 254), false) dxDrawText("AK47 c/Coronha- 15000R$", 513, 429, 812, 458, tocolor(255, 255, 255, 255), 0.77, "bankgothic", "left", "top", false, false, false, false, false) end )
function armas (_,state) if painel == true then if state == "down" then if isCursorOnElement(560, 108, 892, 148 ) then triggerServerEvent ("arma1", localPlayer) end end end end addEventHandler ("onClientClick", root, armas)
----------------------------
Server function arma1 () giveWeapon( source, 22, 999, true ) outputChatBox ('( #00ff00BCR#ffffff )#ffff00Voce Pegou a #00ff00Pistola !',source,255,255,255,true) end addEvent("arma1",true) addEventHandler ( "arma1", getRootElement(), arma1 ) -----------------------------------------------
Ainda não adicionei o takePlayerMoney estou apenas testando para ver se a arma vem no caso não ta nem existindo o marker de tão perdido que estou...
Alem de tudo ainda quero adicionar uma opção de acl pra Máfia mas nesse caso não é 100% necessario outra coisa se souber algum curso bom de .lua do youtube em portugues se conseguir me passar tambem ajudaria muito!