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: prawidłowo
1. Skrypt nie działa prawidłowo
Witam, mam taki skrypt:

Version
={
    
m_string='',
    
m_label=nil,
}

local screenWidthscreenHeight=GuiElement.getScreenSize()

function 
init()
local time getRealTime()
local hours time.hour
local minutes 
time.minute
local seconds 
time.second
local miesiacday 
time.monthday
local miesiac 
time.month
local year 
time.year
local sidek 
getElementData(localPlayer,"player:sid")
    
Version.m_string=''..hours..':'..minutes..':'..seconds..' SID: '..sidek..' |'

    
Version.m_label=guiCreateLabel(screenWidth-338screenHeight-1525018Version.m_string .. ' |'false)
    
guiSetAlpha(Version.m_label0.5)
    
guiLabelSetHorizontalAlign(Version.m_label'right')
end
init
()



function 
destroy()
    if 
Version.m_label then
        Version
.m_label:destroy()
    
end
end

function setString(version)
    
Version.m_string=version
    guiSetText
(Version.m_labelversion)
end

function getString()
    return 
Version.m_string
end

Jest to dopisek obok wersji MTA
S? 2 nim 2 problemy
Pierwszy: Po do??czeniu na serwer skrypt nie dzia?a bo nie widzi elementdaty, dopiero po restarcie skryptu dzia?a.
2: Czas si? od?wie?a dopiero po restarcie skryptu, pr?bowa?em z timerami i nie da?em rady.
2. Tuner nie działa prawidłowo
Witam pisze w sprawie tunera, kt?ry nie dzia?a.

Dodaje si? do mysql mam tabeli:
Code: ( TUNE )
uid: 1
Active: Data
added: Data
Null: Puste

O to kod

 
local stanowiskaSwiatla 
= {
    
stanowiskoDoherty={
        
mpos={998.92,-1475.04,13.55-1}, -- marker
        cpos
={995.64874267578, -1474.09912109412.0539932250986.1,7.5,4}, -- cuboid
        job_id
="TUNE2", -- (idfrakcja kt?ra b?dzie mia?a dost?p
        text
="Monta? tuningu"
    
},
    
stanowiskoDoherty2={
        
mpos={1004.36,-1475.34,13.55-1}, -- marker
        cpos
={1002.52,-1474.48,136.1,7.5,4}, -- cuboid
        job_id
="TUNE", -- (idfrakcja kt?ra b?dzie mia?a dost?p
        text
="Monta? tuningu"
    
},


?aden tuner nie dzia?a co? zle usupe?niam w mysql ? prosze o pomoc
3. Frakcja nie działa prawidłowo
Witam,

Pisze w sprawie ?e jestem pocz?tkuj?cym w lua i mam taki problem

1. Po wej?ciu na s?u?b? frackji na [TAB] w tabeli S?u?ba nie wy?wietla si? dana fraka np SAPD poprostu nic tam nie ma.

Zale?y mi na tym ?eby pokazywa?o frakcje je?eli kto? jest na duty frakcji.

( na tabie np sapd )
4. Nie działający prawidłowo czat
Wczoraj kolega z tego oto forum pom?g? mi ze skryptem na chat mi?dzy frakcjami, ale jest problem. Osoba kt?ra jest w PR widzi pozosta?e osoby kt?re nie s? w ACL jako ?e s? w PR. Tutaj ss pomocny https://imgur.com/a/heAo4H6
[lua]
function factionchat(plr, cmd, ...)
local msg = table.concat ( { ... }, " " )
if not msg then return end
local players=getElementsByType('player')
for i,v in pairs(players) do
local accName = getAccountName(getPlayerAccount(v))
if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Policja" ) ) then
outputChatBox("#0033FF[Policja] #E0E0E0"..getPlayerName(plr)..": "..msg, v, 255, 255, 255, true)
elseif isObjectInACLGroup ("user."..accName, aclGetGroup ( "PSP" ) ) then
outputChatBox("#FF0000[Pa?stwowa Stra? Po?arna] #E0E0E0"..getPlayerName(plr)..": "..msg, v, 255, 255, 255, true)
elseif isObjectInACLGroup ("user."..accName, aclGetGroup ( "OSP" ) ) then
outputChatBox("#800000[Ochotnicza Stra? Po?arna] #E0E0E0"..getPlayerName(plr)..": "..msg, v, 255, 255, 255, true)
elseif isObjectInACLGroup ("user."..accName, aclGetGroup ( "PR" ) ) then
outputChatBox("#FFFFFF[Pa?stwowe Ratownictwo Medyczne] #E0E0E0"..getPlayerName(plr)..": "..msg, ...