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

Wysłany: 2018-06-29, 16:08


bambuseeeek

LUA Developer.






Wiek: 24
Na forum: 3202 dni
Posty: 73
Nick w MP: tazu.

Piwa: 5

Respekt: 60,5

Witam, megafon dzia?a ale.

Jak wpisz? /meg sta? tutaj..........

to pojawia si? tylko [POLICJA] sta?!!

a nie ca?e zdanie.

a jak wpisez stac-tutaj

to juz wszystko okej

jakies porady?

kod to


function megafon(plrcmdmsg)
    if not msg then return end
    if getElementData(plr,'player:duty') == 'SAPD' then
        local posXposYposZ=getElementPosition(plr)
        local sphere=createColSphereposXposYposZ55)
        local nearbyPlayers=getElementsWithinColShape(sphere'player')
        destroyElement(sphere)
        for indexplayer in ipairsnearbyPlayers ) do
            outputChatBox('[POLICJA] Megafon: '..msg..'!'player2552550)
        end
    end
end
addCommandHandler('meg'megafon)


Postaw piwo autorowi tego posta
 

 
Więcej szczegółów
Wystawiono 1 piw(a):
Devvus
Wysłany: 2018-06-29, 16:15


Kalizman







Wiek: 23
Na forum: 3651 dni
Posty: 1394

Piwa: 4619

Respekt: 358,8
Respekt: 358,8Respekt: 358,8Respekt: 358,8Respekt: 358,8

Spr?buj tak
function megafon(plrcmd, ...)
    if not ... then return end
    if getElementData(plr,'player:duty') == 'SAPD' then
        local text table.concat({...}, "")
        local posXposYposZ=getElementPosition(plr)
        local sphere=createColSphereposXposYposZ55)
        local nearbyPlayers=getElementsWithinColShape(sphere'player')
        destroyElement(sphere)
        for indexplayer in ipairsnearbyPlayers ) do
            outputChatBox('[POLICJA] Megafon: '..text..'!'player2552550)
        end
    end
end
addCommandHandler('meg'megafon)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-06-29, 16:18


bambuseeeek

LUA Developer.






Wiek: 24
Na forum: 3202 dni
Posty: 73
Nick w MP: tazu.

Piwa: 5

Respekt: 60,5

"Kalizman" napisał/a:

Spr?buj tak
function megafon(plrcmd, ...)
    if not ... then return end
    if getElementData(plr,'player:duty') == 'SAPD' then
        local text table.concat({...}, "")
        local posXposYposZ=getElementPosition(plr)
        local sphere=createColSphereposXposYposZ55)
        local nearbyPlayers=getElementsWithinColShape(sphere'player')
        destroyElement(sphere)
        for indexplayer in ipairsnearbyPlayers ) do
            outputChatBox('[POLICJA] Megafon: '..text..'!'player2552550)
        end
    end
end
addCommandHandler('meg'megafon)


Dzia?a tylko, ?e automatycznie usuwa spacj? i pisze tak:

Sta?TutajPolicja

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-06-29, 16:30


NyAngel







Wiek: 22
Na forum: 3950 dni
Posty: 128
Nick w MP: NyAngel

Piwa: 556

Respekt: 86,8


        local text table.concat({...}, " ")


Zmie? na to i b?dzie dzia?a?!

Podpis
Postaw piwo autorowi tego posta
 

 
Więcej szczegółów
Wystawiono 1 piw(a):
bambuseeeek
Wysłany: 2018-06-29, 16:32


bambuseeeek

LUA Developer.






Wiek: 24
Na forum: 3202 dni
Posty: 73
Nick w MP: tazu.

Piwa: 5

Respekt: 60,5

"NyAngel" napisał/a:


        local text table.concat({...}, " ")


Zmie? na to i b?dzie dzia?a?!


Dzi?ki bardzo, leci piwko.

Postaw piwo autorowi tego posta
 

 
Tagi: megafon :: sapd.
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » Megafon w SAPD. 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