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

Wysłany: 2020-05-16, 19:05


Fabian111







Wiek: 26
Na forum: 2716 dni
Posty: 14
Nick w MP: FaBiaN

Piwa: 7

Respekt: 40

Dzie? dobry, chcia?bym zrobi? skrypt na /wariant czyli np wpisuje /wariant i przyk?adowo burrito zmienia wariant na ten ze "spoilerem" i ?wiat?ami a jak znowu to to znika (je?eli kto? ma link/skrypt to je?eli mo?e podes?a? to niech pode?le).

ZA UWAG? DZI?KUJE!

Postaw piwo autorowi tego posta
 

 
Wysłany: 2020-05-16, 20:07


Wilq







Wiek: 24
Na forum: 4429 dni
Posty: 3410

Piwa: 739

Respekt: 1225,8
Respekt: 1225,8


Więcej informacji znajdziesz w Wikipedii MTA:

setVehicleVariant


Postaw piwo autorowi tego posta
 

 
Wysłany: 2020-05-16, 23:09


MeeShuffle

Programista/Grafik






Wiek: 32
Na forum: 4395 dni
Posty: 2758
Nick w MP: Shuffle

Piwa: 8575

Respekt: 535,3
Respekt: 535,3

Wystarczy troche poszuka? na wiki, zaj??o mi to minut?, przyk?ad z wiki :
function setMyVehiclesVariant(theUsercommandvar1var2)
    local var1var2 tonumber(var1), tonumber(var2) -- If anything was passed make sure its number or nil
    local myVeh getPedOccupiedVehicle(theUser) -- Get the vehicle that they're in
    if (myVeh and getVehicleController(myVeh) == theUser) then -- Make sure they're in control
        local wasSet setVehicleVariant(myVehvar1var2) -- Set what they wanted
        if (wasSetthen
            outputChatBox("Vehicle variant successfully set!"theUser02550)
        else
            outputChatBox("Vehicle variant unsuccessfully set."theUser2552550)
        end
    end
end
addCommandHandler("setvehvar"setMyVehiclesVariant) -- Add the command


Postaw piwo autorowi tego posta
 

 
Wysłany: 2020-05-17, 22:31


Matikmontana

Modern Stories






Wiek: 22
Na forum: 2473 dni
Posty: 423
Nick w MP: Mazeusz*

Piwa: 1015

Respekt: 130
Respekt: 130

Ostrzeżeń: 60%
Tutaj masz z pysa
function wariant(plrcmdvar1var2)
    local veh getPedOccupiedVehicle(plr)
    if not veh then return end
    local var1var2 getVehicleVariant(veh)
    if (veh and getVehicleController(veh) ~= plrthen return end
    local speedxspeedyspeedz getElementVelocity(veh)
    if not speedx then speedx=0 end
    if not speedy then speedy=0 end
    if not speedz then speedz=0 end
    speedx tonumber(speedx);speedy=tonumber(speedy);speedz=tonumber(speedz)
    local speed = (speedx^speedy^speedz^2)^(0.5) * 180
    if speed 2 then outputChatBox("St?j w miejscu!",plr,255,255,255) return end
    if getElementData(plr"wariant:blokada"truethen outputChatBox("* Tej komendy mo?esz u?ywa? co 30 sekund!"plr25500) return end
    setElementData(plr"wariant:blokada"true)
    setTimer setElementData300001plr"wariant:blokada"false )
    local panel = {}
    for i=0,do
    panel[i] = getVehiclePanelState veh)
    end
    setVehicleVariant(vehtonumber(not var1), tonumber(not var1))
    for i=0do
    setVehiclePanelState veh,panel[i])
    end
end
addCommandHandler("wariant"wariant)


Postaw piwo autorowi tego posta
 

 
Tagi: warianty :: pojazdu.
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA Odpowiedz do tematu

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