Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2016-02-09, 19:25


BlackTen

LUA Dev.






Wiek: 28
Na forum: 4329 dni
Posty: 698

Piwa: 2080

Respekt: 157
Respekt: 157Respekt: 157

Witam, czy jest jakas funkcja na zrobienie dla gracza blipu? Czy musze lecie? z createBlipAttachtedTo?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-02-09, 19:39


#404







Wiek: 26
Na forum: 4771 dni
Posty: 1438

Piwa: 2512

Respekt: 833,5
Respekt: 833,5Respekt: 833,5

Ostrzeżeń: 60%
BlackTen, eem w?a?ciwie to w?a?nie tej funkcji co napisa?e? si? u?ywa, nie widz? jakiego? problemu w u?yciu jej. Nie rozumiesz czego? odno?nie u?ycia czy co?? Bo w tym momencie nie rozumiem Cie, je?eli tak to napisz a wyt?umaczymy.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-02-09, 20:08


MIKAELmta







Wiek: 24
Na forum: 3979 dni
Posty: 311

Piwa: 10617

Respekt: 355,3
Respekt: 355,3Respekt: 355,3Respekt: 355,3Respekt: 355,3

root getRootElement ()
color = { 0255}
players = {}
resourceRoot getResourceRootElement getThisResource () )

function onResourceStart resource )
      for idplayer in ipairsgetElementsByType "player" ) ) do
        if ( players[player] ) then
            createBlipAttachedTo player02players[source][1], players[source][2], players[source][3] )
        else
            createBlipAttachedTo player02color[1], color[2], color[3] )
        end
    end
end

function onPlayerSpawn spawnpoint )
    if ( players[source] ) then
        createBlipAttachedTo source02players[source][1], players[source][2], players[source][3] )
    else
        createBlipAttachedTo source02color[1], color[2], color[3] )
    end
end

function onPlayerQuit ()
    destroyBlipsAttachedTo source )
end

function onPlayerWasted totalammokillerkillerweapon )
    destroyBlipsAttachedTo source )
end

function setBlipsColor sourcecommandNamerg)
    if ( tonumber ) ) then
        color = { tonumber ), tonumber ), tonumber ) }
          for idplayer in ipairsgetElementsByType "player" ) ) do
            destroyBlipsAttachedTo player )
            if ( players[player] ) then
                createBlipAttachedTo player02players[source][1], players[source][2], players[source][3] )
            else
                createBlipAttachedTo player02color[1], color[2], color[3] )
            end
        end
    end
end

function setBlipColor sourcecommandNamerg)
    if ( tonumber ) ) then
        destroyBlipsAttachedTo source )
        players[source] = { tonumber ), tonumber ), tonumber ) }
          createBlipAttachedTo source02players[source][1], players[source][2], players[source][3] )
    end
end

addCommandHandler "setblipscolor"setBlipsColor )
addCommandHandler "setblipcolor"setBlipColor )
addEventHandler "onResourceStart"resourceRootonResourceStart )
addEventHandler "onPlayerSpawn"rootonPlayerSpawn )
addEventHandler "onPlayerQuit"rootonPlayerQuit )
addEventHandler "onPlayerWasted"rootonPlayerWasted )

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


o.0
O g?ry zmieniasz kolor.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-02-10, 15:42


BlackTen

LUA Dev.






Wiek: 28
Na forum: 4329 dni
Posty: 698

Piwa: 2080

Respekt: 157
Respekt: 157Respekt: 157

Ja nie chce YWG bo robie WG, wi?c si? pytam, a nie prosz? o gotowca...

Postaw piwo autorowi tego posta
 

 
Tagi: blip
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi

Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Dodaj temat do Ulubionych
Wersja do druku