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: usuwanie
1. usuwanie pojazdu

addCommandHandler
("auto", function(plrcmdid)
if 
getElementData(plr"user:duty") >2 then
if not id then 
outputChatBox
("U?yj /auto id"plr255255255true)

 return 
end
local dim 
getElementDimension(plr)
local x,y,getElementPosition(plr)
local r1,r2,r3 getElementRotation(plr)
local xygetElementPosition(plr)
 if 
getPedOccupiedVehicle(plrthen
outputChatBox
("Nie mo?esz podmienia? aut",plr)
else
local veh createVehicle(idxyzr1r2r3)
setElementDimension(vehdim)
setElementPosition(plr,xyz+1.5)
setVehiclePlateText(veh"RESPIONY"
setElementData(veh"veh:bak",100
setElementData(veh"veh:pojemno??","2"
setElementData(veh"veh:mk1"
setVehicleOverrideLights(veh2)
addVehicleUpgrade(veh1080)
setVehicleColor(veh255,255,255)
if 
seat ~= 0 then return end
destroyElement
(source)
addEventHandler("onVehicleExit"veh, function(plr,seat)
end)
end
end
end
)

kto? wyt?umaczy mi dlaczego po wyjsciu nie usuwa sie? czy mo?e czego? nie widze?

[ Dodano: 2022-02-13, 16:05 ]
@lock
2. Timer na usuwanie auta
[code]


local zablokowane ={
['hydra'] = true,
['rhino'] = true,
['hunter'] = true,
['Trailer 1'] = true,
['Trailer 2'] = true,
['Trailer 3'] = true,
['Trailer 3'] = true,
['Box Freight'] = true,
['Box Freight'] = true,
}

function cv(plr, cmd, ...)
if getElementData(plr,"player:admin") ~= true then return end
if getElementData(plr, "player:level") == 4 or 3 then
if (not ...) then
outputChatBox("#FF0000* #FFFFFFPoprawne u?ycie: /cv <model>", plr,0,0,0,true)
return
end
local model = table.concat ( { ... }, " " )
if tonumber(model) ~= nil then
outputChatBox("#FF0000* #FFFFFFWpisz model a nie ID!", plr,0,0,0,true)
return end
local model = model:lower()
if zablokowane[model] then
outputChatBox("#FF0000* #FFFFFFTen pojazd jest zablokowany!", plr,0,0,0,true)
return end
local dim = getElementDimension(plr)
local int = getElementInterior(plr)
local x,y,z = getElementPosition(plr)
local r1,r2,r3 = getElementRotation(plr)
local model = getVehicleModelFromName(model)
if not model then outputChatBox("#FF0000* #FFFFFFNie ma takiego pojazdu!", plr,0,0,0,true) return end
local vehicle = getPedOccupiedVehicle(plr)
if getPedOccupiedVehicle(plr) then
outputChatBox("#FF0000* #FFFFFFNajpierw wysi?d? z pojazdu!", plr,0,0,0,true)
else
pojazd = ...
3. Usuwanie statystyk - PYS 3.0
Witam, na paczce PYS 3.0 nie zapisuj? si? statystyki gdy wyjdziemy z serwera podczas wybierania miejsca spawnu (ale w innych przypadkach si? zapisuj?). A wi?c przychodz? z zapytaniem co nale?y zrobi?, aby te statystyki zapisywa?y si? zawsze.
4. Usuwanie obiektu.
Witam mam pytanie w jaki spos?b usun? obiekt, przez gettext.


Jest to odpalane przez onClientClick i pozycje, Strona clienta.


idobject
=exports["pystories-editbox"]:getText"objectid" )






Strona servera


    
function object(source,command)
    if 
getElementData(source,'player:faction') and getElementData(source,'player:faction')=='SAPD' then
        local rbs 
getElementData(source,'player:rbs') or {}
                        
               
local x,y,getElementPosition(source)
    
                
local rotX,rotY,rotZ getElementRotation(source)
                
local obj createObject(1228,x,y,z-0.65,0,0,rotZ)
                
table.insert(rbs,obj )
                --
setElementPosition sourcexy)
                
triggerClientEvent("setBreakable",root,obj)
                
setElementFrozen(obj,true)
                
outputChatBox('* #FFFFFFPostawi?e?(a?) object&#8211; '..#rbs, source, 255, 255, 0, true)
                
objectjesttrue
                setElementData
(source,'player:rbs',rbs)
                
setElementInterior(objgetElementInterior(source))
                
setElementDimension(objgetElementDimension(source))
    
end
    end



Strona servera event kt?ry eksportuje mi warto?ci z idobject


addEvent
("pokazHaslo"true)
addEventHandler("pokazHaslo"root, function(editbox,value,plr)
5. Usuwanie obiektu
Jak usun?? t? stacje na doherty, link do imgura: https://imgur.com/undefined
6. usuwanie obietku


Siema wie kto? jak to usun?c daje bardzo zimne piwko z zamra?alnika

[ Dodano: 2021-02-28, 14:25 ]
[wiki]setVehicleHandling[/wiki]
7. Usuwanie danych z gridlist
Witam, przychodz? z zapytaniem jak wywali? wybrane elementy w grindliscie.



Dok?adnie chodzi mi o to ?eby po klikni?ciu w button "Wyznacz trase" zaznaczona "trasa" znika?a.

Wszystkie trasy zapisuj? si? na jedn? elementdate wi?c je?li trzeba mo?na zmieni?.




trasy 
= {
    {
lok = {2588.882190.2010.82}, rodzaj="paczka"},
    {
lok = {1101.241724.9710.82}, rodzaj="polecony"},
    {
lok = {1895.48, -2068.9215.67}, rodzaj="polecony"},
    {
lok = {2470.07, -2598.1913.66}, rodzaj="paczka"},
    {
lok = {2470.41, -2607.3213.66}, rodzaj="paczka"},
}
function 
ZaladujTowary(v)

    
setElementData(v"kurier:trasy"trasy)
    
triggerEvent("onClientAddNotification"localPlayer"Za?adowano paczki.""success")

end


[ Dodano: 2021-02-26, 14:21 ]
Nie wa?ne mo?na zamkn?? table.remove oraz table.insert pomog?o.
8. Usuwanie zmiennej na pętli
Nie wiem czy dobrze napisa?em tytu? samego postu natomiast chodzi mi o takie co?, ?e
Kod:

local isMarkers = {
{"Dom1", 3000},
{"Dom2", 4000},
{"Dom3", 5000},
}

i chcia?bym na przyk?ad usun?? Dom3 czyli na p?tli ?eby nie pokazywa?o ju? domu3
Za pomoc daje piwko :D :piwo:
EDIT: chodzi mi o to zeby funkcj? usunac dom3
9. Usuwanie pojazdu jednej osobie
Witam mam pytanie jak zrobi? usuwanie pojazdu tylko dal jednej osoby.



destroyElement
(auto)
10. usuwanie syren
Witam, u?y?em funkci removeVehicleSirens a one nie znikaja, dzwi?k tez zostaje.
Co robi??
Kod:
local karetka1 createVehicle(416, -2589.40845658.2318714.453130090)
    
removeVehicleSirens(karetka1)
    
setVehiclePlateText(karetka1"S01")


Jest to strona serwera
11. Usuwanie obiektów z for iv in pairs
Chce usun?c WSZYSTKIE obiekty na raz z iv inpairsa ale nie umiem :/

local obj
function niedzialami()
      if 
obj and isElement(objthen
            destroyElement
(obj)
            
obj nil
end
end

    
for i,v in pairs(cialo2) do
        
markery=createMarker(v[1],v[2],v[3]-1,"cylinder",1,255,255,255,255,el)
        
local losuj math.random(1,#objekty)
        
blipchuj=createBlip(-1900.24,860.99,35.02,12)
        
obj=createObject(objekty[losuj][1],v[1],v[2],v[3],360,360,0)
        
addEventHandler("onClientMarkerHit",markery,wlazwmarker)
    
end
12. usuwanie pojazdu gracza po stronie clienta (onCResourceStop)
CSIDE



local jobVehicle





addEvent
("wudka",true)
addEventHandler("wudka",resourceRoot,function(veh)
    
jobVehicle=veh



UZYTE W FUNKCJI LINIJKE POD STWORZENIEM LODZI 
!
triggerServerEvent("lodka",resourceRoot)




addEventHandler("onClientResourceStop"resourceRoot, function()
    if 
jobVehicle and getElementData(localPlayer"player:job"then
        setElementData
(localPlayer"player:job"false)
        
triggerServerEvent("rozwal",root,jobVehicle
    
end
end
)


SSIDE


local lodz
addEvent
("lodka",true)
addEventHandler("lodka",resourceRoot,function()
    
triggerClientEvent(client,"wudka",resourceRoot,lodz)
end)

addEvent("warplodz",true)
addEventHandler("warplodz",resourceRoot,function(el)
if 
not el then return end
lodz 
createVehicle(595, -1900.601403.900.003.1358.7349.6)
end)

13. usuwanie lodzi
addEventHandler("onClientVehicleExit"resourceRoot, function(plrseat)
    if 
seat == 0 then
        
if plr == localPlayer then
                triggerEvent
('onClientAddNotification'localPlayer'Pomy?lnie zako?czono prac?:#00c005nKierowca pojazdu Street View''success')
                
destroyElement(source)
                                
zakonczprace()
        
end
    end
end
)


elementem source jest lodz po wyjsciu z niej lodz sie nie usuwa i nie zakancza sie praca (NA AUTA NORMALNIE DZIALA)
14. usuwanie kary bez wychodzenia z serwera
Tak jak w temacie jak mog? to przerobi? (obecnie jest to przy wczytaniu konta) by kara usun??a si? bez konieczno?? wyj?cia z serwera

        local mute 
exports['pystories-db']:dbGet('select * from ec_kary where serial=? AND date>now()',getPlayerSerial(plr))
        if 
#mute > 0 then
            
plr:setData('player:mute',true)
            
outputChatBox('Jeste? wyciszony do: '..mute[1].date,plr)
        else
            
exports["pystories-db"]:dbSet("DELETE FROM ec_kary WHERE serial=? AND type=? AND active=1 AND date<NOW()"getPlayerSerial(plr),"mute")
        return 
false
    end
15. usuwanie markera czyli nie wiem jak użyć destroyElement
hey, ot?z korzystam z funckji lecz nie chce usuwa? markera


markers 
= {
    {-
2402.7924.1535.30},
    {-
2401.0424.1535.30},
    {-
2394.2522.4435.30},
    {-
2394.2520.4235.30},
    {-
2395.2015.2035.30},
    {-
2396.3514.0435.30},
    {-
2402.4913.7535.30},
    {-
2404.7613.7535.30},
    {-
2409.6524.9335.30},
    {-
2398.7820.1035.30},
}

for 
i,pos in ipairs(markers) do
    
markers[i] = createMarker(pos[1], pos[2], pos[3]-1,"cylinder",1.3,255,0,0,255)
    
addEventHandler("onMarkerHit"markers[i], Usuwanko)
end

function Usuwanko(player)
if 
getElementType(player) == "player" then
destroyElement
(markers[i])
                    
outputChatBox("marker.",player,255,255,255,true)
end
end

no i jak wejd? w kt?ry kolwiek z marker?w aby nie usuwa?y wszystkich tylko ten co gracz do niego wszed?. Musz? rozwi?za? ten problem, je?li ktos wie jak poprawinie u?y? wynagrodz? piwkiem i reputacj?
16. Usuwanie pojazdu
Witam, mam ot?? taki problem, gdy gracz jest w poje?dzie i wyjdzie z gry. To nie usuwa pojazdu jak to mog? naprawi? ?
b??d w db3
[code]
Bad argument @ 'destroyElement' [Expected argument 1, got nil]
[/code]
B??d jest tutaj
[lua]
destroyElement(pojazd[client])
[/lua]

[lua]
addEvent("cvmagazyn", true)
addEventHandler("cvmagazyn", root, function()
--[[if (getElementData(client, "praca") == "magazyn") == true then
triggerClientEvent(client, "onClientAddNotification", client, "Ju? pracujesz jako magazynier !", "info")
return end ]]
triggerClientEvent(client,"onClientAddNotification", client, " Rozpoczynasz prac? magazyniera.n Na poziomie II", "info")
pojazd[client] = createVehicle(530, -1558.89,1170.75,6.95,359.1,360.0,94.3)
setElementData(pojazd[client], "vehicle:przeglad", "TAK")
--setVehicleHandling(pojazd, "maxVelocity", 100)
setVehicleHandling(pojazd[client], "engineAcceleration", 12)
warpPedIntoVehicle(client, pojazd[client], 0)
setVehicleColor(pojazd[client], 255,200,0)
setVehiclePlateText(pojazd[client], "M-WI")
setElementData(pojazd[client], "vehicle:fuel", 30)
setElementData(pojazd[client], "vehicle:bak", "35")
setElementData(pojazd[client], "vehicle:olej", 5)
toggleControl(client, "special_control_down", false)
toggleControl(client, "...
17. usuwanie poszczególnej wartości z tabeli
no witam, tak jak w temacie. Wstawi?em do tabeli np: "myd?o" i teraz chce tylko je usun??. Pr?bowa?em table.removeValue ale co? nie siada. Licz? na pomoc. Z g?ry dzi?ki.
18. Usuwanie pojazdu
Siemka, robi? gara? i mam taki problem, ?e nie usuwa mi pojazd?w jak z niego wyjd?. W db3 brak b??d?w https://pastebin.com/q0w25dRS
19. usuwanie buttona
hey po kliknieciu button si? nie usuwa pomocy
client-side
        
ehhAnuluj 
guiCreateButton(98667621156"anuluj button"false)

function 
wylaczgui()
    
guiSetVisible(ehhAnulujfalse)
    
showCursor(false)
end
addEventHandler
("onClientGUIClick"ehhAnulujwylaczguifalse)
20. usuwanie powiadomienia
Witam g?owinie chodzi o ''* Nick is now known as Nick''
Pojawia si? zawsze gdy kto? wchodzi na serwer lub wchodzi na duty administracji i frakcji. nie ogarniam za dobrze wiec prosz? dajcie jako? ?atwo opisane
21. usuwanie markera
no wszystko dzieje si? fajnie dop?ki ma si? usun?? marker pokazuje si? komunikat po wej?ciu ale marker jak stoi tak stoi

addEventHandler
("onVehicleEnter"resourceRoot, function(plr,seat)
    if 
seat ~= 0 then return end
    setElementFrozen
(source,false)
    
setVehicleDamageProof(sourcefalse)
    
setElementData(plr,"player:job",code)
    
outputChatBox("* Rozpocz??e?(a?) prac?!"plr)
    
outputChatBox("* Dosta?e? zg?oszenie!"plr)
                          
triggerClientEvent(plr,'okuczesie',plr)
losuj math.random(1#miejscaulotk)
jobMarker createMarker(miejscaulotk[losuj][1],miejscaulotk[losuj][2],miejscaulotk[losuj][3]-0.90,"checkpoint",3,0,255,170)
blip createBlipAttachedTo(jobMarker21)
addEventHandler("onMarkerHit",jobMarker,
function(
element,md)
    
local type getElementType(element)
    if 
type == "player" then
            outputChatBox
("Odebra?e? klienta zwie? go",element,255,255,255,true)
                
jobMarker nil  -- tu ma siusun?? marker ale sitak nie dzieje
    end
    end
)
end)

piwka daj? za jak? kolwiek podpowied?
22. Usuwanie pojazdów ze standardowej mapy.
Jak si? uruchamia serwer to wraz z nim uruchamia si? standardowa mapa chyba o nazwie freroman. Wiem ?e chc?c usun?? pojazdy z tej mapy to trzeba edytowa? odpowiedni plik. Czy da si? takie pojazdy usun?? za pomoc? jakie? funkcji czy na to jest tylko taki spos?b jak wspomnia?em wy?ej?
23. usuwanie gui
Witam mam pewien problem mianowicie nie usuwa mi gui po wykryciu bana

[lua]
function sprawdzbana()
local result=exports["tiyl-db"]:dbGet('SELECT * FROM tiyl_bany WHERE (serial=? or ip=? or nick=?) and active=1 and type=? and date>now() limit 1', getPlayerSerial(source), getPlayerIP(source), getPlayerName(source), 'ban')
if result and #result > 0 then
triggerClientEvent(source,'wylacz:logowanie',resourceRoot,true)
else
exports["tiyl-db"]:dbSet('UPDATE tiyl_bany SET active=0 WHERE (serial=? or ip=? or nick=?) and type=? limit 1',getPlayerSerial(source), getPlayerIP(source), getPlayerName(source), 'ban')
end
end
addEventHandler('onPlayerConnect',root,sprawdzbana)
[/lua]

[lua]
addEvent("wylacz:logowanie", true)
addEventHandler("wylacz:logowanie", resourceRoot, function(value,info,q)
if not info then return end
if value then
data.showed=false
showZones(data.misc)
removeEventHandler("onClientRender", root,panel_logowania)
exports['editbox']:destroyCustomEditbox('Logowanie-LOGIN')
exports['editbox']:destroyCustomEditbox('Logowanie-HASLO')
exports['editbox']:destroyCustomEditbox('Logowanie-PIN')
exports['editbox']:destroyCustomEditbox('Logowanie-SERIAL')
if sound then
destroyElement(sound)
sound = false
end

s_music = playSound('misc/music_ban.mp3', true)
setSoundVolume(s_music, 1)

addEventHandler('onClientRender', root, gui)

if q ...
24. Usuwanie pojazdu
Witam, ot?? mam problem, dok?adniej nie wiem jak usun?? pojazd gdy ten wjedzie w marker, pr?bowa?em tak


function ShowMarker(el4)
local marker2 createMarker(-1891.13,1360.56,7.19-1.1,"cylinder"62551700,100)
destroyElement(veh)
end
addEventHandler
"onMarkerHit"marker2ShowMarker)





kod
local ciezarowka createMarker(-1976.12,1329.43,7.19-1.1"cylinder"22551700100)

function 
MarkerHit(el2)
if 
getElementData(el2"player:ciezarowka"truethen 
    triggerClientEvent
(el2"onClientAddNotification"el2"Posiadasz ju? zrespion? ci??ar?wk? !""info")        
return 
end

local veh 
createVehicle(433,-1955.59,1326.85,7.68,0.5,360.0,180.5)
warpPedIntoVehicle (el2veh0)
setElementData(el2"player:ciezarowka"true)
setElementData(veh"vehicle:bak"125)
setElementData(veh"vehicl:fuel"math.random(55,125) )
ShowMarker()
end


addEventHandler
"onMarkerHit"ciezarowkaMarkerHit )




function 
ShowMarker(el4)
local marker2 createMarker(-1891.13,1360.56,7.19-1.1,"cylinder"62551700,100)
destroyElement(veh)
end
addEventHandler
"onMarkerHit"marker2ShowMarker)
25. Usuwanie broni z eq po wykorzystaniu sie amunicji
Witam, jak doda? usuwanie broni z eq jezeli skonczy sie z niej amunicja? Posiadam ekwipunek z newplace. Dodalem bronie do eq i teraz chcialbym zeby po wyjeciu z eq broni i wykorzystaniu calej amunicji usuwalo bron z eq?
26. Usuwanie zniszczonych pojazdów?
Jak usun?? z mapy zniszczone pojazdy?
27. Usuwanie Reportów
Witam ot?? ogarn??em sobie dzi?ki pomocy jednego z u?ytkownik?w tego forum usuwanie report?w z odpowiedziami, mam jeden problem nie mog? dobrze tego podpi?? by usuwa?o report z tabeli.
[lua]
triggerEvent("admin:removeReport", resourceRoot, id)[/lua]
kod
s.lua
[lua]function RGBToHex(red, green, blue, alpha)
if((red < 0 or red > 255 or green < 0 or green > 255 or blue < 0 or blue > 255) or (alpha and (alpha < 0 or alpha > 255))) then
return nil
end
if(alpha) then
return string.format("#%.2X%.2X%.2X%.2X", red,green,blue,alpha)
else
return string.format("#%.2X%.2X%.2X", red,green,blue)
end
end
--admins
function getAdmin(plr,level)
if level then
local result=exports["ogrpg-db"]:dbGet("SELECT * from ogrpg_admins WHERE serial=? AND level=?", getPlayerSerial(plr), level)
if result and #result > 0 then
return true
else
return false
end
else
local result=exports["ogrpg-db"]:dbGet("SELECT * from ogrpg_admins WHERE serial=?", getPlayerSerial(plr))
if result and #result > 0 then
return true
else
return false
end
end
end



function getLevel(plr)
if plr then
local result=exports["ogrpg-db"]:dbGet("SELECT level from ogrpg_admins WHERE serial=? limit 1", getPlayerSerial(plr))
if result and #result > 0 then
if tonumber(result[1].level) > 0 then
return result[1].level
else
...
28. Usuwanie Reprotow
Witam ot??, mam pro?b? pom?g? by mi kto? to ogarn?? ze jak wpisujemy /cl id pow?d, to wy?wietla si? to graczowi np /cl 2 ju? IDE. Naprawd? prosi?bym o pomoc
kod

[lua]function RGBToHex(red, green, blue, alpha)
if((red < 0 or red > 255 or green < 0 or green > 255 or blue < 0 or blue > 255) or (alpha and (alpha < 0 or alpha > 255))) then
return nil
end
if(alpha) then
return string.format("#%.2X%.2X%.2X%.2X", red,green,blue,alpha)
else
return string.format("#%.2X%.2X%.2X", red,green,blue)
end
end
--admins
function getAdmin(plr,level)
if level then
local result=exports["ogrpg-db"]:dbGet("SELECT * from ogrpg_admins WHERE serial=? AND level=?", getPlayerSerial(plr), level)
if result and #result > 0 then
return true
else
return false
end
else
local result=exports["ogrpg-db"]:dbGet("SELECT * from ogrpg_admins WHERE serial=?", getPlayerSerial(plr))
if result and #result > 0 then
return true
else
return false
end
end
end



function getLevel(plr)
if plr then
local result=exports["ogrpg-db"]:dbGet("SELECT level from ogrpg_admins WHERE serial=? limit 1", getPlayerSerial(plr))
if result and #result > 0 then
if tonumber(result[1].level) > 0 then
return result[1].level
else
return false
end
else
return false
end
end
end

--

function cmd_admins(plr)
if not...
29. ID oraz usuwanie obiektu
Siemanko,mam pytnko.Mo?e kto? zna ID tego obiektu lub ma jakis pomysl jak to wyszuka?.Chce to usunac a gdy usuwam wszystko dooko?a to to co chce usunac zostaje.Wiem jak usunac skryptem lecz nie wiem jakie to ma ID.Przeszukalem wszystkie obiekty w edytorze i nie znalazlem.SS PONI?EJ..za pomoc piwko.dzieki


30. Usuwanie pojazdu
Witam ot?? robi? prac? po stronie servera, pom?g?by kto?, ot?? chce jak wyjdziemy z pojazdu, to pojazd nam usuwa, jako? nie mg tego ogarn??
kod
 local p1 createMarker(-2293.77, -52.9661.96,"cylinder",4.0255800

function 
MarkerHithitElementmatchingDimension 
    
local elementType getElementTypehitElement 
    
outputChatBoxelementType.."Zrespi?e? pojazd, dostarcz ?adunek"getRootElement(), 255255
    
local veh createVehicle (480, -2293.54, -38.7961.59
    
warpPlayerIntoVehicle (hitElementveh0
end
addEventHandler
"onMarkerHit"p1MarkerHit 















31. Usuwanie pojazdu
Witam mam pytanie co zrobi? aby pojazd po zako?czeniu pracy si? usuwa?
oto ostatnia cz??? kodu

[lua]
addEventHandler("onClientMarkerHit", resourceRoot, function(hit)
if hit ~= localPlayer then return end
if source ~= p.marker then
local trawa = getElementData(hit, "trawa")
if trawa > 99 then
("text")
return
end
local traw = math.random(1,4)
setElementData(hit, "trawa", trawa+traw)
if getElementData(hit, "trawa") > 100 then
setElementData(hit, "trawa", 100)
end
destroyElement(getElementData(source, "object"))
destroyElement(source)
end
end)

addEventHandler("onClientMarkerHit", resourceRoot, function(hit)
if hit ~= localPlayer then return end
if source ~= p.marker then return end
local pojazd = getPedOccupiedVehicle(hit)
if not pojazd then return end
local trawa = getElementData(hit, "trawa")
if not trawa then return end
local hajs = getElementData(hit, "pieniadze")
if trawa < 1 then return end
fadeCamera(false)
("") -- notyfikacja
setElementFrozen(pojazd, true)
setTimer(function()
fadeCamera(true)
setElementFrozen(pojazd, false)
local wyplata = 450*trawa/100
wyplata = string.format("%1.2f", wyplata)
setElementData(hit, "pieniadze", hajs+wyplata)
trawa = string.format("%1d", trawa)
noti("") -- to ...
32. Usuwanie pojazdu po wyjściu z niego
Witam ot?? dopisze mi kto?, ?e gdy si? wyjdzie z lawety usuwa pojazd? Za dobr? odpowied? stawiam zimne :piwo:
kod
[lua]--[[
Kod stworzony przez Emm dla serwisu GTAONLINE.PL
Zakaz usuwania autora skryptu, podpisywania si? pod MOJ? prac?
Nazwa: Praca - kierowca lawety w salonie SF
?ycz? mi?ego u?ytkowania! Pozdrawiam, Emm.
2016 © Emm
]]

blip_pracy = createBlip(-1922.90930, 303.48703, 41.04688, 52)
marker = createMarker(-1924.37415, 297.96210, 41.04688-1, "cylinder", 1.1, 255, 0, 0, 100)
marker_koniec = createMarker(-1922.79883, 303.53638, 41.04688-1, "cylinder", 5, 100, 100, 255, 80)

miejsca_dowozow = {
-- {x, y, z, "miejsce_do_outputchatbox'a", kwota_do_wyp?acenia},
{-2067.39722, 960.78320, 60.00156, "Calton Heights, San Fierro", 40},
{-121.15815, 1072.57422, 19.80778, "Fort Carson", 120},
{-2128.41821, 214.62218, 34.7170, "Doherty, San Fierro - teren budowy", 20},
{-2317.01489, -154.91240, 34.73012, "Garcia, San Fierro", 50},
{-2449.26147, -163.81157, 34.74252, "Hashbury, San Fierro", 60},
{132.05309, 1948.73438, 18.78655, "Baza wojskowa - Area 69, Bone County", 200},
{-2248.56079, -1721.66394, 479.58038, "Szczyt Mount Chillad, okolice Angel Pine", 600},
{1957.75854, -2181.17480, 12.95658, "Lotnisko, Los Santos", 230},
{1928.59595, -1795.08118, 12.79196, "Idlewood, Los Santos - stacja benzynowa", 215},
{1064.25964, -1303.93...
33. Usuwanie możliwośći tp do przecho
Witam ot?? usuniecie mi linijki kt?re teleportuj? pojazd do przecho po zamontowaniu neon?w?
kod

defs_c.lua
[lua]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 secondsToClock(seconds)
seconds = seconds or 0
if seconds <= 0 then
return "00:00:00"
else
hours = string.format("%02.f", math.floor(seconds/3600))
mins = string.format("%02.f", math.floor(seconds/60 - (hours*60)))
secs = string.format("%02.f", math.floor(seconds - hours*3600 - mins *60))
return ""..hours.." godzin "..mins
end
end[/lua]

s.lua

[lua]elements = {}
elements["positions"] = {
["EZ 3"]={
marker = {-2138.74, -110.33, 34.88},
cuboid = {-2138.74, -110.33, 34.88, 4},
text = "Monta? wzmocnie?"
},
}

local napis=createElement("text")
setElementData(napis, "name", "Montarz PaintJob'anCena 5kk")
setElementPosition(napis, -2138.74, -110.33, 34.88)

for i,v in pairs(elements["positions"]) do
v.cuboid = ColShape.Sphere(unpack(v.cuboid))
v.ma...
34. Usuwanie busa po dostaniu prawka
Witam, ot?? mam taki problem ?e nie wiem jaki kod da? do tego aby usuwa?o oraz zaka?cza?o prace kiedy dostaniemy zakaz prowadzenia A/B/C.
Wiem ?e to jest bardzo banalne ale dzi? co? nie mam do tego g?owy stawiam piwko :D
35. Usuwanie obiektu
Mam taki problem z kurierem:

addEventHandler("onClientPlayerVehicleExit"getRootElement(),
function (
vehicleseat)
        if 
getElementData(localPlayer"kurierPraca") == true then
                    skrzynia
[source] = createObject(1271000) ---------------- tak to tworze
                    attachElements 
skrzynia[source], source00.50.6)
                    
setPedAnimation localPlayer"CARRY""crry_prtial"1,true )
                    
setElementCollisionsEnabled(skrzynia[source], false)
                    
toggleControl"jump"false )
                    
toggleControl"sprint"false )
                
toggleControl"crouch"false )
        
end
end
)
To dzia?a ale to:
addEventHandler("onClientVehicleStartEnter"root, function(player,seat,door)
    if 
player == localPlayer then
        outputChatBox
("test") --------- to dziala
                destoyElement
(skrzynia[player]) ------------ a tu nie znika skrzynia
    end
end
)



:piwo: + R*
36. Usuwanie objektu
Witam!
Mam problem, ot?? gdy pr?buj? usun?? gara? w Map Editorze, to go nie usuwa, a np. drzewo ju? tak.

Chodzi mi o ten gara? na doherty:
https://imgur.com/a/KDsmEnA
37. Usuwanie plików C-Side
Witam, jak mog? zrobi? aby automatycznie usuwa?o graczowi pliki po stronie Clienta? Z g?ry dzi?kuj?.
38. Usuwanie Raporta
Witam!
Ot?? mam pewien problem.. gdy usuwam reporta na gracza to powinien mu si? wy?wietli? komunikat: Twoje zg?oszenie przyj??: (PenkY) z odpowiedzi?.. lecz niestety to si? nie dzieje i zamiast jemu wy?wietla si? mi.. M?g?by mi kto? w tym pom?c? ustawi? kod tak aby jemu si? wy?wietla?o? stawiam R* :piwo:

[lua]
addCommandHandler("cl", function(plr,cmd,id,...)
if not getAdmin(plr) then
exports["lr_noti"]:addNotification(plr, "* Nie posiadasz uprawnie?.", plr, 255, 0, 0)
return
end
if not id then
exports.lr_noti:addNotification(plr, "Nie wybra?e? ID gracza!", plr)
return
end
local reason=table.concat({...}, " ")
local target=exports["pystories-core"]:findPlayer(plr,id)
opis = "Brak Online"
if target then
id=getElementData(target,"id")
opis=getPlayerName(target)
end
for i,v in ipairs(getElementsByType("player")) do
if getAdmin(v) then
-- if getElementData(v,"player:admin") then
triggerEvent("admin:removeReport", resourceRoot, id)
outputChatBox("#FFFF00CL #FFFFFF> #FF0000"..getPlayerName(plr):gsub("#%x%x%x%x%x%x","").." #919191usun??/??a raport na: #FF0000"..opis:gsub("#%x%x%x%x%x%x","").."#919191/#FF0000"..id.."#919191: #919191"..reason, v, 255, 0, 0, true) -- end
end
end
outputChatBox("* Twoje zg?oszenie przy...
39. Usuwanie pojazdow za jednym zamachem
Postawi?em sporo samochod?w na serwerze za pomoc? panela admina i jak je teraz usun?? za jednym zamachem?
40. Usuwanie markera
Siema, jak zrobi?, ?eby przez servera usuwa?o marker i blip po stronie klienta?

C:

    mlv2 
createMarker(-2043.41919, -96.9551735.16406-0.9"cylinder"3)
    
blv2 createBlipAttachedTo(mlv241)