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

Wysłany: 2016-12-19, 20:04


OskarYT

Mapper MTA






Wiek: 26
Na forum: 4245 dni
Posty: 267
Nick w MP: Kaczorek2306

Piwa: 1230

Respekt: 85,3

function globalMessage(thePlayercmd, ...)
    local message table.concat ( { ... }, " " )
    local name getPlayerName(thePlayer)
    outputChatBox("#FFFFFF"..name..": #aaaaaa"..messagegetRootElement(), 255255255true)
    end
addCommandHandler("genel"globalMessage)


function Tags (mensajetipo)
    local cuenta getAccountName(getPlayerAccount(source))
    local nombre getPlayerName(source)
    
    if isObjectInACLGroup("user."..cuentaaclGetGroup("Admin")) then
        cancelEvent()
        local rggetPlayerNametagColor(source)
        outputChatBox("#FF0000[Admin] "..nombre..": #00FF00"..mensajegetRootElement(), rgbtrue)
        outputServerLog("[Admin] "..nombre..": "..mensaje)
    
    elseif isObjectInACLGroup("user."..cuentaaclGetGroup("SuperModerator")) then
        cancelEvent()
        local rggetPlayerNametagColor(source)
        outputChatBox("#FF0000[SuperModerator] "..nombre..": #00FF00"..mensajegetRootElement(), rgbtrue)
        outputServerLog("[SuperModerator] "..nombre..": "..mensaje)
    
    elseif isObjectInACLGroup("user."..cuentaaclGetGroup("Moderator")) then
        cancelEvent()
        local rggetPlayerNametagColor(source)
        outputChatBox("#FF0000[Moderator] "..nombre..": #00FF00"..mensajegetRootElement(), rgbtrue)
        outputServerLog("[Moderator] "..nombre..": "..mensaje)
    end
end
addEventHandler("onPlayerChat"getRootElement(), Tags)


Tutaj jest skrypt na chat globalny, ale nie dzia?a jestem ?wiadom ?e ten skrypt nie dzia?a ale nie mam poj?cia jak go naprawi? aby na globalu by?y tagi przed nickami prosz? o przerobienie tego skryptu jak to mo?liwe. Z g?ry dzi?kuje, za dobr? i szybko pomoc daje respekt i zimne piwko !

Podpis
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-12-19, 20:18


Dexnes_

Tiger






Wiek: 26
Na forum: 4401 dni
Posty: 620
Nick w MP: Dexnes

Piwa: 1394

Respekt: 390
Respekt: 390Respekt: 390Respekt: 390Respekt: 390

Do przerobienia skrypt?w jest odpowiedni dzia? , zg?o? si? tam je?eli oczekujesz gotowy kod.

< KLIK >

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-12-19, 20:18


OskarYT

Mapper MTA






Wiek: 26
Na forum: 4245 dni
Posty: 267
Nick w MP: Kaczorek2306

Piwa: 1230

Respekt: 85,3

BlackGamePL, Oczekuje na gotowy b?dz jak?? pomoc ..

Podpis
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-12-19, 21:18


marcin778

Krytyk serwerów MTA






Wiek: 24
Na forum: 4149 dni
Posty: 2268
Nick w MP: Marcineg

Piwa: 4662

Respekt: 1436,8
Respekt: 1436,8

function Tags (mensajetipo)
    local cuenta getAccountName(getPlayerAccount(source))
    local nombre getPlayerName(source)
    local mensaje table.concat( { ... }, " ")

    
    if isObjectInACLGroup("user."..cuentaaclGetGroup("Admin")) then
        cancelEvent()
        local rggetPlayerNametagColor(source)
        outputChatBox("#FF0000[Admin] "..nombre..": #00FF00"..mensajegetRootElement(), rgbtrue)
        outputServerLog("[Admin] "..nombre..": "..mensaje)
    
    elseif isObjectInACLGroup("user."..cuentaaclGetGroup("SuperModerator")) then
        cancelEvent()
        local rggetPlayerNametagColor(source)
        outputChatBox("#FF0000[SuperModerator] "..nombre..": #00FF00"..mensajegetRootElement(), rgbtrue)
        outputServerLog("[SuperModerator] "..nombre..": "..mensaje)
    
    elseif isObjectInACLGroup("user."..cuentaaclGetGroup("Moderator")) then
        cancelEvent()
        local rggetPlayerNametagColor(source)
        outputChatBox("#FF0000[Moderator] "..nombre..": #00FF00"..mensajegetRootElement(), rgbtrue)
        outputServerLog("[Moderator] "..nombre..": "..mensaje)
    end
end
addEventHandler("onPlayerChat"getRootElement(), Tags)


Podpis
Moje prace: https://www.youtube.com/c...MuaWGHPp1mhlGnw

-- obecnie
-- obecnie
-- dawniej
-- dawniej
-- dawniej
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-12-19, 21:23


OskarYT

Mapper MTA






Wiek: 26
Na forum: 4245 dni
Posty: 267
Nick w MP: Kaczorek2306

Piwa: 1230

Respekt: 85,3

marcin778,
Wyskakuje b??d :

Kod:

server.lua:4: cannot use '...' outside a vararg function near '...'


Podpis
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-12-19, 21:29


marcin778

Krytyk serwerów MTA






Wiek: 24
Na forum: 4149 dni
Posty: 2268
Nick w MP: Marcineg

Piwa: 4662

Respekt: 1436,8
Respekt: 1436,8

function Tags (mensajetipo, ...)
    local cuenta getAccountName(getPlayerAccount(source))
    local nombre getPlayerName(source)
    local mensaje table.concat( { ... }, " ")

    
    if isObjectInACLGroup("user."..cuentaaclGetGroup("Admin")) then
        cancelEvent()
        local rggetPlayerNametagColor(source)
        outputChatBox("#FF0000[Admin] "..nombre..": #00FF00"..mensajegetRootElement(), rgbtrue)
        outputServerLog("[Admin] "..nombre..": "..mensaje)
    
    elseif isObjectInACLGroup("user."..cuentaaclGetGroup("SuperModerator")) then
        cancelEvent()
        local rggetPlayerNametagColor(source)
        outputChatBox("#FF0000[SuperModerator] "..nombre..": #00FF00"..mensajegetRootElement(), rgbtrue)
        outputServerLog("[SuperModerator] "..nombre..": "..mensaje)
    
    elseif isObjectInACLGroup("user."..cuentaaclGetGroup("Moderator")) then
        cancelEvent()
        local rggetPlayerNametagColor(source)
        outputChatBox("#FF0000[Moderator] "..nombre..": #00FF00"..mensajegetRootElement(), rgbtrue)
        outputServerLog("[Moderator] "..nombre..": "..mensaje)
    end
end
addEventHandler("onPlayerChat"getRootElement(), Tags)


Podpis
Moje prace: https://www.youtube.com/c...MuaWGHPp1mhlGnw

-- obecnie
-- obecnie
-- dawniej
-- dawniej
-- dawniej
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-12-19, 21:35


OskarYT

Mapper MTA






Wiek: 26
Na forum: 4245 dni
Posty: 267
Nick w MP: Kaczorek2306

Piwa: 1230

Respekt: 85,3

marcin778, Na tym kodzie co poda?e? powy?ej to ju? nie wyskakuje ERROR ale i tak czat globalny nie dzia?a .

To jest po stronie clienta
bindKey("x""down""chatbox""Global")


a tu masz po stronie servera
function Tags (wiadomosctyp, ...)
    local konto getAccountName(getPlayerAccount(source))
    local nazwa getPlayerName(source)
    local wiadomosc table.concat( { ... }, " ")

    
    if isObjectInACLGroup("user."..kontoaclGetGroup("Admin")) then
        cancelEvent()
        local rggetPlayerNametagColor(source)
        outputChatBox("#757575[#FF0000Admin#757575] "..nazwa..": #757575"..wiadomoscgetRootElement(), rgbtrue)
        outputServerLog("[Admin] "..nazwa..": "..wiadomosc)
    
    elseif isObjectInACLGroup("user."..kontoaclGetGroup("SuperModerator")) then
        cancelEvent()
        local rggetPlayerNametagColor(source)
        outputChatBox("#757575[#BB552ESuperModerator#757575] "..nazwa..": #757575"..wiadomoscgetRootElement(), rgbtrue)
        outputServerLog("[SuperModerator] "..nazwa..": "..wiadomosc)
    
    elseif isObjectInACLGroup("user."..kontoaclGetGroup("Moderator")) then
        cancelEvent()
        local rggetPlayerNametagColor(source)
        outputChatBox("#757575[#2A9E2FModerator#757575] "..nazwa..": #757575"..wiadomoscgetRootElement(), rgbtrue)
        outputServerLog("[Moderator] "..nazwa..": "..wiadomosc)
    
    elseif isObjectInACLGroup("user."..kontoaclGetGroup("Everyone")) then
        cancelEvent()
        local rggetPlayerNametagColor(source)
        outputChatBox("#757575[#092FD4Gracz#757575] "..nazwa..": #757575"..wiadomoscgetRootElement(), rgbtrue)
        outputServerLog("[Gracz] "..nazwa..": "..wiadomosc)
    end
end
addEventHandler("onPlayerChat"getRootElement(), Tags)



NIC NIE WYSKAKUJE W DEBUGSCRIPT 3 ALE SKRYPT NIE DZIA?A

Podpis
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-12-20, 15:51


marcin778

Krytyk serwerów MTA






Wiek: 24
Na forum: 4149 dni
Posty: 2268
Nick w MP: Marcineg

Piwa: 4662

Respekt: 1436,8
Respekt: 1436,8

Nie potrzebnie podpinasz to pod event.

Podpis
Moje prace: https://www.youtube.com/c...MuaWGHPp1mhlGnw

-- obecnie
-- obecnie
-- dawniej
-- dawniej
-- dawniej
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-12-20, 16:29


OskarYT

Mapper MTA






Wiek: 26
Na forum: 4245 dni
Posty: 267
Nick w MP: Kaczorek2306

Piwa: 1230

Respekt: 85,3

marcin778, To nie mam poj?cia jak to naprawi? ...

Podpis
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-12-20, 19:35


marcin778

Krytyk serwerów MTA






Wiek: 24
Na forum: 4149 dni
Posty: 2268
Nick w MP: Marcineg

Piwa: 4662

Respekt: 1436,8
Respekt: 1436,8

Podpi?? to najlepiej pod commandhandler a nast?pnie zbindowa? commandHandler, nie bind klawisz tylko poprzez funkcje bindKey i komende w stringu

Podpis
Moje prace: https://www.youtube.com/c...MuaWGHPp1mhlGnw

-- obecnie
-- obecnie
-- dawniej
-- dawniej
-- dawniej
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-12-20, 19:43


OskarYT

Mapper MTA






Wiek: 26
Na forum: 4245 dni
Posty: 267
Nick w MP: Kaczorek2306

Piwa: 1230

Respekt: 85,3

marcin778, Dobra dzi?ki pozdrawiam prosz? o zamkni?cie.

Podpis
Postaw piwo autorowi tego posta
 

 
Tagi: chat :: globalny
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