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

Wysłany: 2014-06-22, 12:28


Maciąg







Wiek: 26
Na forum: 4376 dni
Posty: 211
Nick w MP: Dawirzo

Piwa: 149

Respekt: 31

Elo, witam :D Jak zrobi? czat, tak aby nie by? ci?gle globalny, tylko jak kto? napisze wiadomo?? to wy?wietla si? tylko nad nim + na czacie osobom, kt?re s? w pobli?u, prosz? o gotowy skrypt (najlepiej) lub o r??nego rodzaju pomoc :D
Stawiam piwo, nawet za dobre ch?ci :)

:piwo: :piwo:

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-06-22, 17:26


MeeShuffle

Programista/Grafik






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

Piwa: 8575

Respekt: 535,3
Respekt: 535,3

local chatRadius 50
 
function sendMessageToNearbyPlayers messagemessageType )
    if ( messageType == then
        local posXposYposZ getElementPosition source )
 
        local chatSphere createColSphere posXposYposZchatRadius )
        local nearbyPlayers getElementsWithinColShape chatSphere"player" )
 local idplayer getElementData source"playerid" )  
     destroyElement chatSphere )
 
        for indexnearbyPlayer in ipairsnearbyPlayers ) do
            local redgreenblue getPlayerNametagColor source )
            local nick getPlayerName source )
            --outputChatBox("["..tonumber(idplayer).."] "..nick..": #ffffff".. messagenearbyPlayerredgreenbluetrue )
            kontogetPlayerAccount source )
local idplayer getElementData source"playerid" )
        local rggetPlayerNametagColor(source)
    if isObjectInACLGroup  "user." .. getAccountName(getPlayerAccount(source)), aclGetGroup "Admin" ) ) and == 204 and == 255 and == 0 then
        cancelEvent ( )
        outputChatBox "#FFFF00["..tonumber(idplayer).."] #FFFF00ADMINISTRATOR #ffffff " .. getPlayerName source ) .. ":#FFFFFF " .. messagenearbyPlayerrgbtrue )
     elseif isObjectInACLGroup "user." .. getAccountName(getPlayerAccount(source)), aclGetGroup "RCON" ) ) and == 204 and == and == 0 then   
        cancelEvent ( )
        rggetPlayerNametagColor(source)
        outputChatBox "#FFFF00["..tonumber(idplayer).."] #CC0000RCON #ffffff" .. getPlayerName source ) .. ":#FFFFFF " .. messagenearbyPlayerrgbtrue )
        
        elseif isObjectInACLGroup "user." .. getAccountName(getPlayerAccount(source)), aclGetGroup "SSupport" ) ) and == 255 and == and == 255 then   
        cancelEvent ( )
        rggetPlayerNametagColor(source)
        outputChatBox "#ffffff["..tonumber(idplayer).."] #FF00FFSuper Support#ffffff " .. getPlayerName source ) .. ":#FFFFFF " .. messagenearbyPlayerrgbtrue )
        
        elseif isObjectInACLGroup "user." .. getAccountName(getPlayerAccount(source)), aclGetGroup "Support" ) ) and == 204 and == 102 and == 0 then   
        cancelEvent ( )
        rggetPlayerNametagColor(source)
        outputChatBox "#ffffff["..tonumber(idplayer).."] #CC6600Support#ffffff " .. getPlayerName source ) .. ":#FFFFFF " .. messagenearbyPlayerrgbtrue )
        
        
    elseif isObjectInACLGroup "user." .. getAccountName(getPlayerAccount(source)), aclGetGroup "VIP" ) ) then   
        cancelEvent ( )
        rggetPlayerNametagColor(source)
        outputChatBox "#FFFF00["..tonumber(idplayer).."] #FFFF00PREMIUM #ffffff|| " .. getPlayerName source ) .. ":#FFFFFF " .. messagenearbyPlayerrgbtrue )
        
    
        elseif isObjectInACLGroup "user." .. getAccountName(getPlayerAccount(source)), aclGetGroup "SzefPolicji" ) ) and type == and == and == and == 255 then   
        cancelEvent ( )
        rggetPlayerNametagColor(source)
        outputChatBox "#0000FF[ #ff0000Szef Policji#0000FF ]#FFFFFF " .. getPlayerName source ) .. ": " .. messagenearbyPlayerrgbtrue )
        
        elseif getAccountData konto"duty" then   
        cancelEvent ( )
        rggetPlayerNametagColor(source)
        outputChatBox "#ffffff["..tonumber(idplayer).."] #0000FFPolicja #FFFFFF " .. getPlayerName source ) .. ": " .. messagenearbyPlayerrgbtrue )
        
        elseif getAccountData konto"mechanik" then
        cancelEvent ( )
        rggetPlayerNametagColor(source)
        outputChatBox "#ffffff["..tonumber(idplayer).."] #663300Mechanik #FFFFFF|| " .. getPlayerName source ) .. ": " .. messagenearbyPlayerrgbtrue )
        
        elseif getAccountData konto"mduty" then
        cancelEvent ( )
        rggetPlayerNametagColor(source)
        outputChatBox "#ffffff["..tonumber(idplayer).."] #66CCFFDoktor #FFFFFF|| " .. getPlayerName source ) .. ": " .. messagenearbyPlayerrgbtrue )
        
                
        elseif getAccountData konto"nduty" then
        cancelEvent ( )
        rggetPlayerNametagColor(source)
        outputChatBox "#ffffff["..tonumber(idplayer).."] #990099Newser#FFFFFF|| " .. getPlayerName source ) .. ": " .. messagenearbyPlayerrgbtrue )
    
    elseif isObjectInACLGroup "user." .. getAccountName(getPlayerAccount(source)), aclGetGroup "Everyone" ) ) then   
        cancelEvent ( )
        rggetPlayerNametagColor(source)
        outputChatBox "#ffffff["..tonumber(idplayer).."]#ffffff Gracz " .. getPlayerName source ) .. ":#ffffff " .. messagenearbyPlayerrgbtrue )


        
        end
        end
        cancelEvent ( )
    end
end
addEventHandler "onPlayerChat"getRootElement(), sendMessageToNearbyPlayers )



W kodzie s? r??ne urozmaicenia, gdy? wzi?ty jest z mojego serwera.

Podpis

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

 
Wysłany: 2014-06-22, 17:32


Maciąg







Wiek: 26
Na forum: 4376 dni
Posty: 211
Nick w MP: Dawirzo

Piwa: 149

Respekt: 31

Mog? wykorzysta? ten kod do swojego serwera? Je?li tak to dzi?kuj? ! Mo?na zamkn?? :)

Podpis
Status prac nad Time to play RPG 25%
Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-06-22, 17:38


MeeShuffle

Programista/Grafik






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

Piwa: 8575

Respekt: 535,3
Respekt: 535,3

Maci?g, tak mo?esz, jednak nie zmieniaj tre?ci kodu i nie nadawaj Sobie autora.

Podpis

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

 
Tagi: czat
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






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