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, 00:55


MrFapus







Wiek: 28
Na forum: 4696 dni
Posty: 11
Nick w MP: Fapek^



Respekt: 50

Od jakiego? czasu pr?buje znale?? skrypt do mutowania tylko czatu og?lnego, czyli ?eby mo?na by?o pisa? na teamsayu. Znalaz?em jaki? skrypt ale nie dzia?a dobrze, prosz? po pomoc.

To jest ten skrypt kt?ry znalaz?em

Kod:

addEventHandler('onPlayerChat', root, function( message, messageType )
local echipa = getPlayerTeam (source)
if messageType == 0 and isPlayerMuted ( source ) then
outputChatBox("You are muted on Public chat. You can still use TeamChat.",source)
elseif messageType == 2 then
if ( echipa ) then
local r, g, b = getTeamColor ( echipa )
for k, p in ipairs ( getPlayersInTeam ( echipa ) ) do
outputChatBox(getPlayerName ( source )": #FFFFFF"..message, p, r, g, b, true )
end
end
end
cancelEvent( )
end )

function mutePlayer(player,command,victimName)
if victimName then
local tipu = getPlayerFromName(victimName)
if tipu then
if ( not isPlayerMuted(tipu) ) then
setPlayerMuted(tipu, true)
outputChatBox("You have been muted.",tipu)
end
else
outputChatBox("Could not find player with name: "..tostring(victimName),player)
end
else
outputChatBox("Usage: /pmute <player name>",player)
end
end
addCommandHandler("pmute",mutePlayer)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-06-22, 01:15


MeeShuffle

Programista/Grafik






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

Piwa: 8575

Respekt: 535,3
Respekt: 535,3

Co w nim nie dzia?a ?

Podpis

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

 
Wysłany: 2014-06-22, 19:47


MrFapus







Wiek: 28
Na forum: 4696 dni
Posty: 11
Nick w MP: Fapek^



Respekt: 50

Gdy komu? daje mute to nie mo?e te? pisa? na teamsayu i chcia?bym ?eby wystarczy?o wpisa? fragment nicku aby skrypt zadzia?a? a nie ca?y.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-06-22, 19:53


MeeShuffle

Programista/Grafik






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

Piwa: 8575

Respekt: 535,3
Respekt: 535,3

Sko?cze gra? i zrobi? Ci to.

[ Dodano: 2014-06-22, 20:08 ]
addEventHandler"onPlayerChat" ,root, function( messagemessageType local echipa getPlayerTeam (source) 
if messageType == and isPlayerMuted source then 
outputChatBox("You are muted on Public chat. You can still use TeamChat.",source) 
elseif messageType == 2 then 
if ( echipa then 
local rggetTeamColor echipa ) 
for kp in ipairs getPlayersInTeam echipa ) ) do 
outputChatBox(getPlayerName source )": #FFFFFF"..messageprgbtrue end 
end 
end 
cancelEvent( ) 
end ) 

function mutePlayer(player,command,victimName) 
if victimName then 
local tipu partName playervictimName )
if tipu then 
if ( not isPlayerMuted(tipu) ) then 
setPlayerMuted(tiputrueoutputChatBox("You have been muted.",tipuend 
else 
outputChatBox("Could not find player with name: "..tostring(victimName),playerend 
else 
outputChatBox("Usage: /pmute <player name>",playerend 
end 
addCommandHandler("pmute",mutePlayer)


function partName(plr,cel)
    local target=nil
    if (tonumber(cel) ~= nilthen
        target=getPlayerID(cel)
    else
        for _,v in ipairs(getElementsByType("player")) do
            if string.find(string.gsub(getPlayerName(v):lower(),"#%x%x%x%x%x%x"""), cel:lower(), 1truethen
                if (targetthen
                    outputChatBox("Znaleziono wiecej niz jednego gracza o pasujacym nicku, podaj wiecej liter."plr)
                    return nil
                end
                target=v
            end
        end
    end
    return target
end
.

Prosze

Podpis

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

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


MrFapus







Wiek: 28
Na forum: 4696 dni
Posty: 11
Nick w MP: Fapek^



Respekt: 50

Dalej mutuje teamsay, i mam jeszcze jedn? pro?b? m?g?by? doda? jeszcze ?eby ka?dy widzia? ?e kogo? zmutowa?em na czacie og?lnym.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-06-22, 21:20


MeeShuffle

Programista/Grafik






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

Piwa: 8575

Respekt: 535,3
Respekt: 535,3

Kurczee czekaj :D Nie ten post, go?ciu chcia? kawa?ki nick?w.

[ Dodano: 2014-06-22, 21:23 ]
Nie no to Ty chcia?e? :D

Podpis

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

 
Wysłany: 2014-06-22, 21:24


MrFapus







Wiek: 28
Na forum: 4696 dni
Posty: 11
Nick w MP: Fapek^



Respekt: 50

Ja to chcia?em ale jeszcze "Gdy komu? daje mute to nie mo?e te? pisa? na teamsayu" a w?asnie o to mi chodzi ?eby m?g? tan pisa?.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-06-22, 21:27


MeeShuffle

Programista/Grafik






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

Piwa: 8575

Respekt: 535,3
Respekt: 535,3

addEventHandler("PlayerChat"root, function( messagemessageType local echipa getPlayerTeam (source) 
if messageType == and isPlayerMuted source then 
outputChatBox("You are muted on Public chat. You can still use TeamChat.",sourcecancelEvent() return end
if messageType == 2 then 
if ( echipa then 
local rggetTeamColor echipa ) 
for kp in ipairs getPlayersInTeam echipa ) ) do 
outputChatBox(getPlayerName source )": #FFFFFF"..messageprgbtrue end 
end 
end
end )


Spr?buj.

Podpis

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

 
Wysłany: 2014-06-22, 21:30


MrFapus







Wiek: 28
Na forum: 4696 dni
Posty: 11
Nick w MP: Fapek^



Respekt: 50

Nie dzia?a

Postaw piwo autorowi tego posta
 

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


MeeShuffle

Programista/Grafik






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

Piwa: 8575

Respekt: 535,3
Respekt: 535,3

db3.

Podpis

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

 
Tagi: mute
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






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