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

Wysłany: 2014-10-11, 18:59


Maximerr

Programmer PHP, LUA






Wiek: 25
Na forum: 4427 dni
Posty: 548

Piwa: 1051

Respekt: 365,3
Respekt: 365,3Respekt: 365,3Respekt: 365,3Respekt: 365,3

Witam! Chcia?bym zrobi?, aby megafon by?o wida? tylko do 50 metr?w. Pomo?ecie, nakierujecie?

addCommandHandler("m",
    function(playercmd, ...)
        local accName getAccountName getPlayerAccount player ) )
     if isObjectInACLGroup ("user."..accNameaclGetGroup "FCMC" )) or isObjectInACLGroup ("user."..accNameaclGetGroup "FCFD" )) or isObjectInACLGroup ("user."..accNameaclGetGroup "FCSD" ))  then 
        local message table.concat({ ... }, " ")
        if #message > 0 then
                    outputChatBox("#5281B6MEGAFON>> #00FF09" .. message .. " #FFFFFF(( #BDC1BD" .. getPlayerName(player) .. " #FFFFFF))"v02550true)
            end
        end
    end)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-10-11, 19:13


MeeShuffle

Programista/Grafik






Wiek: 32
Na forum: 4394 dni
Posty: 2758
Nick w MP: Shuffle

Piwa: 8575

Respekt: 535,3
Respekt: 535,3

createColSphere

getElementsWithinColShape

Podpis

https://shufflecode.pl
Static Codes and Graphics - Join our discord!
Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-10-11, 19:17


Maximerr

Programmer PHP, LUA






Wiek: 25
Na forum: 4427 dni
Posty: 548

Piwa: 1051

Respekt: 365,3
Respekt: 365,3Respekt: 365,3Respekt: 365,3Respekt: 365,3

addCommandHandler("m",
    function(playercmd, ...)
        local accName getAccountName getPlayerAccount player ) )
     if isObjectInACLGroup ("user."..accNameaclGetGroup "FCMC" )) or isObjectInACLGroup ("user."..accNameaclGetGroup "FCFD" )) or isObjectInACLGroup ("user."..accNameaclGetGroup "FCSD" ))  then 
        local message table.concat({ ... }, " ")
        if #message > 0 then
        local xygetElementPosition(source)
        local chatCol createColSphere(x,y,z,50)
        local chatOdleglosc getElementsWithinColShape(chatCol)
        for keyvalue in ipairs(chatOdleglosc) do 
                    outputChatBox("#5281B6MEGAFON>> #00FF09" .. message .. " #FFFFFF(( #BDC1BD" .. getPlayerName(player) .. " #FFFFFF))"v02550true)
            end
        end
    end)
Co tu jest nie tak?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-10-11, 19:36


dudeks







Wiek: 31
Na forum: 6576 dni
Posty: 171

Piwa: 89

Respekt: 105,3
Respekt: 105,3

if #message > 0 then

zamie? na

if message then

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-10-11, 20:10


Maximerr

Programmer PHP, LUA






Wiek: 25
Na forum: 4427 dni
Posty: 548

Piwa: 1051

Respekt: 365,3
Respekt: 365,3Respekt: 365,3Respekt: 365,3Respekt: 365,3

Nie dzia?a.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-10-12, 09:26


Vike4562

LUA <3






Wiek: 28
Na forum: 4937 dni
Posty: 144
Nick w MP: Vike4562

Piwa: 32

Respekt: 61

Pierwsze co mi przysz?o do g?owy, to takie rozwi?zanie
addCommandHandler("m",
    function(playercmd, ...)
        local accName getAccountName getPlayerAccount player ) )
     if isObjectInACLGroup ("user."..accNameaclGetGroup "FCMC" )) or isObjectInACLGroup ("user."..accNameaclGetGroup "FCFD" )) or isObjectInACLGroup ("user."..accNameaclGetGroup "FCSD" ))  then 
        local message table.concat({ ... }, " ")
        if #message > 0 then
        for keyvalue in ipairs(getElementsByType("player")) do 
        local a,b,getElementPosition(getLocalPlayer())
        local d,e,getElementPosition(value)
        if getDistanceBetweenPoints3D(a,b,c,d,e,f) <= 100 then
               outputChatBox("#5281B6MEGAFON>> #00FF09" .. message .. " #FFFFFF(( #BDC1BD" .. getPlayerName(player) .. " #FFFFFF))"v02550true)
        end
        end
        end
    end)


Podpis
Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-10-12, 09:35


Maximerr

Programmer PHP, LUA






Wiek: 25
Na forum: 4427 dni
Posty: 548

Piwa: 1051

Respekt: 365,3
Respekt: 365,3Respekt: 365,3Respekt: 365,3Respekt: 365,3

addCommandHandler("m",
    function(playercmd, ...)
        local accName getAccountName getPlayerAccount player ) )
     if isObjectInACLGroup ("user."..accNameaclGetGroup "FCMC" )) or isObjectInACLGroup ("user."..accNameaclGetGroup "FCFD" )) or isObjectInACLGroup ("user."..accNameaclGetGroup "FCSD" ))  then 
        local message table.concat({ ... }, " ")
        if #message > 0 then
        for keyvalue in ipairs(getElementsByType("player")) do 
        local a,b,getElementPosition(player)
        local d,e,getElementPosition(value)
        if getDistanceBetweenPoints3D(a,b,c,d,e,f) <= 100 then
        outputChatBox("#5281B6MEGAFON>> #00FF09" .. message .. " #FFFFFF(( #BDC1BD" .. getPlayerName(player) .. " #FFFFFF))"v02550true)
        end
        end
        end
    end
end)

Przerobi?em troch?, ale nadal wywala wszystkim.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-10-12, 09:36


MeeShuffle

Programista/Grafik






Wiek: 32
Na forum: 4394 dni
Posty: 2758
Nick w MP: Shuffle

Piwa: 8575

Respekt: 535,3
Respekt: 535,3

x,y,getElementPosition gracz )
col createColSphere x,y,z50 )
gracze getElementsWithinColShape col"player" )

for _,v in ipairs gracze ) do


Kombinujecie jak ko? pod g?re.

Podpis

https://shufflecode.pl
Static Codes and Graphics - Join our discord!
Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-10-12, 09:45


Maximerr

Programmer PHP, LUA






Wiek: 25
Na forum: 4427 dni
Posty: 548

Piwa: 1051

Respekt: 365,3
Respekt: 365,3Respekt: 365,3Respekt: 365,3Respekt: 365,3



Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-10-12, 11:16


MeeShuffle

Programista/Grafik






Wiek: 32
Na forum: 4394 dni
Posty: 2758
Nick w MP: Shuffle

Piwa: 8575

Respekt: 535,3
Respekt: 535,3

Niech zgadn?, skopiowa?e? na pa???

Podpis

https://shufflecode.pl
Static Codes and Graphics - Join our discord!
Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-10-12, 13:00


Maximerr

Programmer PHP, LUA






Wiek: 25
Na forum: 4427 dni
Posty: 548

Piwa: 1051

Respekt: 365,3
Respekt: 365,3Respekt: 365,3Respekt: 365,3Respekt: 365,3

niee ;D

[ Dodano: 2014-10-13, 22:26 ]
Jakie? pomys?y?

Postaw piwo autorowi tego posta
 

 
Tagi: czat :: kilku :: metrów
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