Wysłany: 2018-09-09, 16:02
krystek77
Wiek: 27 Na forum: 4031 dni Posty: 135
Nick w MP: Krystek
Piwa : 176
Witam mam problem z zbindowaniem tego pod klawisz
local szept = {}
local maxznak = 150
local czaswyswietlanianadglowa = 10000
local maxilosclini_nadglowa = 3
function getSzept ( p )
if szept [ p ] then
return "\n#DDDDDD" .. table . concat ({ unpack ( szept [ p ])}, "\n" )
end
return ""
end
addCommandHandler ( "l" ,function( p , c ,...)
if isPlayerMuted ( p ) then
return outputChatBox ( "Zosta?e?/a? uciszony/a!" , p );
end
local t = table . concat ({...}, " " )
if #t > maxznak then return outputChatBox("szept nie moze by? d?u?szy niz "..maxznak.." znak?w",p,255,0,0) end
table . insert ( szept [ p ], t )
if #szept[p] > maxilosclini_nadglowa then table.remove(szept[p],1) end
local pp = createColSphere ( p . position , 15 )
local txt = string . format ( "%s*SZEPT* [%d] %s #AAAAAA%s" , string . format ( "#%.2X%.2X%.2X" , getPlayerNametagColor ( p )),
p . sampid , p . name , t );
outputServerLog ( txt );
for _ , plr in pairs ( getElementsWithinColShape ( pp , "player" )) do
outputChatBox ( txt , plr , 255 , 255 , 255 , true )
end
pp : destroy ()
setTimer (function( p )
table . remove ( szept [ p ], 1 )
end , czaswyswietlanianadglowa , 1 , p )
updateNameTag ()
end )
addEventHandler ( "onPlayerJoin" , root ,function()
szept [ source ] = {}
end , true , "low" )
addEventHandler ( "onResourceStart" , resourceRoot ,function()
for _ , p in pairs ( getElementsByType ( "player" )) do
szept [ p ] = {}
end
end , true , "low" )
Moja robota nie dziala ;/
addEventHandler ( "onResourceStart" , resourceRoot , function( player )
bindKey ( player , "l" , "down" , "chatbox" , txt )
end )
Wysłany: 2018-09-09, 16:04
Kalizman
Wiek: 23 Na forum: 3651 dni Posty: 1394
Piwa : 4619
Sprawd?:
addEventHandler ( "onResourceStart" , resourceRoot , function()
bindKey ( source , "l" , "down" , "chatbox" , txt )
end )
Wysłany: 2018-09-09, 16:11
krystek77
Wiek: 27 Na forum: 4031 dni Posty: 135
Nick w MP: Krystek
Piwa : 176
"Kalizman" napisał/a :Sprawd?:
addEventHandler ( "onResourceStart" , resourceRoot , function()
bindKey ( source , "l" , "down" , "chatbox" , txt )
end )
Tak pr?bowa?em.
EDIT: Poszpera?em i znalazlem tu odpowiedz
http://gtao.pl/dzwiek-w-k...ghlight=chatbox
do zamkniecia
Tagi: nie :: potrafie :: zbindowac :: tego
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: