Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 27/07/19 in all areas

  1. I guess you didn't check them otherwise you would have understood what I'm talking about. addEventHandler ( "onClientRender", g_Root, function() local x,y,z = getCameraMatrix() for player in pairs(nametags) do while true do if not isPedInVehicle(player) or isPedDead(player) then break end local vehicle = getPedOccupiedVehicle(player) local px,py,pz = getElementPosition ( vehicle ) local pdistance = getDistanceBetweenPoints3D ( x,y,z,px,py,pz ) if pdistance <= NAMETAG_DISTANCE then local sx,sy = getScreenFromWorldPosition ( px, py, pz+0.95, 0.06 ) if not sx or not sy then break end local scale = 1/(NAMETAG_SCALE * (pdistance / NAMETAG_DISTANCE)) local alpha = ((pdistance - NAMETAG_ALPHA_DISTANCE) / NAMETAG_ALPHA_DIFF) alpha = (alpha < 0) and NAMETAG_ALPHA or NAMETAG_ALPHA-(alpha*NAMETAG_ALPHA) scale = math.evalCurve(maxScaleCurve,scale) local textscale = math.evalCurve(textScaleCurve,scale) local textalpha = math.evalCurve(textAlphaCurve,alpha) local outlineThickness = NAMETAG_OUTLINE_THICKNESS*(scale) local r,g,b = 255,255,255 local team = getPlayerTeam(player) if team then r,g,b = getTeamColor(team) end local offset = (scale) * NAMETAG_TEXT_BAR_SPACE/2 dxDrawText ( getPlayerName(player), sx, sy - offset, sx, sy - offset, tocolor(r,g,b,textalpha), textscale*NAMETAG_TEXTSIZE, "default", "center", "bottom", false, false, false ) end break end end end ) And you can do the same like that: local playersUsingMic = {} local x, y = guiGetScreenSize ( ) local sx, sy = 1600, 900 function onStartVoiceChat() local myIndex = getMyValue(source) if (not myIndex or not playersUsingMic[myIndex]) then local p_id = getElementData (source, "ID") or "0" table.insert(playersUsingMic, {source, p_id}) end end addEventHandler("onClientPlayerVoiceStart", root, onStartVoiceChat) function onStopVoiceChat() local myIndex = getMyValue(source) if ( myIndex ) then table.remove(playersUsingMic, myIndex) end end addEventHandler("onClientPlayerVoiceStop", root, onStopVoiceChat) function drawText() if (#playersUsingMic > 0) then for i, v in ipairs(playersUsingMic) do local x, y, z = getElementPosition(v[1]) local x2, y2, z2 = getElementPosition(localPlayer) local distance = getDistanceBetweenPoints3D(x, y, z, x2, y2, z2) if (distance <= 15) then -- Your dx functions end end end end addEventHandler("onClientRender", root, drawText) function getMyValue(player) for i, v in ipairs(playersUsingMic) do if v[1] == player then return i end end end
    3 points
  2. 1 point
  3. 1 point
  4. put your scoreboard client code
    1 point
  5. Assim: function Vehicle2 (hitPlayer) if getElementType(hitPlayer) == "player" then if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(hitPlayer)), aclGetGroup("Mecanico")) then local vehicle = getPedOccupiedVehicle(hitPlayer) if vehicle and veh[hitPlayer] and vehicle == veh[hitPlayer] then destroyElement(veh[hitPlayer]) veh[hitPlayer] = nil else outputChatBox("Você não esta em um veículo", hitPlayer, 0, 0, 0) end end end end addEventHandler("onMarkerHit", Marker2, Vehicle2) Na função Vehicle1 você deve trocar Veh1 por veh[hitPlayer].
    1 point
  6. if getElementType(hitPlayer) == "player" then
    1 point
  7. Você não vai precisar de isElementWithinMarker no evento "onMarkerHit". Use hitPlayer em vez de player e veh[hitPlayer] em vez de vehicle, também verifique se o hitPlayer é um elemento player com getElementType. Além disso, o vehicle não está sendo adicionado na table 'veh' na função Vehicle1.
    1 point
  8. He probably meant this topic:
    1 point
  9. A linha 29 deve ficar assim: if ( isObjectInACLGroup ("user."..accName, aclGetGroup( GroupName ) ) ) then Sempre que for testar um script, deixei seu debug ativado com o comando /debugscript 3
    1 point
  10. setCameraTarget(player, player) re gondolsz ??
    1 point
  11. The first error (Expected vector3 at argument 4, got none) Line 99: dis2 = getDistanceBetweenPoints3D(x, y, z, x2, y2, z2) so variable x2 equals to none. You got x2, y2 and z2 variables right here: local x2, y2, z2 = getElementPosition(gates[key]["gate"]) So the problem is in your gates table A little advice: On the previous step you're making a loop: for key, value in ipairs(gates) do and you can replace gates[key]["gate"] with value.gate or value["gate"] and get the same result The second error is caused by previous one as the dis2 variable has no value.
    1 point
  12. Hola vengo a compartirles un pequeño gran proyecto en el cual estuve trabajando hace mucho tiempo y con el poco tiempo que pude fui adelantando y modificando fue creado a base de un concepto creado por uno de los lideres de la comunidad Insane Style Gamers RACE CONCEPT: https://imgur.com/KFp14Uc USERPANEL CONCEPT: https://imgur.com/I99yU9c Lo que logre hasta ahora
    1 point
×
×
  • Create New...