Jump to content

تصحيح كود


Recommended Posts

  
local blips = {} 
local blipSize = 1 
local blipDist = 65535 
local blipID = 59 
  
function makeBlip(plr) 
    if (not isElement(plr)) then return false end 
    if (not blips[plr]) then 
        local blip = createBlipAttachedTo(plr, blipID, blipSize, 0, 0, 0, 255, 0, blipDist) 
        blips[plr] = blip 
    end 
end 
  
function onQuit() 
    if (blips[source]) then 
        destroyElement(blips[source]) 
        blips[source] = nil 
    end 
end 
addEventHandler("onClientPlayerQuit", root, onQuit) 
  
function checkPlayers() 
    for c,d in pairs(getElementsByType("player")) do 
        if isElement(blips[d]) then destroyElement(blips[d]) 
        blips[d] = nil 
    end 
   return false  
 end 
  
        for index, player in ipairs ( getElementsByType ( "player" ) ) do 
          if ( localPlayer ~= player ) then 
            if ( getElementData ( player, "Group" ) == getElementData(localPlayer,"Group") ) then 
               makeBlip(player) 
             else 
             destroyElement(blips[player]) 
             blips[player] = nil 
            end 
        end 
     end 
end 
setTimer(checkPlayers, 5000, 0) 
  

وش الخطاء هون :?:

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...