TRtam

Members
  • Content Count

    65
  • Joined

  • Last visited

Community Reputation

28 Good

4 Followers

About TRtam

  • Rank
    Snitch

Recent Profile Visitors

2,067 profile views
  1. TRtam

    Draw ACL

    Este ejemplo dibuja cada acl con sus objetos, espero que te sirva: -- -- server -- function get(player) local result = {}; for i, acl in pairs(aclGroupList()) do result[i] = {name = aclGroupGetName(acl), objects = {}}; for object, name in pairs(aclGroupListObjects(acl)) do table.insert(result[i].objects, name); end end triggerClientEvent(player, "receive", resourceRoot, result); end addEvent("get", true); addEventHandler("get", resourceRoot, get); -- -- client -- local data = nil; function start() triggerServerEvent("get", resourceRoot, localPlayer); end addEventHandler("onClientResourceStart", resourceRoot, start); function receive(acls) data = acls; end addEvent("receive", true); addEventHandler("receive", resourceRoot, receive); function render() if not data then return; end local offset_y = 0; for i, value in pairs(data) do dxDrawText(value.name, 200, offset_y); offset_y = offset_y + 20; for i, object in pairs(value.objects) do dxDrawText(object, 220, offset_y); offset_y = offset_y + 20; end end end addEventHandler("onClientRender", root, render);
  2. Like this addEventHandler("onClientRender", root, function() local scoreboard_rows = {}; for i, player in pairs(getElementsByType("player")) do if not getPlayerTeam(player) then table.insert(scoreboard_rows, player); end end for i, team in pairs(getElementsByType("team")) do local team_players = getPlayersInTeam(team); if #team_players > 0 then table.insert(scoreboard_rows, team); for i, player in pairs(team_players) do table.insert(scoreboard_rows, player); end end end for i, row in pairs(scoreboard_rows) do if getElementType(row) == "player" then -- draw your dx stuff here elseif getElementType(row) == "team" then -- draw your dx stuff here end end end )
  3. I dont know the way that you are inserting the players to the scoreboard, but i will give you an example including teams: scoreboard_rows = {}; for i, player in pairs(getElementsByType("player")) do if not getPlayerTeam(player) then table.insert(scoreboard_rows, player); end end for i, team in pairs(getElementsByType("team")) do local team_players = getPlayersInTeam(team); if #team_players > 0 then table.insert(scoreboard_rows, team); for i, player in pairs(team_players) do table.insert(scoreboard_rows, player); end end end
  4. Did you give admin right to the scoreboard?
  5. TRtam

    Dx Rotation

    Cada dxDraw function tiene este argumento "postGUI" y la wiki dice que:
  6. TRtam

    Dx Rotation

    Probaste usando postGUI en la imagen que rota?
  7. This is the first idea that came to my mind, maybe is there more useful ways to do it. function someFunction() passwordVerify( password, hashedPassword, {}, function(matched) passVerificationComplete(matched, someOtherParam) end ) end function passVerificationComplete(matched, someOtherParam) if matched then outputDebugString(someOtherParam) -- passwords matched else -- passwords mismatch end end
  8. Maybe i misunderstood your problem, your problem is that you want to make the camera stay where the player died or not? If is it then the example i gave you above should work
  9. This should fix your problem, but you will need to reset the camera target to localPlayer when you spawn again. addEventHandler("onClientPreRender", root, function() if isPedDead(localPlayer) then setCameraMatrix(getCameraMatrix()); end end );
  10. https://wiki.multitheftauto.com/wiki/DxDrawCircle this function have a example to draw a rounded rectangle
  11. First draw the blur and then draw the UI
  12. Maybe this (Just change the intensity to whatever you want): // // blackwhite.fx // texture screenSource; float intensity = 0.5; sampler TextureSampler = sampler_state { Texture = <screenSource>; }; float4 PixelShaderFunction(float2 TextureCoordinate : TEXCOORD0) : COLOR0 { float4 color = tex2D(TextureSampler, TextureCoordinate); float value = (color.r + color.g + color.b) / 3 * intensity; color.r = value; color.g = value; color.b = value; return color; } technique BlackAndWhite { pass Pass1 { PixelShader = compile ps_2_0 PixelShaderFunction(); } } Or this: // // blackwhite.fx // texture screenSource; float intensity = 0; sampler TextureSampler = sampler_state { Texture = <screenSource>; }; float4 PixelShaderFunction(float2 TextureCoordinate : TEXCOORD0) : COLOR0 { float4 color = tex2D(TextureSampler, TextureCoordinate); float value = (color.r + color.g + color.b) / 3; color.r = value; color.g = value; color.b = value; return color * intensity; } technique BlackAndWhite { pass Pass1 { PixelShader = compile ps_2_0 PixelShaderFunction(); } }
  13. TRtam

    Atraer Jugador

    usando onClientRender con interpolateBetween deberias poder hacerlo
  14. TRtam

    Get fighting style

    Hmm creo que no, podrias usar setElementData para asignar el estilo de pelea a un jugador y usar getElementData para obtener ese estilo