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

Wysłany: 2015-11-23, 22:13


Antymed







Wiek: 23
Na forum: 3884 dni
Posty: 8

Piwa: 1

Respekt: 50

Ostrzeżeń: 100%
Witam
Mam problem z funkcj? outputDebugString nie wiem co gdzie wpisa? mam przyk?ad
Kod:

bool outputDebugString ( string text, [ int level=3, int red=255, int green=255, int blue=255 ] )


m?gby mi kto? wyt?umaczy? gdzie wpisa? komend? argumenty czy warunki? Chcia?bym zrobi? logi z chatu do debuga.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-11-23, 22:18


#404







Wiek: 26
Na forum: 4771 dni
Posty: 1438

Piwa: 2512

Respekt: 833,5
Respekt: 833,5Respekt: 833,5

Ostrzeżeń: 60%
Eem poka? funkcj? odpowiedzialna za chat, znacznie ?atwiej b?dzie napisa? kod.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-11-23, 22:19


Jurandovsky

Kurdebele






Wiek: 17
Na forum: 4838 dni
Posty: 915

Piwa: 2697

Respekt: 955,3
Respekt: 955,3Respekt: 955,3

Hmm, no to np. robisz co? takiego :


function printDebug(text)
  outputDebugString(text)
end
addEvent("printDebug"true)
addEventHandler("printDebug"resourceRootprintDebug)



przypusmy ze to jest server side.

Potem robisz sobie np. swoj system pw, po wys?aniu wiadomo?ci do gracza, robisz co? takiego :



triggerEvent("printDebug"resourceRoottekstpmki)


Jezeli uzywasz tego na c-side to triggerServerEvent, jezeli na s-side to triggerEvent

Podpis
Jedyny kontakt ze mną to PW forum

Kod:


local noobs = getElementsByTitle("player", "Programista LUA")
for k, v in ipairs(noobs) do
outputChatBox("Bez mózgu jest użytkownik o nicku: "..getPlayerName(v), root)
destroyElement(v)
end
Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-11-23, 22:21


Antymed







Wiek: 23
Na forum: 3884 dni
Posty: 8

Piwa: 1

Respekt: 50

Ostrzeżeń: 100%
Pewnie znany kod ale prosze nic nie ukrywam
Cytat:


addCommandHandler("r", function(plr, cmd, ...)
local login = getAccountName ( getPlayerAccount ( plr ) )
if sprawdzRoota(login) then
local text = table.concat(arg, " ")
outputChatBox("[RCON]:"..text, getRootElement(), 125, 0, 0)

end
end)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-11-23, 22:24


#404







Wiek: 26
Na forum: 4771 dni
Posty: 1438

Piwa: 2512

Respekt: 833,5
Respekt: 833,5Respekt: 833,5

Ostrzeżeń: 60%

addCommandHandler("r", function(plrcmd, ...) 
local login getAccountName getPlayerAccount plr ) ) 
if sprawdzRoota(loginthen 
local text table.concat(arg" "tekst "[RCON]:"..text
outputChatBox(tekstgetRootElement(), 12500outputDebugString(tekst)

end 
end


Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-11-23, 22:48


jg2aviva1

Rusek :D






Wiek: 25
Na forum: 4134 dni
Posty: 445
Nick w MP: _Wolfenstei[N]^.^

Piwa: 1033

Respekt: 240
Respekt: 240Respekt: 240

Ostrzeżeń: 60%
Polecam zrobi? tak, ?eby by?o wiadomo kto to napisal:

outputDebugString (getPlayerName(plr).." - "..text)


DestroY, tam powinien by? "text" ;)

[ Komentarz dodany przez: DestroY: 2015-11-23, 22:49 ]
Sprawd? jeszcze raz co napisa?em :)

Podpis



GTAO Member: 2015-08-23, 14:26

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-11-23, 22:49


Antymed







Wiek: 23
Na forum: 3884 dni
Posty: 8

Piwa: 1

Respekt: 50

Ostrzeżeń: 100%
Dzia?a, dzi?ki

Podpis

mr malka mrrr

Postaw piwo autorowi tego posta
 

 
Tagi: outputdebugstring
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






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