0 Üye ve 1 Ziyaretçi konuyu incelemekte.
function onPlayerSpawn ( spawnpoint ) --creates blip for player on team join local team = getPlayerTeam (source) if (team == teamMexicans) then createBlipAttachedTo ( source, 0) end end function onPlayerSpawn ( spawnpoint ) --creates blip for player on team join local team = getPlayerTeam (source) if (team == teamBorderControl) then createBlipAttachedTo ( source, 0) end end blips = getElementsByType ( "blip" ) --sets blip colour for blipKey, blipValue in ipairs(blips) do red, green, blue, alpha = getBlipColor ( blipValue ) local team = getPlayerTeam (source) if (team == teamMexicans) then setBlipColor ( blipValue, 255, 0, 0, 255 ) end end function onPlayerQuit () destroyBlipsAttachedTo ( source ) end function onPlayerWasted ( totalammo, killer, killerweapon ) destroyBlipsAttachedTo ( source ) end addCommandHandler ( "setblipscolor", setBlipsColor ) addCommandHandler ( "setblipcolor", setBlipColor ) addEventHandler ( "onResourceStart", resourceRoot, onResourceStart ) addEventHandler ( "onPlayerSpawn", root, onPlayerSpawn ) addEventHandler ( "onPlayerQuit", root, onPlayerQuit ) addEventHandler ( "onPlayerWasted", root, onPlayerWasted ) function destroyBlipsAttachedTo(player) local attached = getAttachedElements ( player ) if ( attached ) then for k,element in ipairs(attached) do if getElementType ( element ) == "blip" then destroyElement ( element ) end end end end
function blipIslem() local oyuncular = getElementsByType("player") local localtakim = getPlayerTeam(localPlayer) for i=1,#oyuncular do local oyuncu = oyuncular[i] local elementler = getAttachedElements(oyuncu) local takim = getPlayerTeam(oyuncu) for _,elm in pairs(elementler) do if isElement(elm) and getElementType(elm) == "blip" and oyuncu ~= localPlayer then local r,g,b = getBlipColor(elm) if takim then if takim == localtakim then setBlipColor(elm,r,g,b,255) else setBlipColor(elm,r,g,b,0) end else setBlipColor(elm,r,g,b,0) end end end end setTimer(blipIslem,1000,1)endblipIslem()
clientKodfunction blipIslem() local oyuncular = getElementsByType("player") local localtakim = getPlayerTeam(localPlayer) for i=1,#oyuncular do local oyuncu = oyuncular[i] local elementler = getAttachedElements(oyuncu) local takim = getPlayerTeam(oyuncu) for _,elm in pairs(elementler) do if isElement(elm) and getElementType(elm) == "blip" and oyuncu ~= localPlayer then local r,g,b = getBlipColor(elm) if takim then if takim == localtakim then setBlipColor(elm,r,g,b,255) else setBlipColor(elm,r,g,b,0) end else setBlipColor(elm,r,g,b,0) end end end end setTimer(blipIslem,1000,1)endblipIslem()
local blips = {}addEventHandler('onPlayerJoin', root,function() local r, g, b = math.random(50, 255), math.random(50, 255), math.random(50, 255) blips[source] = createBlipAttachedTo(source, 0, 2, r, g, b)end)addEventHandler("onPlayerQuit", root, function() if blips[source] then destroyElement(blips[source]) blips[source] = nil endend)
serverKodlocal blips = {}addEventHandler('onPlayerJoin', root,function() local r, g, b = math.random(50, 255), math.random(50, 255), math.random(50, 255) blips[source] = createBlipAttachedTo(source, 0, 2, r, g, b)end)addEventHandler("onPlayerQuit", root, function() if blips[source] then destroyElement(blips[source]) blips[source] = nil endend)
attığım iki kodu aynı/farklı scirptlerde çalıştır