Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.
GTAONLINE.PL
Tematy otagowane jako: getplayername
1. Refreshowanie getPlayerName
Tak jak w temacie, chc? wykona? refreshowanie getPlayerName co dziesi?? sekund, tylko zbytnio nie mam pomys?u.
2. hud, getPlayerName
Podczas pisania mojego pierwszego hudu napotka?em si? na problem a mianowicie, ?e je?li kto? ma kolorowy nick bo jest np. na s???bie to przed nickiem pojawia si? kod koloru i czy m?g?by kto? mi pom?c to zmieni? aby by?o zasze tak :
local gracz getPlayerName(localPlayer)

dxDrawText(gracz,   screenW 0.8406+2screenH 0.0278+2screenW 0.9275+2screenH 0.0722+2tocolor(000155), 1normalFont"center""center"falsefalsefalsefalsefalse)
        
dxDrawText(gracz,  screenW 0.8406screenH 0.0278screenW 0.9275screenH 0.0722tocolor(0,161,254255), 1normalFont"center""center"falsefalsefalsefalsefalse)
3. getPlayerName
Witam.
Mam blad w debugscripcie: got nil. Chodzi o getPlayerName.

Prosze o pomoc.

Skrypt:
    function pisanie(name)
        
local name getPlayerName(source)
        
outputChatBox(".. name .. wita sie z serwerem!")
    
end
addCommandHandler
("o"pisanie)


Meta:
<meta>
    <
script src="script.lua" type="server"></script>
</meta>
4. getPlayerName + dziwne cyfry
Witam robi? sobi? takiego bota anty reklamowego kt?ry banuje po wpisaniu ip badz czegos zwiazanego z reklam?. I daje tam rozne duperele

I mam 2 problemy. Pierwszy z nich to b??d w DB, attempt to concatenate getPlayerName

linijka 53

[lua]outputChatBox("Gracz: "..getPlayerName(source).."Zosta?/a Zbanowany/a Przez ConsoleBot", getRootElement(), 255, 0, 0)[/lua]



a drugi b??d to taki, ?e zamiast co 2 minuty losowa? teksty z tablicy to losuje mi kij wie sk?d cyfry.

[lua]local teksty = {
{"Co tam u was ?"},
{"Jaka Dzi? Pogoda ?"},
{"Mi?ej zabawy :) "},
{"Ale fajna nuta na M leci"},
{"Fajnie sie gra tutaj ? "},
{"M?j tw?rca to mistrzuniu"},
{"Uhhh ale gor?co dzi? co nie ?"},
}

setTimer(function()
local los = math.random(1, #teksty)
outputChatBox("#ff99ccConsoleBot: #99004c"..los.."",getRootElement(), 255,255,255,true)
end, 120*1000, 1)



addEventHandler("onResourceStart", resourceRoot, function()
outputChatBox("#ff99ccConsoleBot: Witaj Jestem Botem Stworzonym Przez Marcina B?d? Si? Wami Opiekowa?.", getRootElement(), 255, 255, 255, true)
end)

local s1 = "mtasa://"
local s2 = "128.168.593.532"
local s3 = ":25503"

addEventHandler("onPlayerChat",root,function(msg, type)
if type == 0 then
cancelEvent()
if msg == s1 or msg == s2 or msg == s3 then
outputChatBox(" &quo...
5. Kolorowy getPlayerName
Witam, napisa?em skrypt na kr?tkofal?wk? dla frakcji no i moje pytanie brzmi jak by tu zrobi? Nick gracza tak?e w kolorku.


Linijka z outputem

outputChatBox(getPlayerName(thePlayer).." #ff0000**#0000ffKr?tkofal?wka#ff0000**#FF6600 "..theMessage..""getRootElement(),255255255true)