Jump to content

التعديل بالرمز


Recommended Posts

ألـسلام عليكم ورحمة الله

كيفكم اخـوأني

بكل اختصار هذا كودي لاخفاء العلامة المحددة رقمها بالاسفل عند الخروج من تيم المحدد

باختصار تدمير رمز رقم [40] ب

[Mfls3] عند خروجة من تيم

  
function pilotBlip (modelID) 
    local blip = getElementsByType("blip") 
    for i,v in ipairs(blip) do 
if getPlayerTeam(v) == getTeamName ("Mfls3") then 
        if (getElementModel(v) == modelID) then 
            destroyElement(v) 
        end 
    end 
end 
  
pilotBlip (40) 
  

Edited by Guest
Link to comment

هذي آسهل

setElementVisibleTo 

لكن تفضل

function DestroyBlip ( id, team ) 
    if id ~= "" and team ~= "" and tonumber ( id ) and team then 
        for k,v in ipairs ( getElementsByType ( "player" ) ) do 
            if getPlayerTeam ( v ) ~= getTeamFromName ( team ) then 
                for _,Blips in ipairs ( getElementsByType ("blip")) do 
                    if getBlipIcon ( Blips ) == id then 
                        if isElement ( Blips ) then  
                            destroyElement ( Blips ) 
                        end 
                    end 
                end 
            end 
        end 
    end 
end 
  
-- Example  
  
addCommandHandler ( "DestroyBlips", 
function ( player, cmd, id, team ) 
    if id and team then 
        DestroyBlip ( id, team ) 
        outputChatBox ( getPlayerName ( player ).." Destroy Blips ", root, 128, 128, 0 ) 
    end 
end) 

Link to comment
  
function DestroyBlip ( id, team ) 
    if id ~= "" and team ~= "" and tonumber ( id ) and team then 
        for k,v in ipairs ( getElementsByType ( "player" ) ) do 
            if getPlayerTeam ( v ) ~= getTeamFromName ( mFlS3 ) then 
                for _,Blips in ipairs ( getElementsByType ("blip")) do 
                    if getBlipIcon ( Blips ) == 41 then 
                        if isElement ( Blips ) then 
                            destroyElement ( Blips ) 
                        end 
                    end 
                end 
            end 
        end 
    end 
end 
  

Link to comment
هذي آسهل
setElementVisibleTo 

لكن تفضل

function DestroyBlip ( id, team ) 
    if id ~= "" and team ~= "" and tonumber ( id ) and team then 
        for k,v in ipairs ( getElementsByType ( "player" ) ) do 
            if getPlayerTeam ( v ) ~= getTeamFromName ( team ) then 
                for _,Blips in ipairs ( getElementsByType ("blip")) do 
                    if getBlipIcon ( Blips ) == id then 
                        if isElement ( Blips ) then  
                            destroyElement ( Blips ) 
                        end 
                    end 
                end 
            end 
        end 
    end 
end 
  
-- Example  
  
addCommandHandler ( "DestroyBlips", 
function ( player, cmd, id, team ) 
    if id and team then 
        DestroyBlip ( id, team ) 
        outputChatBox ( getPlayerName ( player ).." Destroy Blips ", root, 128, 128, 0 ) 
    end 
end) 

لاتعدل عالكود الي فوق -_-

اذا تبي تحذفها

DestroyBlip ( 40, Mfls3 )

الكود الي فوق لاتجيه

Link to comment

مافيه حدث لما يخرج من تيم

او يغير تيمه باللعبه

لكن هذا مسويه واحد حدث لما يتغير التيم

    _setPlayerTeam = setPlayerTeam 
      
    addEvent( "onPlayerChangeTeam", true ) 
      
    function setPlayerTeam ( thePlayer, theTeam ) 
        if not thePlayer or not theTeam then return false end 
        local oldTeam = getPlayerTeam( thePlayer ) 
        triggerEvent ( "onPlayerChangeTeam", thePlayer, theTeam, oldTeam ) 
        return _setPlayerTeam ( thePlayer, theTeam ) 
    end 
      
    addEventHandler ( "onPlayerChangeTeam", root, 
        function ( theNewTeam, theOldTeam ) 
            local teamName = getTeamName( theNewTeam ) 
            if teamName ~= "Criminal" then 
                destroyElement ( robhouseMarker ) 
                destroyElement ( robhouseBlip ) 
            end 
        end 
    ) 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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