Jump to content

por q no me crea el blip


AlvareZ_

Recommended Posts

Posted

Tenes un script para que haga eso?

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

Los blips no son automaticos, los tenes que crear vos, el MTA trae un recurso llamado "playerblips", probalo.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

Podrias editar el script y agregarle para que use el color del team.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

tengo esto pero me lo crea en verde igual

local playerBlipRoot = createElement("playerBlipRoot", "playerBlipRoot") 
  
local function resourceStart() 
    for _, player in ipairs(getElementsByType("player")) do 
        if player ~= localPlayer then 
            local r, g, b = getTeamColor(playerTeam) 
            local blip = createBlipAttachedTo(playerTeam, 0, 2, r, g, b, 255, 1) 
            setElementParent(blip, playerBlipRoot) 
        end 
    end 
end 
addEventHandler("onClientResourceStart", root, resourceStart) 
  
local function playerJoin() 
    local r, g, b = getTeamColor(source) 
    local blip = createBlipAttachedTo(source, 0, 2, r, g, b, 255, 1) 
    setElementParent(blip, playerBlipRoot) 
    setTimer(updateBlipColor, 5000, 1, blip) --Upadate in 5 seconds, in case the server sets the color. 
end 
addEventHandler("onClientPlayerJoin", root, playerJoin) 
  
--This function destroys a players blip when they quit. 
local function playerQuit() 
    for _, blip in ipairs(getElementChildren(playerBlipRoot)) do 
        if getElementAttachedTo(blip) == source then 
            destroyElement(blip) 
        end 
    end 
end 
addEventHandler("onClientPlayerQuit", root, playerQuit) 
  

bandera_de_Venezuela.png

Posted

Sera porque "playerTeam" no esta definido en ninguna parte? y ademas en "playerJoin" usas "source" en lugar de un team?

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

ahora tengo esto:

local playerBlipRoot = createElement("playerBlipRoot", "playerBlipRoot") 
local playerTeam = getPlayerTeam ( source ) 
  
--This function creates blips for all players when the resource starts. 
local function resourceStart() 
    for _, player in ipairs(getElementsByType("player")) do 
           if ( playerTeam ) then 
            local r, g, b = getTeamColor(playerTeam) 
            local blip = createBlipAttachedTo(playerTeam, 0, 2, r, g, b, 255, 1) 
            setElementParent(blip, playerBlipRoot) 
            end 
        end 
    end 
end 
addEventHandler("onClientResourceStart", root, resourceStart) 
  
--This function creates a blip for new players when they join. 
local function playerJoin() 
    local r, g, b = getTeamColor(playerTeam) 
    local blip = createBlipAttachedTo(playerTeam, 0, 2, r, g, b, 255, 1) 
    setElementParent(blip, playerBlipRoot) 
    setTimer(updateBlipColor, 5000, 1, blip) --Upadate in 5 seconds, in case the server sets the color. 
end 
addEventHandler("onClientPlayerJoin", root, playerJoin) 
  
--This function destroys a players blip when they quit. 
local function playerQuit() 
    for _, blip in ipairs(getElementChildren(playerBlipRoot)) do 
        if getElementAttachedTo(blip) == source then 
            destroyElement(blip) 
        end 
    end 
end 
addEventHandler("onClientPlayerQuit", root, playerQuit) 

bandera_de_Venezuela.png

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...