Wysłany: 2015-11-14, 15:11
_Haze
Peace Yo!
Wiek: 24 Na forum: 4184 dni Posty: 1648
Nick w MP: Haze
Piwa : 2628
addEvent ( "setText" , true )
addEventHandler ( "setText" , root ,
function( element , text )
guiSetText ( element , text )
end
)
wywo?anie trigera function changeMyTeamName ( plr , cmd , opcja , newName )
if opcja == "1" then
setTeamName ( team1 , newName )
triggerClientEvent ( plr , "setText" , plr , lteam1 , newName )
elseif opcja == "2" then
setTeamName ( team2 , newName )
triggerClientEvent ( plr , "setText" , plr , lteam2 , newName )
end
end
addCommandHandler ( "tsn" , changeMyTeamName )
team1 team2 to teamy lteam1 to labele ktore maja sie zmieniac
B?ad w linijce guiSetText element argument 1 zwraca nil
Wysłany: 2015-11-14, 15:34
#404
Wiek: 26 Na forum: 4771 dni Posty: 1438
Piwa : 2512
Hazmudex ,
lteam1 = ...
lteam2 = ...
addEvent ( "setText1" , true )
addEventHandler ( "setText1" , root ,
function( text )
guiSetText ( lteam1 , text )
end
)
addEvent ( "setText2" , true )
addEventHandler ( "setText2" , root ,
function( text )
guiSetText ( lteam2 , text )
end
)
-- server
function changeMyTeamName ( plr , cmd , opcja , newName )
if opcja == "1" then
setTeamName ( team1 , newName )
triggerClientEvent ( plr , "setText1" , plr , newName )
elseif opcja == "2" then
setTeamName ( team2 , newName )
triggerClientEvent ( plr , "setText2" , plr , newName )
end
end
addCommandHandler ( "tsn" , changeMyTeamName )
Takie co? powinno dzia?a?.
Wysłany: 2015-11-14, 16:19
_Haze
Peace Yo!
Wiek: 24 Na forum: 4184 dni Posty: 1648
Nick w MP: Haze
Piwa : 2628
Tagi: settext
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: