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: nie
601. co tu jest nie tak ?
Witam . Mam taki problem ze przy 300hp auta ono wci?? jedzie i silnik si? nie gasi , wstawiam wam kod .

addEventHandler
('onVehicleDamage',root,function()
if 
getElementHealth(source)<=300 then
setVehicleEngineState
(source,false)
end
end
)
602. Co zrobic gdy nie moge wgrac Obiektu do MTA SA
Czejsc A Wiecod pocz?tku. Chce wgrac pewnom remize nna prywatny serwer MTA lecz Nie moge z inimi obiektamy np: Szpital Lub Baza SAPD dzia?a lecz z remiz? nie.
W kazdej remize jest cos takiego :
mapEditorScriptingExtension_s
mapEditorScriptingExtension_c
Pls pom?zcie !
603. Nie działa edytor map
Witam mam pro?b?. Mam czarny ekran jak odpalam edytormap
604. Nie pokazująca sie paleta kolorów w SA_Customs
Wi?c mam skrypt SA_Customs i jest co? z?ego w nim i? jak chce zmieni? kolor ?wiate? to nie pokazuje mi sie paleta do wybrania koloru... kt?ra powinna wygl?da? tak: https://imgur.com/a/V7TrWlU

https://imgur.com/a/sZtIKT1 < Menu

Kodzik : [lua]availableTuningMarkers = {
--X, Y, Z, Vehicle Rotation (Use /markerpos to get perfect position and rotation (The command in sourceC.lua last row))
{-2282.83,-124.69,34.84}, -- LV Airport
{-2275.28,-124.99,34.84}, -- LV Airport
}

tuningMenu = {
[1] = {
["categoryName"] = getLocalizedText("menu.optical"),
["availableUpgrades"] = {}, -- automatic getting optical upgrades to selected category
["subMenu"] = {
[1] = {["categoryName"] = getLocalizedText("menu.optical.frontBumper"), ["upgradeSlot"] = 14, ["tuningPrice"] = 1000, ["cameraSettings"] = {"bump_front_dummy", 130, 10, 6}},
[2] = {["categoryName"] = getLocalizedText("menu.optical.rearBumper"), ["upgradeSlot"] = 15, ["tuningPrice"] = 1000, ["cameraSettings"] = {"door_lf_dummy", -65, 3, 8}},
[3] = {["categoryName"] = getLocalizedText("menu.optical.hood"), ["upgradeSlot"] = 0, ["tuningPrice"] = 1000},
[4] = {["categoryName"] = getLocalizedText("menu.optical.exhaust"), ["upgradeSlot"] = 13, ["tuningPrice"] = 200...
605. Nie moge wystawic mandatu w db3
Witam,
mam problem mianowicie
skopiowa?em kod skryptu z sapd na pysie bo robie inna frakcje na tym gm
i gdy pr?buje wystawic mandat mam taki b??d
s:36 attempt to index local 'plr' (a userdata value)

[code]function mandat(plr, cmd, target, cash, ...)
if getElementData(plr,"player:faction") and getElementData(plr,"player:faction") == "SAPD" then
if not (target) or not (cash) or not (...) then
plr:outputChat('* U?yj: /mandat <nick/ID> <kwota> <pow?d>')
else
if getElementData(plr,"player:rank") < 2 then outputChatBox("* Nie posiadasz uprawnie? !",plr) return end
cash=tonumber(cash)
if cash <= 0 then
plr:outputChat('* Warto?? kwoty mandatu nie mo?e by? ujemna.')
return
elseif cash > 35000 then
plr:outputChat('* Kwota mandatu jest zbyt du?a (max. 35.000 PLN).')
return
end

local targetElement=exports['pystories-core']:findPlayer(plr, target)

if targetElement then
local x, y, z = getElementPosition(plr)
local tx, ty, tz = getElementPosition(targetElement)

local distance = getDistanceBetweenPoints3D(x, y, z, tx, ty, tz)

if (distance<=10) then
local reason=table.concat({...}, ' ')
local money=getPlayerMoney(targetElement)

local takeFromCash = money-cash
if money >= cash then
plr:outputChat(('* Wystawiono mandat dla %s, na kwot? %d PLN. Pow?d: %s'):format(targetElement:getName():g...
606. Nie działa pozycja na radarze
Siema tak jak w temacie

addEventHandler("onClientPreRender"root, function()
if 
not getElementData(localPlayer,"player:logged"then return end
    local x
,y,getElementPosition(localPlayer)
    
local ulica getZoneName(x,y,zfalse)
    
local ulica2 getZoneName(x,y,ztrue)
    if 
ulica2~=ulica then ulica "   "..ulica.."n"..ulica2 else ulica "   "..ulica end
    
if dxSetAspectRatioAdjustmentEnabled then
        dxSetAspectRatioAdjustmentEnabled
(true)
    
end
    
if isPlayerHudComponentVisible("radar") and getElementInterior(localPlayer) == 0 then
        dxDrawText
(ulicasw*4.2/20sh*18/20sw*4/20sh*18/20+sh*1/21.9tocolor(255255255), 1.2"default""left""center"false)
        --
dxDrawText(ulica171551488642tocolor(255255255255), 1.50dxfont0_tak"center""center"falsefalsefalsefalsefalse)
        
    
end
end
)
607. Nie działa nick gracza w hud
Siema tak jak w temacie za pomoc postawie piwsko

[lua]addEventHandler("onClientRender", root, function()
local nick = getPlayerName(localPlayer)
local premium = getElementData(localPlayer, "player:premium")
local zegar_h, zegar_m = getRealTime().hour, getRealTime().minute
local pln = getPlayerMoney(localPlayer)
local uid = getElementData(localPlayer,"player:uid")

local status = nil

if premium then
status = "(Premium)"
else
status = ""
end

dxDrawImage(screenW * 0.6881, screenH * -0.0111, screenW * 0.300, screenH * 0.390, "img/hud.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
dxDrawText(getWeaponNameFromID(getPedWeapon(localPlayer)), 1243, 100, 1366, 128, tocolor(255, 255, 255, 255), 1.20, "default-bold", "center", "center", false) -- bronie
dxDrawText(string.gsub(nick, "#%x%x%x%x%x%x", "") .. status, screenW * 0.74, screenH * 0.06, screenW * 0.300, screenH * 0.306, tocolor(0, 0, 0, 255), 1.00, font, "center", "center", false) -- nick
dxDrawText(string.format("%02d:%02d", zegar_h, zegar_m), 1055, 60, 1250, 132, tocolor(255, 255, 255, 255), 1.50, "default-bold", "center", "center", false) -- zegar
dxDrawText(string.format(""..przecinkiAdd(pln).." PLN"), 1055, 105, 1250, 172, tocolor(14, 110, 33, 255), 1.50, "default-bold", "...
608. Nic się nie dzieje po wejściu w marker
Kod:

bramaSMSA = createObject ( 969, -2091.1001, 1341.6, 6.2, 0, 0, 338 )
marker = createMarker ( -2086.6999511719, 1340.3000488281, 6.1999998092651, "cylinder", 9)

function OtworzSMSA ()
if isPlayerinFaction then
moveObject ( bramaSMSA, 2500, -2091.1001, 1341.6, 2.8 )
setTimer ( function ()
outputChatBox ( "Brama automatycznie zamknie si? za 10 sekund!", player)
end, 10000, 1)
end
moveObject (bramaSMSA, 2500, -2091.1001, 1341.6, 6.2 )
end
addEventHandler ("onMarkerHit", marker, OtworzSMSA)


function isPlayerInFaction(plr)
local sid=getElementData(plr,'player:sid')
if not sid then return end

local result=exports['pystories-db']:dbGet('SELECT 1 FROM pystories_factions WHERE code=? AND sid=? LIMIT 1;', "SMSA", sid)
if result[1] then
return true
else
return false
end
end

Gdy wchodze w marker nic sie nie dzieje, jestem w frakcji, nie ma ?adnych b??d?w w db3
609. Pobieranie zasobów nie znika
Witam mam problem z przerobieniem pobierania zasob?w z new place ot?? to jak pobior? sie zasoby skrypt nie znika oto kod ( za pomoc daje piwko ):

[lua]
--[[
Autor: Sralentas xD
]]

local sx, sy = guiGetScreenSize()
local font = dxCreateFont("cz.ttf", 13)
local kropki = 0

addEventHandler("onClientResourceStart", resourceRoot, function()
if getElementData(localPlayer, "dbid") then return end
if isEventHandlerAdded("onClientRender", gui) then return end
addEventHandler("onClientRender", root, gui)
showChat(false)
showPlayerHudComponent("all", false)
muza = playSound("muzyka.mp3")
end)

addEvent("usunPobieranie", true)
addEventHandler("usunPobieranie", root, function()
removeEventHandler("onClientRender", root, gui)
stopSound(muza)
end)

function gui()
kropki = kropki + 1 > 60 and 0 or kropki + 1
if kropki == 1 then
l = "."
elseif kropki == 20 then
l = ".."
elseif kropki == 40 then
l = "..."
end
dxDrawImage(0, 0, sx, sy, "grafiki/bg.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
dxDrawImage(scale_x(499), scale_y(25), scale_x(442), scale_y(270), "grafiki/logo.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
if muza then
local bit = getSoundFFTData(muza, 2048, 3)
fo...
610. Nie znika auto jak zakończysz prace
Siema tutaj macie kod za pomoc postawie piwo

addEventHandler("onClientVehicleExit"resourceRoot, function(plr,seat)
    if 
seat~=0 then return end
    
if plr~=localPlayer then return end
    finishJob
(plrtrue,true)
    
destroyElement(kontenerxdxd)
    
setElementData(plr,"player:job",false)
    
outputChatBox("* Zako?czy?e?(a?) prac?."25500)
end)

addEventHandler("onClientVehicleExplode"resourceRoot, function()
    if 
getElementModel(source) ~= 578 then return end
    local plr
=getVehicleController(source)
    if 
plr~=localPlayer then return end
    finishJob
(plrtrue,true)
    
destroyElement(kontenerxdxd)
    
setElementData(plr,"player:job",false)
    
outputChatBox("* Zako?czy?e?(a?) prac?."25500)
end)
611. Co mam zrobić żeby tego nie było?
Wgra?em paczke fort carson i pisze mi w konsoli to

No i nwm co zrobi? bo ju? pr?bowa?em wszystko ale na sw?j spos?b mo?e wie kto? jak to naprawi??

[18-11-12 16:47:07] ERROR: Unable to start resource maps; Failed to start resource item fortcarson.map which is required
[18-11-12 16:47:07] ERROR: mysql/connection.lua:62: attempt to call global 'mysql_ping' (a nil value)
[18-11-12 16:47:07] ERROR: money/server.lua:4: call: failed to call 'mysql:query' [string "?"]
[18-11-12 16:47:08] ERROR: Couldn't find resource pwnage. Check it exists.
[18-11-12 16:47:08] ERROR: Couldn't find resource cinema. Check it exists.
[18-11-12 16:47:08] Creating new DB table vending_machines
[18-11-12 16:47:08] ERROR: Couldn't find resource changename-system. Check it exists.
[18-11-12 16:47:08] Querying MTA master server... success! (Auto detected IP:193.70.126.129)
[18-11-12 16:47:08] Authorized serial account protection is enabled for the ACL group(s): `Admin` See http://mtasa.com/authserial
[18-11-12 16:47:08] WARNING: owner_email_address> not set
[18-11-12 16:47:08] Server started and is ready to accept connections!
[18-11-12 16:47:08] To stop the server, type 'shutdown' or press Ctrl-C
[18-11-12 16:47:08] Type 'help' for a list of commands.
[18-11-12 16:47:08] Stopping global
[18-11-12 16:47:08] Starting global
[18-11-12 16:47:08] ERROR: mysql/connection.lua:62: attempt to call global 'mysql_ping' (a nil value)
[18-11-12 16:47:08] ERROR: global/money_globals.lu...
612. Nie działający schowek PSP !
Witam chcia?em odda? do schowka aodo gdy doda?em schowek przesta? dzia?a?

c.lua
[lua]local screenSize = Vector2(guiGetScreenSize())
local ticks = {alphaTick = getTickCount(), animTick = getTickCount(), vehicle = nil}

local function isMouseInPosition(x, y, width, height)
if not isCursorShowing() then return false end

local cursor = {getCursorPosition()}
local cx, cy = (cursor[1]*screenSize.x), (cursor[2]*screenSize.y)
if (cx >= x and cx <= x + width) and (cy >= y and cy <= y + height) then return true else return false end
end

function isEventHandlerAdded(sEventName, pElementAttachedTo, func)
if type(sEventName) == 'string' and isElement(pElementAttachedTo) and type(func) == 'function' then
local aAttachedFunctions = getEventHandlers(sEventName, pElementAttachedTo)
if type(aAttachedFunctions) == 'table' and #aAttachedFunctions > 0 then for i, v in ipairs(aAttachedFunctions) do if v == func then return true end end end
end return false
end

local function scaleElement(sx, sy)
return (screenSize.x - sx)/2, (screenSize.y - sy)/2
end

local icon_x, icon_y = scaleElement(128, 128)
local function drawGUI()
local up = interpolateBetween(100, 0, 0, 0, 0, 0, (getTickCount()-ticks.animTick)/2000, "OutBack")

if anim == "fadein" then
progress = (getTickCount()-ticks.alphaTick)/1000
alpha = interpolateBetween(alpha, 0, 0, 255, 0, 0, progress, "Linear...
613. Nie mogę wypłacać co minute
Siema tak jak w temacie

local minut
function sypnijmu()
local marker getElementsByType("pickup")
for 
_,m in ipairs(marker) do
if 
getElementData(m"owner"then
local wyplata
getElementData(m"payday")
exports['ogrpg-db']:dbSet("UPDATE biznesy SET saldo=saldo+?? WHERE id=?",wyplata,getElementData(m,"id"))
end
end
end
setTimer
(sypnijmu,1000*minuta,0)
614. Tworzy normalnie biznes ale pikapu nie ma
Siema tak jak w temacie

[lua]local pickup = {}

local bramy = {}

function stworz(v)
if not v.login then v.zajety="n" end
v.xyz=split(v.xyz,",")
biz=createPickup ( v.xyz[1], v.xyz[2], v.xyz[3], 3, 1274, 0 )
local biz2 = biz
local tw=createElement("text")
local x2342=v.cost/240
local x234 = math.floor(x2342)
local ***** = math.floor(v.cost/4)
if v.zajety == "n" then v.login = "Brak";v.data="Brak w?asciciela" end
local profir1 = math.floor(x234*24*7)
outputDebugString(v.id)
local format1=("Biznes: %s (ID: %s )nW?a?ciciel: %s nKoszt na 7 dni: %s PLNnPieni?dze co godzine: %s PLNnPieni?dze za sprzeda?: %s PLNnOplacony do: %s nZarobek tygodniowy: %s PLN"):format(v.nazwa,v.id,v.login,v.cost,x234,*****,v.data,profir1)
setElementData(tw, "name", format1)
setElementPosition(tw, v.xyz[1], v.xyz[2], v.xyz[3]+0.8)
setElementData(biz2, "cost", v.cost)
setElementData(biz2, "z", v.zajety)
setElementData(biz2, "name", v.nazwa)
setElementData(biz2, "id", v.id)
setElementData(biz2, "payday",x234)
setElementData(biz2, "saldo",v.saldo)
setElementData(biz2,"data",v.data)
setElementData(biz2, "owner", v.owner)
end
--[[
function bramabiznes(plr)
if isElementWithinColShape(plr, getElementColShape(pickup[plr])) then
local biz2 = pickup[plr]
if getElementData(biz2, "z") == &q...
615. Testuje handling i nie działa
Tak jak w temacie testuje sobie handling i jak mam go w??czony czyli kupiony to wcale si? nic nie zmienia


        
if getElementData(veh"vehicle:handlingtest") == 1 then
            local acceleration 
getVehicleHandling(veh).engineAcceleration
            local velocity 
getVehicleHandling(veh).maxVelocity
            setVehicleHandling
(veh"maxVelocity"velocity+50)
            
setVehicleHandling(veh"engineAcceleration"acceleration+30)
        
end

-- wczytywanie pojazdu
setElementData
(veh"vehicle:handlingtest"vehicle["handling_test"])
616. Nie zapisuje pieniędzy.
Witam . Bo mam taki problem . Po zarejestrowaniu i pierwszym zalogowaniu jak si? zarobi troche pieni?dzy i zrobi reconnect to znikaj? a potem jest ju? wszystko dobrze . Podkre?l? ze to tylko pieni?dze znikaj? , nic wi?cej , skrypty podpi?te do bazy , brak b??d?w db3 . Za pomoc piwko . Jak b?d? potrzebne jakie? kody ze skrypt?w prosz? pisa? . Bo sam patrzy?em po skryptach i wed?ug mnie jest wszystko dobrze .
617. Praca nie daje pojazdu / topka
Witam przychodz? z problemem :) .
Rozpoczynam prac?, nie daje mi pojazdu;p
B??d z db3:

ERROR: Client (Minsk) triggered serverside event dajAutobusy:autobusy, but event is not added serverside

ERROR: Client (Minsk) triggered serverside event pokazTopke:autobusy:source, but event is not added serverside

Mo?e kto? pomo?e naprawi?? //przesy?am w rar te dwie prace. Z g?ry dzi?kuje za pomoc, i stawiam zimne :piwo: oraz R*

https://www111.zippyshare.com/v/OB97wwsv/file.html
618. Jak kupuje pojazd nie mogę go malować ani naprawiać
tak jak w temacie
[lua]createBlip(949.88, -1713.13, 13.21, 55,2,0,0,0,0,0,275) ----szybkie
createBlip(978.52, -2162.24, 13.45, 55,2,0,0,0,0,0,275) ----offroad
createBlip(2344.93, -2277.75, 13.55, 55,2,0,0,0,0,0,275) ----Zwyk?e
createBlip(1889.01, -1866.62, 13.58, 55,2,0,0,0,0,0,275) ----Cygan
createBlip(198.04, -322.39, 1.58, 55,2,0,0,0,0,0,275)
createBlip(-123.30,1037.38,20.05, 55,2,0,0,0,0,0,275) --salon motorow

local napis=createElement("text")
status="Salon samochodowynJUZ OTWARTE!nSAMOCHODY Z LEASINGIEM JU? OD 5 000 000 PLN!"
setElementData(napis, "name", ""..status.."")
setElementPosition(napis, 935.13, -1718.39, 13.55)
setElementData(napis, "scale", 1.2)

local napis=createElement("text")
status="Salon na bez-daszunOTWARTE 24/HnSAMOCHODY NA OFFROAD, DU?O ZA MA?O!nWJED? TUTAJ!"
setElementData(napis, "name", ""..status.."")
setElementPosition(napis, 1024.66, -2064.51, 13.10)
setElementData(napis, "scale", 1.2)

local napis=createElement("text")
status="Komis pana JackanSAMOCHODY SPROWADZANE Z NIEMIECnKUP TANIO!"
setElementData(napis, "name", ""..status.."")
setElementPosition(napis, 1895.93, -1878.89, 13.50)
setElementData(napis, "scale", 1.2)

local napis=createElement("text")
status="Salon w BlueberrynSAMOCHODY PRODUKOWANE NA MIEJSCUnKUPUJ TERAZ...
619. Nie pokazuje pojazdów w przecho
Witam, mam problem z przechowywalnia mianowicie gdy oddaje pojazd do przecho wszystko dzia?a lecz jak chce go odebra? to w panelu nic si? nie pokazuje.

[img]https://zapodaj.net/3688d84d5f222.png.html[/img]

Nie wiem jaka jest tego przyczyna kombinowa?em ju? na ka?dy spos?b, w debugscript 3 nie ma ?adnych b??d?w. Ma kto? pomys? jak to naprawi??

Client
[lua]

local marker=createMarker(-2059.8466796875, 469.9189453125, 35.17-1.20, "cylinder", 2, 50,255,250,50)
local sphere=createColSphere(-2048.19, 467.72, 35.17, 6)

local t=createElement("text")
setElementData(t,"scale",1.5)
setElementData(t,"name","Odbi?r pojazd?w")
setElementPosition(t,-2059.8466796875, 469.9189453125, 35.17)

local wm={}
wm.window=guiCreateWindow(0.25, 0.26, 0.51, 0.42, "Odbieranie pojazd?w", true)
guiWindowSetSizable(wm.window, false)
guiWindowSetMovable(wm.window, false)
guiSetVisible(wm.window, false)
wm.gridlist=guiCreateGridList(0.04, 0.09, 0.92, 0.65, true, wm.window)
guiGridListAddColumn(wm.gridlist, "ID", 0.4)
guiGridListAddColumn(wm.gridlist, "Model", 0.6)
wm.submit=guiCreateButton(0.04, 0.76, 0.47, 0.19, "Wyjmij pojazd", true, wm.window)
wm.close=guiCreateButton(0.57, 0.75, 0.39, 0.20, "Zamknij", true, wm.window)

addEvent("onParkingGetVehicles", true)
addEventHandler("onParkingGetVehicles", root, function(result)
guiGridListClear(wm.gridlist)
...
620. Prosze pomóc Praca Dilera nie działa
Prosz? pom?c tu macie Clinet:
[lua]local sw,sh = guiGetScreenSize()
local elements = {}
-------------------------------------------
function isEventHandlerAdded(sEventName,pElementAttachedTo,func)
if type(sEventName)=='string' and isElement(pElementAttachedTo) and type(func)=='function' then local aAttachedFunctions = getEventHandlers(sEventName,pElementAttachedTo)
if type(aAttachedFunctions)=='table' and #aAttachedFunctions > 0 then for i,v in ipairs(aAttachedFunctions) do if v==func then return true end end end
end return false
end
-------------------------------------------

function checkButtons(pcl)
if (pcl==localPlayer) then
for _,v in ipairs(elements) do
if isElement(v) then
destroyElement(v)
end
end
showCursor(false)
if isEventHandlerAdded("onClientRender",root,onRender) then
removeEventHandler("onClientRender",root,onRender)
end
end
end

function showButtons(pcl)
if (pcl==localPlayer) then
checkButtons(pcl)
showCursor(true)
addEventHandler("onClientRender",root,onRender)
elements[1]=guiCreateButton(sw/2-(190/2),sh/2+80,190,50,"rozpocznij prace[1]",false)
elements[2]=guiCreateButton(sw/2+300-25,sh/2+150-20,25,20,"zamknij[1]",false)

for _,v in ipairs(elements) do if isElement(v) then guiSetAlpha(v,0) end end
end
end

function onRender()
dxDrawImage(s...
621. Nie dziala podmienienie
witam mam koszary z gtao (model) wykonany przez Garru i chcialem przeniesc to do mta i w tym celu napisalem mete i client.lua client jest o tresci:

local txd engineLoadTXD("safd.txd")
engineImportTXD(txd17551)
local dff engineLoadDFF("safd.dff"17551)
engineReplaceModel(dff17551)
local col engineLoadCOL("safd.col")
engineReplaceCOL(col17551)


ale nie dziala
622. Animacja nie działa
DB3:
attempt to perform arithmetic on upvalue 'tick' (a function value)
Nie pokazuje gui.
linijka w kt?rej wyskakuje to:
                   local alph interpolateBetween(00002500, (getTickCount() - tick)/2000"OutQuad")
623. Nie wiem jak zmienić rotacji
Siema tak jak w temacie za pom?c postawie piwo

         setElementData(localPlayer,"player:spawn",{-1916.07,882.99,35.41+0.100180})
624. Praca nie daję pieniędzy
Witam ot?? mam prac? g?rnika kt?ra nie daj? pieni?dzy error w db3 to jest ot?? taki;

[lua]Client (nick) triggered serverside event monetygornik, but event is not added serverside [/lua]
Kod
c.lua

[lua]x,y = guiGetScreenSize()
px, py = (x/1024), (y/768)

function isMouseIn ( x, y, width, height )
if ( not isCursorShowing( ) ) then
return false
end
local sx, sy = guiGetScreenSize ( )
local cx, cy = getCursorPosition ( )
local cx, cy = ( cx * sx ), ( cy * sy )
if ( cx >= x and cx <= x+width ) and ( cy >= y and cy <= y+height ) then
return true
else
return false
end
end

drzewa = {
{-92.53, 1989.35, -12.74},
{-98.49, 1989.58, -12.58},
{-87.17, 1970.10, -12.71},
{-91.85, 1960.08, -12.58},
{-112.62, 1982.88, -12.77},
{-105.88, 1988.86, -12.76},
{-103.74, 1962.63, -12.63},
}

pracagornik = createMarker(-109.08, 1987.36, 3.46-0.9, "cylinder", 1.5)
createBlipAttachedTo(pracagornik, 46)

addEventHandler("onClientMarkerHit", pracagornik, function(h)
if h ~= localPlayer then return end
setElementData(localPlayer, "gui:gornik", true)
showCursor(true)
end)

addEventHandler("onClientRender", root, function()
if not getElementData(localPlayer, "gui:gornik") then return end
dxDrawImage(312*px, 184*py, 400*px, 400*py, "job.png")
end)

function markergornik()
rnd = math.random(1, #drzewa)
markerRandom = createMarker...
625. Nie dziala anty spam do
Witam mam mianowicie problem kiedy chce dodac tak? funkcj?:

 function cmd_blokada(plr)
  if 
getElementData(plr"mutespamer") == 2 then return end
  setElementData
(plr"mutespamer"2)
  
setTimer(function()
    
setElementData(plr"mutespamer"false)
  
end30001


Do komendy -

addCommandHandler('do', function(sourcecmd, ...)
    
local text=table.concat({...}, ' ')
    if 
not text then return end
        
if ninjaban(textthen
        triggerClientEvent
(root"admin:rendering"root"* "..getPlayerName(source).."("..getElementData(source,"id")..") zosta?(a) wyrzucony(a) przez system. Powod: Reklama")
        
kickPlayer (source"System:Reklama")
        return 
end
    local msg
=table.concat({...}, " ")
    
local x,y,z=getElementPosition(source)
    
local sphere=createColSphere(x,y,z30)
    
local players=getElementsWithinColShape(sphere'player')
    
destroyElement(sphere)

    for 
i,v in ipairs(players) do
        
outputChatBox("*(( "..getPlayerName(source):gsub("#%x%x%x%x%x%x","").." "..msg.."))"v25551102)
        
triggerClientEvent("onDebugMessage"resourceRoot"*(( "..getPlayerName(source):gsub("#%x%x%x%x%x%x","").." "..msg.."))",1"/ME")
    
end
end
)


Mo?e kto? pom?c? :/ Wynagrodz? piwkiem + respekt.
626. Nie dziala laweta
witam mam skrypt marcina z gtao. lecz nie dziala w db3 pojawia sie komunikat ze w linjce 191 jest blad (s_lua)

s_lua:
[lua] --[[
Autor: bover.
Zakaz zmiany autora, je?li go zmienisz, to przyjedzie do ciebie bover i zje ci siusiaka :x .
--]]
pozycje = { -- x,y,z zaladowania pojazdu, y rozladowania pojazdu
[429] = {0,-0.9,0.4, 6}, -- banshee
[402] = {0,-0.9,0.6, 6}, -- buffalo
[541] = {0,-0.9,0.4,6}, -- bullet
[475] = {0,-0.9,0.4,6}, -- sabre
[457] = {0,-1.3,0.4,6}, -- caddy wozek golfowy
[568] = {0,-0.8,0.6,6}, -- bandito
[426] = {0,-0.7,0.5,6}, -- premier
[602] = {0,-0.9,0.6,6}, -- alpha
[415] = {0,-0.9,0.6,6}, -- cheetah
[480] = {0,-0.9,0.6,6}, -- comet
[562] = {0,0.9,0.6,6}, -- elegy
[587] = {0,0.9,0.6,6}, -- euros
[565] = {0,0.9,0.6,6}, -- flash
[411] = {0,0.9,0.6,6}, -- infernus
[559] = {0,0.9,0.6,6}, -- jester
[603] = {0,0.9,0.6,6}, -- pheonix
[560] = {0,0.9,0.6,6}, -- sultan
[506] = {0,0.9,0.6,6}, -- super gt
[451] = {0,0.9,0.6,6}, -- turismo
[558] = {0,0.9,0.6,6}, -- uranus
[555] = {0,0.9,0.6,6}, -- windsor
[477] = {0,0.9,0.6,6}, -- zr 350
[536] = {0,0.9,0.6,6}, -- blade
[575] = {0,0.9,0.6,6}, -- brodway
[518] = {0,0.9,0.6,6}, -- buccaner
[419] = {0,0.9,0.6,6}, -- esperanto
[534] = {0,0.9,0.6,6}, -- remington
[567] = {0,0.9,0.6,6}, -- savanna
[535] = {0,0.9,0.6,6}, -- slamvan
[576] = {0,0.9,0.6,6}, -- tornado
[412] = {0,0.9,0.6,6}, -- voodo
[496] = {0,0.9,0.6,6}, -- blista
[401] = {0,0.9,0.6,6}, -- bravura
[527] = {0,0.9,0.6,6}...
627. Nic się nie dzieje po wejściu w marker
Witam mam problem ot?? polega on na tym ?e tworze marker oddawania paczki lecz gdy w niego wejd? nic si? nie dzieje. Brak b??d?w w DB3. Zaznaczam funkcje gdzie tworze marker tym --<<<<.

Client:
bindKey("H""down", function()
    if 
isElementWithinMarker(localPlayermarkerZABIERANIAthen else return end
            
if getElementData(localPlayer"praca:magazyn") == true then
             losuj 
math.random 1#markery )
             
markery createMarker(markery[losuj][1],markery[losuj][2],markery[losuj][3])--<<<<.
             
blip createBlipAttachedTo(markery41)
             
setElementData(localPlayer,"mamskrzynke",true)
             
box createObject(1271000)
             
attachElementsboxlocalPlayer00.80.5)
             
triggerServerEvent("klawisze"localPlayer)
           else
             
outputChatBox("Nie pracujesz jako Magazynier.")
           
end
end
)

function 
zabierzidaj()
    if 
localPlayer == markery then
      setElementData
(localPlayer,"wezpaczke"false)  
      
setElementData(localPlayer,"mamskrzynke"false)
      
destroyElement(markery)
      
destroyElement(blip)
      
destroyElement(box)
      
triggerServerEvent("klawZabierz"localPlayer)
      
triggerServerEvent("hajs:paczka"localPlayer)
    
end
end
628. Coś nie działa ale nie wiem co
Siema tak jak w temacie

    if source == wm.submit then
        local selectedRow
=guiGridListGetSelectedItem(wm.gridlist) or -1
        
if selectedRow 0 then return end
        local vehicles
=getElementsWithinColShape(przechowalnie[ID_PRZECHO_DO_JAKIEJ_WLAZLES][1],"vehicle")
        if 
#vehicles > 0 then
            
outputChatBox("Miejsce odbioru pojazd?w jest zaj?te!"255,0,0)
            return
        
end
629. Coś nie działa ale nie wiem co
Siema tak jak w temacie

    if source == wm.submit then
        local selectedRow
=guiGridListGetSelectedItem(wm.gridlist) or -1
        
if selectedRow 0 then return end
        local vehicles
=getElementsWithinColShape(przechowalnie[ID_PRZECHO_DO_JAKIEJ_WLAZLES][1],"vehicle")
        if 
#vehicles > 0 then
            
outputChatBox("Miejsce odbioru pojazd?w jest zaj?te!"255,0,0)
            return
        
end
630. Ban nie działa
A wi?c tam jak kogo? banuje to wyrzuca go z serwera ale za to mo?e wej?? na serwer i w konsoli mu pisze kto go zbanowa? na ile i pow?d,powodem pewnie jest panel logowania ale nie wiem jak to zrobi? ?eby dzia?a?o
Prosz? o szybk? pomoc
Dodaje skrypt na panel logowania:
https://www79.zippyshare.com/v/gp2weyNb/file.html
631. MTA Nie da sie grac
Witam mam problem z serwerami mta, wbijam pogram z 2 min i blad cd09 ciagle internet dobry mam, reinstalacja gta sa, mta sa, ccleaner, zapory sieciowe, nie pomagaj?, nie mam cheat?w/mod?w/podmianek.
632. laczenie z db nie dziala
witam, nie dziala mi lacznosc z db a dokladniej gdy skrypt czegos potrzebuje to w db3 pokazuje sie dlugi blad :/

kod:
-- Settings
DBHandler
=nil
DBName
="nazwa"
DBUser="nick"
DBPass="haslo"
DBHost="host"

-- Functions
function dbSet(...)
    if 
not {...} then return end
    local query
=dbExec(DBHandler, ...)
    return 
query
end

function dbGet(...)
    if 
not {...} then return end
    local query
=dbQuery(DBHandler, ...)
    
local result=dbPoll(query, -1)
    return 
result
end

addEventHandler
("onResourceStart"resourceRoot, function()
    
DBHandler=dbConnect("mysql""dbname="..DBName..";host="..DBHost..""DBUserDBPass"share=1")
    if 
DBHandler then
        outputDebugString
("* Connect to server MYSQL...")
    else
        
outputDebugString("* No Connecting to server MYSQL..")
    
end
end
)

Oczywiscie luki dbPass itp sa dobrze wypisane tylko tutaj tak zrobilem bo nie chce podawac danych

blad w db3: fire-db/s_db.lua:18: dbPoll failed; You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ' fire-admin WHERE serial="mojserial" at line 1
633. Nie pokazują się punkty
Siema tak jak w temacie postawie piwo

function displayNextCP(el,md)
    if 
el~=localPlayer or not md then return end
    
if not getPedOccupiedVehicle(elthen return end
    
if jobTarget #jobPoints then
        
jobTarget=1
        showMarker
()
        
jobTarget=jobTarget+1
        showMarker
()
        
jobTarget=1
        showMarker
()
        if 
getElementData(localPlayer,"player:premiumpp"then -- z premk?
        
zarobek math.random(2500000,3000000) -- hajs ustal sam
        exports
.noti:showBox("error","Za piel?gnacje ro?lin otrzymujesz "..zarobek.." PLN")
        
triggerServerEvent("givePlayerMoney"localPlayerzarobek0)  
        else
        
zarobek math.random(2000000,2500000) -- bez premki hajs ustal sam
        exports
.noti:showBox("error","Za piel?gnacje ro?lin otrzymujesz "..zarobek.." PLN")
        
triggerServerEvent("givePlayerMoney"localPlayerzarobek0)
    
end
end
634. Nie wiem jak tutaj dodać zarobki dla premium
Siema tak jak w temacie

                zarobek math.random(15000,20000)
                
exports.noti:showBox("error","Za piel?gnacje ro?lin otrzymujesz "..zarobek.." PLN")
                
triggerServerEvent("givePlayerMoney"localPlayerzarobek0)  
635. Jak zmienić żeby heksa nie było widać tylko kolory w sc
Siema tak jak w temacie postawie piwo

[lua]local screenW, screenH = guiGetScreenSize()
local sx, sy = guiGetScreenSize()
local w, h=(sx/1680), (sy/1050)

function isMouseIn(psx,psy,pssx,pssy,abx,aby)
if not isCursorShowing() then return end
cx,cy=getCursorPosition()
cx,cy=cx*sx,cy*sy
if cx >= psx and cx <= psx+pssx and cy >= psy and cy <= psy+pssy then
return true,cx,cy
else
return false
end
end

local tabulator = false
local czcionka = dxCreateFont("f.ttf", 11*w)
local czcionka2 = dxCreateFont("f.ttf", 17*w)


local k = 1
local n = 13
local m = 13

if not czcionka then
czcionka = "default"
end

local zakladki = {
id = "ID",
name = "Nazwa",
reputation = "RP",
organization = "Organizacja",
uid = "UID",
ping = "Ping",
faction = "Frakcja",
forum = "mta-storiesrpg.pl"
}

local ss = 1
local tabulator=false
local ping = {}


function sort(op1, op2)
if isElement(op1) and isElement(op2) then
return getElementData(op1, "id") < getElementData(op2, "id")
end
end

function gui()
local players = {}
for i,v in ipairs(getElementsByType("player")) do
table.insert(players, v)
end
table.sort(players, sort)


dxDrawImage(530*w, 307*h, 612*w, 490*h, ":srpg-tab/bg.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
...
636. Jak gracz wychodzi nie usuwa się playerblips
Siema mam taki problem ?e jak kto? wychodzi z serwera nie usuwa si? blips

[lua]function onResourceStart ( resource )
for id, player in ipairs( getElementsByType ( "player" ) ) do
if ( players[player] ) then
createBlipAttachedTo ( player, 0, 2, players[source][1], players[source][2], players[source][3] )
else
createBlipAttachedTo ( player, 0, 2, color[1], color[2], color[3] )
end
end
end

function onPlayerSpawn ( spawnpoint )
if ( players[source] ) then
createBlipAttachedTo ( source, 0, 2, players[source][1], players[source][2], players[source][3] )
else
createBlipAttachedTo ( source, 0, 2, color[1], color[2], color[3] )
end
end

function onPlayerQuit ()
destroyBlipsAttachedTo ( source )
end

function onPlayerWasted ( totalammo, killer, killerweapon )
destroyBlipsAttachedTo ( source )
end

function setBlipsColor ( source, commandName, r, g, b )
if ( tonumber ( b ) ) then
color = { tonumber ( r ), tonumber ( g ), tonumber ( b ) }
for id, player in ipairs( getElementsByType ( "player" ) ) do
destroyBlipsAttachedTo ( player )
if ( players[player] ) then
createBlipAttachedTo ( player, 0, 2, players[source][1], players[source][2], players[source][3] )
else
createBlipAttachedTo ( player, 0, 2, color[1], color[2], color[3] )
end
end
end
end

function setBlipColor ( source, commandName, r, g, b )
if ( tonumber ( b ) ) then
destroyBlipsAttachedTo ( source )
play...
637. Celownik nie działa
Jak namierzam suszarka lub jak?? broni? to nie wida? celownika a ja zrestartuje skrypt gui to sie pojawia,lecz jak zrobie reconnecta to juz go nie ma,nie wiem jak to naprawi?

Kod:

addEventHandler("onClientResourceStart", resourceRoot, function()
showPlayerHudComponent("all",false)
showPlayerHudComponent("radar",true)
showPlayerHudComponent("crosshair",true)
showPlayerHudComponent("weapon",false)
showPlayerHudComponent("health",false)
showPlayerHudComponent("breath",false)
showPlayerHudComponent("ammo",false)
end)


Chce ?eby tylko celownik by?,a w skrycie jest dobrze napisane lecz go nie ma
Prosz? o pomoc :mrgreen:
638. Dashboard dziala ale nie do konca
Witam, pisze dashboard ale nie dziala, po kliknieciu w dane miejsce nie pokazuje img menu postaci

kod:

[lua]--[[
Info Author: flyBoi_
For resource: InvisibleGame
All rights reserved by InvisibleGame and flyBoi_
----------------------------------------------------
Info Autor: flyBoi_
Dla zasob?w: InvisibleGame
Wszystkie prawa zastrze?one przez InvisibleGame i flyBoi_
]]--

local amercian10 = dxCreateFont("font/american.ttf", 10)
local sx, sy = guiGetScreenSize()
wlaczone = false
aktualnie = glowna

function isMouseIn(psx,psy,pssx,pssy,abx,aby)
if not isCursorShowing() then return end
cx,cy=getCursorPosition()
cx,cy=cx*sx,cy*sy
if cx >= psx and cx <= psx+pssx and cy >= psy and cy <= psy+pssy then
return true,cx,cy
else
return false
end
end

addEventHandler("onClientClick", root, function(btn,state)
if btn=="left" and state=="down" then
if wlaczone == true then
if isMouseIn(20/1780*sx, 250/1780*sy, 180/1780*sx, 60/860*sy) then
aktualnie = postac
end
end
end
end)

addEventHandler("onClientRender", root, function(plr)
if wlaczone == true then
if aktualnie == glowna then
dxDrawImage(0/1780*sx, 0/860*sy, 1780/1780*sx, 860/860*sy, "img/db_glowna.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
--dxDrawRectangle(20/1780*sx, 250/1780*sy, 180/1780*sx, 60/860*sy, tocolor(255, 0, 0, 180)) -- to bylo pomoc...
639. Nie działa zrobiłem żeby tylko prawko L
Siema chcia?em zmieni? kordy ?eby jak nie zdam prawka ?eby tam tepa?o na podane kordy

addEventHandler("onPlayerQuit"root, function()
    
local veh=getPedOccupiedVehicle(source)
    if 
not veh then return end
    
if getVehicleController(veh) ~= source then return end
    
if not getElementData(veh,"vehicle:lic"then return end
    destroyElement
(veh)
    
destroyElement(elka)
end)

addEventHandler("onVehicleDamage"resourceRoot, function(loss)
    if 
getElementData(source,"player:license:pjL"then return end
    local kierowca
=getVehicleController(source)
    if 
not kierowca then return end
    
if not getElementData(source,"vehicle:lic"then return end
    destroyElement
(source)
    
destroyElement(elka)
    
outputChatBox("* Uszkodzi?e?(a?) pojazd, nie zdajesz egzaminu!"kierowca25500)
    
triggerClientEvent(kierowca"license:finish"resourceRoottrue)
    
setElementDimension(kierowca0)
    
fadeCamera(kierowca,false,1)
    
setTimer(fadeCamera,1000,1,kierowca,true,1)
    
setTimer(setElementPosition,1001,1,kierowca,399.87,2532.34,16.54)    
end)
640. Nie mogę zmienić auta innego nisz Sweeper
Siema zmieniam id innego pojazdu i nie nalicza ?mieci o co chodzi

Kod:
for i,v in ipairs(ustawioneAuta) do
    
local veh createVehicle(423v[1], v[2], v[3])
    
setElementData(veh,"vehicle:desc","Sprz?tanie ulic San AndreasnSweepery imienia kononowicza")
    
toggleVehicleRespawn(vehtrue)
    
setElementFrozen(veh,true)
    
setVehicleColor (veh0204153)
    
setVehicleHandling(veh,"maxVelocity",130)
end

addEventHandler
("onVehicleEnter"resourceRoot, function(plrseat)
    if 
seat == 0 then 
        outputChatBox
("Rozpocz??e? prac? zbierania ?mieci.",plr,255,255,255)
        
outputChatBox("Aby je zbiera? je?dzij po mapie.",plr,255,255,255)
        
local v getPedOccupiedVehicle(plr)
                
triggerClientEvent(plr"PokazKGokno"resourceRoot)
        
setElementFrozen(v,false)
        
setElementData(v,"viewki",0)
        
setElementData(plr,"pracaView",true)
        
toggleControl (plr"brake_reverse"false )
                
setPlayerHudComponentVisible (plr"area_name"false)
    
end
end
)
addEventHandler("onVehicleExit"resourceRoot, function(plrseat)
    if 
seat == 0 then 
                toggleControl 
(plr"brake_reverse"true )
                
triggerClientEvent(plr"UsunKGokno"resourceRoot)
    
end
end
)