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

Wysłany: 2018-12-03, 22:09


Wrobel16







Wiek: 22
Na forum: 2908 dni
Posty: 4
Nick w MP: ./.



Respekt: 50

Witam chcialbym was zapytac jak stworzyc komende na respienie auta a chcialbym aby ta komenda wygladala tak /p i model auta
lecz nie wiem gdzie i jak to zrobic.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-12-05, 13:30


SOURCE12

Skrypter






Wiek: 24
Na forum: 3261 dni
Posty: 34
Nick w MP: NitroGame888

Piwa: 125

Respekt: 45,3

Ostrzeżeń: 60%
Napisz Priv na gg, lub discord to ci pomog? to zrobi? :)
Discord: PredatorV2
GG: 65794578

Komentarz Gregory. dodany 2018-12-06, 21:18Pomagamy na forum, zapamiętaj to.
Podpis
××× Skrypter SAMP ×××
××× Kierowca ×××
|•| SAMP 0.3-DL SURVIVAL [PL] |•|
IP: 51.83.217.86:7757
Discord: https://discord.gg/574Vxu9BEC
Postaw piwo autorowi tego posta
 

 
Więcej szczegółów
Wystawiono 1 piw(a):
Kobar19
Wysłany: 2018-12-05, 13:31


rresz







Wiek: 25
Na forum: 3027 dni
Posty: 16
Nick w MP: Domiinoo



Respekt: 50

Ehh wr?belku wr?belku Masakra Z Tob? :)


addCommandHandler("p", function(plrcmd, ...)
local name getPlayerName(plr):gsub("#%x%x%x%x%x%x","")
    if getAdmin(plr,1) or getAdmin(plr,2) or getAdmin(plr,3) or getAdmin(plr,4then
        if (not ...) then
        triggerClientEvent(plr'onClientCaseShowingsse'root1,'U?yj Komendy: /P [Model]')
            return
        end
        local model table.concat ( { ... }, " " )
        if tonumber(model) ~= nil then
        triggerClientEvent(plr'onClientCaseShowing'root1,'Musisz Poda? Nazwe A Nie ID Pojazdu')
        return end

        if model == "rhino" or model == "hydra" or model =="seasparrow" or model == "hunter" or model == "police ls" or model == "police lv" or model == "police sf" or model == "Rhino" or model == "Hunter" or model == "Hydra" or model == "Police LS" or model == "Police LV" or model == "Police SF" then
        triggerClientEvent(plr'onClientCaseShowing'root1,'Pojazd Kt?ry Pr?bujesz Zrespi? Jest Zablokowany')
        return end
        local dim getElementDimension(plr)
        local x,y,getElementPosition(plr)
        local r1,r2,r3 getElementRotation(plr)
        local model getVehicleModelFromName(model)
        local vehicle getPedOccupiedVehicle(plr)
        if getPedOccupiedVehicle(plrthen
        triggerClientEvent(plr'onClientCaseShowing'root1,'Nie Mo?esz Podmieni? Tego Pojazdu')
        else
            pojazd createVehicle(modelxyzr1r2r3)
        triggerClientEvent(plr'onClientCaseShowingss'root1,'Podany Przez Ciebie Pojazd Zosta? Stworzony')
            setElementDimension(pojazddim)
            setElementPosition(plr,xyz+1.5)
            setVehiclePlateText(pojazd"RESPIONY")
            setElementData(pojazd"vehicle:fuel"100)
            setElementData(pojazd,"vehUsunTAK",true)
            addEventHandler("onVehicleExit"pojazd, function(plr,seat)
            if seat ~= 0 then return end
            destroyElement(source)
            end)
        end
    else    
        triggerClientEvent(plr'onClientCaseShowing'root1,'Nie Posiadasz Uprawnie? Do Tej Komendy')
    end
end)


Zamiast TriggerClientEvent zmie? na wiadomo?ci chatowe bo ja mam system notyfikacji :)

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-12-07, 18:05


kuba43







Wiek: 45
Na forum: 3225 dni
Posty: 166
Nick w MP: definitly

Piwa: 17

Respekt: 30,5

Zrobie ci gotowy kod, poniewa? nie chce mi si? tobie tego t?umaczy?, kod rresz mo?e Ci nie dzia?a? bo tam s? tzw "ukryte opisy" kt?re sprawdzaj? czy gracz jest adminem i te? s? notyfikacje.


addCommandHandler("p", function(plrcmd, ...)
        if (not ...) then
        outputChatBox ("U?yj Komendy: /P [Model]"plr)
            return
        end
        local model table.concat ( { ... }, " " )
        if tonumber(model) ~= nil then
        outputChatBox ("Musisz Poda? Nazwe A Nie ID Pojazdu"plr)
        return end

        if model == "rhino" or model == "hydra" or model =="seasparrow" or model == "hunter" or model == "police ls" or model == "police lv" or model == "police sf" or model == "Rhino" or model == "Hunter" or model == "Hydra" or model == "Police LS" or model == "Police LV" or model == "Police SF" then
        outputChatBox ("Pojazd nie prawid?owy"plr)
        return end
        local dim getElementDimension(plr)
        local x,y,getElementPosition(plr)
        local r1,r2,r3 getElementRotation(plr)
        local model getVehicleModelFromName(model)
        local vehicle getPedOccupiedVehicle(plr)
        if getPedOccupiedVehicle(plrthen
        outputChatBox("Nie mo?esz by? w poje?dzie!"plr)
            pojazd createVehicle(modelxyzr1r2r3)
        outputChatBox("Podany Przez Ciebie Pojazd Zosta? Stworzony"plr)
            setElementDimension(pojazddim)
            setElementPosition(plr,xyz+1.5)
            setVehiclePlateText(pojazd"RESPIONY")
            setElementData(pojazd"vehicle:fuel"100)
            setElementData(pojazd,"vehUsunTAK",true)
            addEventHandler("onVehicleExit"pojazd, function(plr,seat)
            if seat ~= 0 then return end
            destroyElement(source)
            end)
end)


Podpis
„(…) wystarczy, że odpowiesz sobie na jedno zajebiście, ale to zajebiście, ważne pytanie: co lubię w życiu robić. A potem zacznij to robić.”.
Ostatnio zmieniony przez kuba43 2018-12-08, 19:14, w całości zmieniany 1 raz  
Postaw piwo autorowi tego posta
 

 
Więcej szczegółów
Wystawiono 1 piw(a):
mangizu
Wysłany: 2018-12-07, 18:26


Kalizman







Wiek: 23
Na forum: 3651 dni
Posty: 1394

Piwa: 4619

Respekt: 358,8
Respekt: 358,8Respekt: 358,8Respekt: 358,8Respekt: 358,8

kuba43, po co ci to?
local name getPlayerName(plr):gsub("#%x%x%x%x%x%x","")


Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-12-08, 19:13


kuba43







Wiek: 45
Na forum: 3225 dni
Posty: 166
Nick w MP: definitly

Piwa: 17

Respekt: 30,5

Kalizman, W sumie masz racje nie jest tu do niczego potrzebne :)

Podpis
„(…) wystarczy, że odpowiesz sobie na jedno zajebiście, ale to zajebiście, ważne pytanie: co lubię w życiu robić. A potem zacznij to robić.”.
Postaw piwo autorowi tego posta
 

 
Tagi: komenda :: respienie :: auta
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






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