-
Posts
27 -
Joined
-
Last visited
Details
-
Gang
Programação.
-
Location
Rs.
-
Occupation
Trabalhar.
-
Interests
Aprender/Programação.
Recent Profile Visitors
538 profile views
Nakka Lindo's Achievements
Advanced Member (8/54)
0
Reputation
-
Como deixo o colete como está a vida?
Nakka Lindo replied to Nakka Lindo's topic in Programação em Lua
Obrigado consegui já!- 2 replies
-
- lua
- portuguese
-
(and 1 more)
Tagged with:
-
function Hud_() local colete = math.floor (getPedArmor (getLocalPlayer())); dxDrawImageSection(653, 354, 51, 51, 0, 0, 51, 51, 'assets/Circle.png', 360/100 * colete, 0, 0, tocolor(21, 4, 252, 255), false) end; addEventHandler('onClientRender', root, Hud_)
- 2 replies
-
- lua
- portuguese
-
(and 1 more)
Tagged with:
-
sound = {}; sound['veh'] = playSound(...) radioSound = { } addEventHandler("onClientResourceStart", resourceRoot, function() bindKey("R", "down", clientToggleRadio) end ) addEventHandler("onClientVehicleEnter", root, function(thePlayer, seat) if thePlayer == getLocalPlayer() then local msg = "Pressione 'R' Para Ligar a Rádio." if radioSound[source] == nil then outputChatBox(msg, 255, 255, 255) else if radioSound[source].soundElement == nil then outputChatBox(msg, 255, 255, 255) end end end end ) addEventHandler("onClientSoundStream", root, function(success, length, streamName) if streamName then local veh = getPedOccupiedVehicle(getLocalPlayer()) if veh then if radioSound[veh] == nil then return end if radioSound[veh].soundElement == source then end end end end ) addEventHandler("onClientSoundChangedMeta", root, function(streamTitle) if streamTitle then local veh = getPedOccupiedVehicle(getLocalPlayer()) if veh then if radioSound[veh] == nil then return end if radioSound[veh].soundElement == source then outputChatBox("#696969Música: #AA2222 " .. streamTitle, 255, 255, 255, true) end end end end ) addEvent("onServerToggleRadio", true) addEventHandler("onServerToggleRadio", getLocalPlayer(), function(toggle, url, veh, volume) if (sound['veh']) then -- Verificando se existe aquele som na tabela usando o identificador do som. stopSound(sound['veh']); -- Parando o som. sound['veh'] = nil; return end if toggle == true then local x, y, z = getElementPosition(veh) if radioSound[veh] ~= nil then if (sound['veh']) then -- Verificando se existe aquele som na tabela usando o identificador do som. stopSound(sound['veh']); -- Parando o som. sound['veh'] = nil; --local sound = playSound3D(url, x, y, z) sound['veh'] = playSound('som.mp3') if volume ~= nil then end setSoundMinDistance(sound, 6) setSoundMaxDistance(sound, 200) attachElements(sound, veh) radioSound[veh] = {} radioSound[veh].soundElement = sound else local sound = playSound3D(url, x, y, z) sound['veh'] = playSound('som.mp3') if volume ~= nil then end setSoundMinDistance(sound, 6) setSoundMaxDistance(sound, 200) attachElements(sound, veh) radioSound[veh] = {} radioSound[veh].soundElement = sound end else if radioSound[veh] ~= nil then if (sound['veh']) then -- Verificando se existe aquele som na tabela usando o identificador do som. stopSound(sound['veh']); -- Parando o som. sound['veh'] = nil; radioSound[veh].soundElement = nil end end end end end ) addEvent("onServerRadioURLChange", true) addEventHandler("onServerRadioURLChange", getLocalPlayer(), function(newurl, veh, volume) if radioSound[veh] ~= nil then if (sound['veh']) then -- Verificando se existe aquele som na tabela usando o identificador do som. stopSound(sound['veh']); -- Parando o som. sound['veh'] = nil; local x, y, z = getElementPosition(veh) --local sound = playSound3D(newurl, x, y, z) sound['veh'] = playSound('newurl.mp3') if volume ~= nil then end setSoundMinDistance(sound, 6) setSoundMaxDistance(sound, 200) attachElements(sound, veh) radioSound[veh] = {} radioSound[veh].soundElement = sound end end end ) addEvent("onServerVolumeChangeAccept", true) addEventHandler("onServerVolumeChangeAccept", getLocalPlayer(), function(veh, newVolume) if veh then if radioSound[veh] ~= nil then setSoundVolume(radioSound[veh].soundElement, newVolume) end end end ) function clientToggleRadio() triggerServerEvent("onPlayerToggleRadio", getLocalPlayer()) end
-
Erro linha 224, após eu adicionar esse função
Nakka Lindo replied to Nakka Lindo's topic in Programação em Lua
Arrumei ja obrigado. -
Erro linha 224, após eu adicionar esse função
Nakka Lindo replied to Nakka Lindo's topic in Programação em Lua
esse 'x' é do dxDrawBorderedText , preciso definir nil no usingChat -
dxDrawBorderedText(usingChat and 'Digitando...\ncargo' or 'cargo', tostring(cargo) , x - 1 - w / 2.6,y - 1 - h - 14, 0, 0, tocolor(255,255,255), 1.0,"default-bold")
-
-------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------- -- Configuração do painel lado cliente -- local NOME_Painel = "PANEL DE DROGAS" local NOME_SERVIDOR = "Brasil Zueira Insana" local cor_letras = tocolor(169, 169, 169, 255) --Obs.: Lembrando que algumas configuracoes devem ser repeitadas no lado do servidor !!! -------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------- local screenW,screenH = guiGetScreenSize() local resW, resH = 1365,767 local x, y = (screenW/resW), (screenH/resH) gridlist = guiCreateGridList(x*529, y*264, x*160, y*260, false) coluna = guiGridListAddColumn(gridlist, "Players", 0.9) guiSetVisible(gridlist, false) --pesquisarNick = guiCreateEdit(x*529, y*240, x*160, y*20, "", false) --guiSetVisible(pesquisarNick, false) nomeplayerv = getPlayerName(getLocalPlayer()) vendedorv = getPlayerFromName(nomeplayerv) vendedor = vendedorv painel_Drog = false function tag_Drog () dxDrawRectangle(x*514, y*191, x*381, y*400, tocolor(0, 0, 0, 225), false) dxDrawText("Selecione o player", x*527, y*244, x*689, y*234+20, tocolor(255, 255, 255, 255), x*1.00, "default", "center", "bottom", false, false, false, false, false) dxDrawText("Fazer Vendas", x*689, y*380, x*885, y*415, tocolor(255, 255, 255, 255), x*1.00, "default", "center", "bottom", false, false, false, false, false) dxDrawImage(x*685, y*190, x*200, y*200, "GFX/Traficante.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(x*755, y*445, x*45, y*35, "GFX/Lanca.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(x*755, y*480, x*45, y*45, "GFX/Maconha.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawRectangle(x*810, y*446, x*74, y*34, tocolor(36, 35, 35, isCursorOnElement(x*810, y*446, x*34, y*34) and 255 or 100), false) dxDrawText("Lança", x*699, y*448, x*885, y*480, cor_letras, x*1.00, "default-bold", "left", "center", false, false, false, false, false) dxDrawText("Vender", x*817, y*446, x*885, y*480, tocolor(255, 255, 255, 255), x*1.35, "default-bold", "left", "center", false, false, false, false, false) dxDrawRectangle(x*810, y*488, x*74, y*34, tocolor(36, 35, 35, isCursorOnElement(x*810, y*488, x*34, y*34) and 255 or 100), false) dxDrawText("Maconha", x*699, y*525, x*885, y*480, cor_letras, x*1.00, "default-bold", "left", "center", false, false, false, false, false) dxDrawText("Vender", x*817, y*530, x*885, y*480, tocolor(255, 255, 255, 255), x*1.35, "default-bold", "left", "center", false, false, false, false, false) dxDrawText(NOME_SERVIDOR, x*524, y*548, x*885, y*565, tocolor(255, 255, 255, 255), x*1.00, "default", "center", "top", false, false, false, false, false) end function abrir () --<<++-- if painel_Drog == false then addEventHandler ("onClientRender", root, tag_Drog) painel_Drog = true --<<++-- showCursor (true) guiSetVisible(gridlist, true) playSoundFrontEnd(20) --guiSetVisible(pesquisarNick, true) else if painel_Drog == true then removeEventHandler ("onClientRender", root, tag_Drog) guiSetVisible(gridlist, false) painel_Drog = false --<<++-- showCursor (false) playSoundFrontEnd(20) --guiSetVisible(pesquisarNick, false) end end end addEvent (NOME_Painel,true) --<<++-- addEventHandler (NOME_Painel,root,abrir) --<<++-- function X () if painel_Drog == true then if ( isCursorOnElement (x*855, y*170, x*40, y*42) ) then removeEventHandler("onClientRender", root, tag_Drog) guiSetVisible(gridlist, false) showCursor (false) painel_Drog = false playSoundFrontEnd(20) end end end addEventHandler ("onClientClick", root, X) function Actualizar() guiGridListClear(gridlist) for index, player in ipairs(getElementsByType("player")) do FILA = guiGridListAddRow(gridlist) guiGridListSetItemText ( gridlist, FILA, coluna, (string.gsub ( getPlayerName(player), '#%x%x%x%x%x%x', '' ) or getPlayerName(player)), false, false) guiGridListSetItemData ( gridlist, FILA, coluna, getPlayerName(player)) end end addEventHandler("onClientPlayerJoin", getRootElement(), Actualizar) addEventHandler("onClientPlayerQuit", getRootElement(), Actualizar) addEventHandler("onClientPlayerChangeNick", getRootElement(), Actualizar) addEventHandler ("onClientResourceStart",getRootElement(), Actualizar) function pegarnick () if source == gridlist then local nomeplayer = guiGridListGetItemData(gridlist, guiGridListGetSelectedItem(gridlist), 1) local jogadorx = getPlayerFromName(nomeplayer) jogador = jogadorx end end addEventHandler ("onClientResourceStart", getRootElement(), pegarnick) addEventHandler ("onClientGUIClick", gridlist, pegarnick, false) addEventHandler("onClientPlayerJoin", getRootElement(), pegarnick) addEventHandler("onClientPlayerQuit", getRootElement(), pegarnick) addEventHandler("onClientPlayerChangeNick", getRootElement(), pegarnick) function add_dg1 (_,state) if painel_Drog == true then if state == "down" then if isCursorOnElement (x*810, y*446, x*74, y*34) then triggerServerEvent ("buyCrack001", getLocalPlayer(), jogador) playSoundFrontEnd(37) end end end end addEventHandler ("onClientClick", root, add_dg1) function money1_c ( ) triggerServerEvent ("money001", getLocalPlayer(), vendedor) end addEvent( "money1_c1", true ) addEventHandler( "money1_c1", root, money1_c ) function money2_c ( ) triggerServerEvent ("money002", getLocalPlayer(), vendedor) end addEvent( "money2_c2", true ) addEventHandler( "money2_c2", root, money2_c ) function add_dg2 (_,state) if painel_Drog == true then if state == "down" then if isCursorOnElement (x*810, y*488, x*74, y*34) then triggerServerEvent ("buyMaconha001", getLocalPlayer(), jogador) playSoundFrontEnd(37) end end end end addEventHandler ("onClientClick", root, add_dg2 ) 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 -------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------- -- Configuração do painel lado servidor -- local TAG_Drogas = "Gangues" local NOME_Painel = "PANEL DE DROGAS" local button = "f7" -- Botão para Abrir -- local nome_comando = "abrirdrogas" -- comando para abrir via t/ -- function infos_dro(player) outputChatBox("----------------------------------------------------------", player, 255, 255, 255) outputChatBox("* [F7] Gangs painel de venda", player, 255, 255, 255) outputChatBox("* /abrirdrogas Gangs painel de venda", player, 255, 255, 255) outputChatBox("* /aceitardroga", player, 255, 255, 255) outputChatBox("* /resetdrogas", player, 255, 255, 255) outputChatBox("* /drogaspen", player, 255, 255, 255) outputChatBox("* /getdrogas", player, 255, 255, 255) outputChatBox("* /lanca", player, 255, 255, 255) outputChatBox("* /maconha", player, 255, 255, 255) outputChatBox("----------------------------------------------------------", player, 255, 255, 255) end addCommandHandler ("drogas", infos_dro) -------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------- function painel_Drog(thePlayer) --<<++-- login = getAccountName(getPlayerAccount(thePlayer)) if isObjectInACLGroup("user."..login, aclGetGroup(TAG_Drogas)) then triggerClientEvent(thePlayer, NOME_Painel, getRootElement()) else end end addCommandHandler (nome_comando, painel_Drog) --<<++-- function onResStartlr() for index, player in ipairs(getElementsByType("player")) do bindKey(player, button , "down", painel_Drog) end end addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), onResStartlr) function onPlayerJoinlr() bindKey(source, button , "down", painel_Drog) --<<++-- end addEventHandler("onPlayerJoin", getRootElement(), onPlayerJoinlr) function cleanAlllr(player) for index, player in ipairs(getElementsByType("player")) do unbindKey(player, button , "down", painel_Drog) end end addEventHandler("onResourceStop", getResourceRootElement(getThisResource()), cleanAlllr) -------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------- function buyCrack001(jogador) local dinheiro = getPlayerMoney(jogador) if dinheiro >= 2500 + (getElementData(jogador, "p_noia") * 2500) then setElementData(jogador, "p_noia", getElementData(jogador, "p_noia") + 1) outputChatBox("[Vendedor]: Está aguardado confirmar a compra de 1 lança /aceitardroga !!!", jogador, 0, 255, 0) outputChatBox("[painelDG]: Voce vendeu drogas para jogador selecionado !!!", source, 0, 255, 0) else outputChatBox("[painelDG]: O comprador vai ficar sem grana para finalizar a compra !!!", source, 255, 0, 0) end end addEvent("buyCrack001", true) addEventHandler ( "buyCrack001", getRootElement(), buyCrack001) function buyMaconha1(jogador) local dinheiro = getPlayerMoney(jogador) if dinheiro >= 3000 + (getElementData(jogador, "p_laerva") * 3000) then setElementData(jogador, "p_laerva", getElementData(jogador, "p_laerva") + 1) outputChatBox("[Vendedor]: Está aguardado confirmar a compra de 1 Maconha /aceitardroga !!!", jogador, 0, 255, 0) outputChatBox("[painelDG]: Voce vendeu drogas para jogador selecionado !!!", source, 0, 255, 0) --triggerClientEvent ( jogador, "money1_c1", vendedor ) else outputChatBox("[Vendedor]: O comprador vai ficar sem grana para finalizar a compra !!!", source, 255, 0, 0) end end addEvent("buyMaconha001", true) addEventHandler ( "buyMaconha001", getRootElement(), buyMaconha1) -------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------- function money001(vendedor) givePlayerMoney ( vendedor, 2500 ) outputChatBox("[painelDG]: Voce vendeu e recebeu 2500 !!!", vendedor, 0, 255, 0) end addEvent("money001", true) addEventHandler ( "money001", getRootElement(), money001) function money002() givePlayerMoney ( vendedor, 3000 ) outputChatBox("[painelDG]: Voce vendeu e recebeu 3000 !!!", vendedor, 0, 255, 0) end addEvent("money002", true) addEventHandler ( "money002", getRootElement(), money002) -------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------- function buyDrogas(player, command) if command == "aceitardroga" then local dataCrack1 = getElementData(player, "p_noia") if dataCrack1 and tonumber(dataCrack1) > 0 then local dinheiro = getPlayerMoney(player) if dinheiro >= 2500 then local acc = getPlayerAccount(player) takePlayerMoney(player, 2500) setElementData(player, "p_noia", getElementData(player, "p_noia") - 1) setElementData(player, "noia", getElementData(player, "noia") + 1) setAccountData(acc, "noia", getElementData(player, "noia")) triggerClientEvent ( player, "money1_c1", player ) outputChatBox("[Vendedor]: Você comprou 1 unidade de lança", player, 0, 255, 0) else outputChatBox("[Vendedor]: Voce nao tem drogas a compra !!!", player, 255, 0, 0) end else outputChatBox("[Vendedor]: Voce nao tem drogas a compra !!!", player, 255, 0, 0) end end end addCommandHandler ("aceitardroga", buyDrogas) function buyDrogas2(player, command) if command == "aceitardroga" then local datalaerva1 = getElementData(player, "p_laerva") if datalaerva1 and tonumber(datalaerva1) > 0 then local dinheiro = getPlayerMoney(player) if dinheiro >= 3000 then local acc = getPlayerAccount(player) takePlayerMoney(player, 3000) setElementData(player, "p_laerva", getElementData(player, "p_laerva") - 1) setElementData(player, "laerva", getElementData(player, "laerva") + 1) setAccountData(acc, "laerva", getElementData(player, "laerva")) triggerClientEvent ( player, "money2_c2", player ) outputChatBox("[Vendedor]: Você comprou 1 unidade de Maconha", player, 0, 255, 0) else outputChatBox("[Vendedor]: Voce nao tem drogas a compra !!!", player, 255, 0, 0) end else outputChatBox("[Vendedor]: Voce nao tem drogas a compra !!!", player, 255, 0, 0) end end end addCommandHandler ("aceitardroga", buyDrogas2) -------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------- function reset_drogas(player) setElementData(player, "p_noia", 0) setElementData(player, "p_laerva", 0) setElementData(player, "noia", 0) setElementData(player, "laerva", 0) outputChatBox("[Vendedor]: Você resetou todas as drogas", player, 255, 0, 0) end addCommandHandler ("resetdrogas", reset_drogas) function getpendentes(player) local dataCrack2 = getElementData(player, "p_noia") local datalaerva2 = getElementData(player, "p_laerva") outputChatBox("[Vendedor]: Voce tem "..dataCrack2.." de Lança e "..datalaerva2.." de Maconha pendentes.", player, 255, 255, 255) end addCommandHandler ("drogaspen", getpendentes) function getdrogas(player) local dataCrack1 = getElementData(player, "noia") local datalaerva1 = getElementData(player, "laerva") outputChatBox("[Vendedor]: Voce tem "..dataCrack1.." de Lança e "..datalaerva1.." de Maconha.", player, 255, 255, 255) end addCommandHandler ("getdrogas", getdrogas) -------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------- function onResourceStart() local players = getElementsByType("player") for i, p in ipairs(players) do local sourceAccount = getPlayerAccount(p) if isGuestAccount(sourceAccount) then setElementData(p, "p_noia", 0) setElementData(p, "noia", 0) setElementData(p, "p_laerva", 0) setElementData(p, "laerva", 0) else if getAccountData(sourceAccount, "noia") then setElementData(p, "noia", getAccountData(sourceAccount, "noia")) end if getAccountData(sourceAccount, "laerva") then setElementData(p, "laerva", getAccountData(sourceAccount, "laerva")) end if not getAccountData(sourceAccount, "noia") and not getAccountData(sourceAccount, "laerva") then setElementData(p, "noia", 0) setElementData(p, "laerva", 0) end end end end addEventHandler("onResourceStart", resourceRoot, onResourceStart) function onPlayerLogin(_, theCurrentAccount) if getAccountData(theCurrentAccount, "noia") then setElementData(source, "noia", getAccountData(theCurrentAccount, "noia")) end if getAccountData(theCurrentAccount, "laerva") then setElementData(source, "laerva", getAccountData(theCurrentAccount, "laerva")) end end addEventHandler("onPlayerLogin", root, onPlayerLogin) function onPlayerJoin() setElementData(source, "p_noia", 0) setElementData(source, "noia", 0) setElementData(source, "p_laerva", 0) setElementData(source, "laerva", 0) end addEventHandler("onPlayerJoin", root, onPlayerJoin) Consegue ver o por que o vendedor não recebe a droga eo comprador não desconta o dinheiro.
-
------------- lado server ------------- function buyDrogas(player, command) if command == "aceitardroga" then local dataCrack1 = getElementData(player, "p_noia") if dataCrack1 and tonumber(dataCrack1) > 0 then local dinheiro = getPlayerMoney(player) if dinheiro >= 2500 then local acc = getPlayerAccount(player) takePlayerMoney(player, 2500) setElementData(player, "p_noia", getElementData(player, "p_noia") - 1) setElementData(player, "noia", getElementData(player, "noia") + 1) setAccountData(acc, "noia", getElementData(player, "noia")) triggerClientEvent ( "money1_c1", root ) outputChatBox("[Vendedor]: Você comprou 1 unidade de lança", player, 0, 255, 0) else outputChatBox("[Vendedor]: Voce nao tem drogas a compra !!!", player, 255, 0, 0) end else outputChatBox("[Vendedor]: Voce nao tem drogas a compra !!!", player, 255, 0, 0) end end end addCommandHandler ("aceitardroga", buyDrogas) function money001(vendedor) givePlayerMoney ( vendedor, 2500 ) outputChatBox("[painelDG]: Voce vendeu e recebeu 2500 !!!", vendedor, 0, 255, 0) end addEvent("money001", true) addEventHandler ( "money001", getRootElement(), money001) ---------------------- lado client ---------------------- local nomeplayerv = getPlayerName(getLocalPlayer()) local vendedorv = getPlayerFromName(nomeplayerv) vendedor = vendedorv function money1_c ( vendedor ) triggerServerEvent ("money001", getLocalPlayer(), vendedor) end addEvent( "money1_c1", true ) addEventHandler( "money1_c", root, money1_c ) -- "os triggerClientEvent e triggerServerEvent não estão se comunicando"
-
Era isso mesmo obrigado. Vou postar no correto na proxima.
-
local playerList = guiCreateGridList(0.80, 0.40, 0.15, 0.35, true) guiGridListAddColumn(playerList, "Player", 0.85) for _, player in ipairs(getElementsByType("player")) do guiGridListAddRow(playerList, getPlayerName(player)) end
-
function onClientRender1() local screenW, screenH = guiGetScreenSize() --[[Ful screen]] local vida = getElementHealth(localPlayer) -- Valor da vida do jogador local colete = getPedArmor(localPlayer) -- Valor do colete do jogador dxDrawRectangle(screenW * 0.4870, screenH * 0.4005, screenW * 0.0260, screenH * 0.0046, tocolor(0, 0, 0, 250), false)--VIDA dxDrawLine((screenW * 0.4870) - 1, (screenH * 0.4005) - 1, (screenW * 0.4870) - 1, screenH * 0.4051, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(screenW * 0.5130, (screenH * 0.4005) - 1, (screenW * 0.4870) - 1, (screenH * 0.4005) - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawLine((screenW * 0.4870) - 1, screenH * 0.4051, screenW * 0.5130, screenH * 0.4051, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(screenW * 0.5130, screenH * 0.4051, screenW * 0.5130, (screenH * 0.4005) - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawRectangle(screenW * 0.4870, screenH * 0.4005, screenW * 0.0260 * colete/100, screenH * 0.0046, tocolor(255, 255, 255, 255), false) dxDrawRectangle(screenW * 0.4870, screenH * 0.4074, screenW * 0.0260, screenH * 0.0046, tocolor(0, 0, 0, 250), false)--COLETE dxDrawLine((screenW * 0.4870) - 1, (screenH * 0.4074) - 1, (screenW * 0.4870) - 1, screenH * 0.4120, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(screenW * 0.5130, (screenH * 0.4074) - 1, (screenW * 0.4870) - 1, (screenH * 0.4074) - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawLine((screenW * 0.4870) - 1, screenH * 0.4120, screenW * 0.5130, screenH * 0.4120, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(screenW * 0.5130, screenH * 0.4120, screenW * 0.5130, (screenH * 0.4074) - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawRectangle(screenW * 0.4870, screenH * 0.4074, screenW * 0.0260 * vida/100, screenH * 0.0046, tocolor(100, 224, 0, 250), false) end Teria como deixar minha vida/colete mostrando só para os outros players?
-
function drawHPBar( x, y, v, d) if(v < 0.0) then v = 0.0 elseif(v > 100.0) then v = 100.0 end dxDrawRectangle(screenW * 0.4870, screenH * 0.4005, screenW * 0.0260, screenH * 0.0046, tocolor(0, 0, 0, 250), false) dxDrawRectangle(screenW * 0.4870, screenH * 0.4005, screenW * 0.0260, screenH * 0.0046, tocolor(255, 255, 255, 255), false) --[[VIDA]] end function drawArmourBar( x, y, v, d) if(v < 0.0) then v = 0.0 elseif(v > 100.0) then v = 100.0 end dxDrawRectangle(screenW * 0.4870, screenH * 0.4074, screenW * 0.0260, screenH * 0.0046, tocolor(0, 0, 0, 250), false) dxDrawRectangle(screenW * 0.4870, screenH * 0.4074, screenW * 0.0260, screenH * 0.0046, tocolor(100, 224, 0, 250), false) --[[COLETE]] end