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

Wysłany: 2018-10-25, 00:00


FeiZzu

Początkujący skrypter






Wiek: 23
Na forum: 3207 dni
Posty: 37
Nick w MP: Ventii

Piwa: 8

Respekt: 51

Co zrobi? w tym skrypcie, aby np po wpisaniu /wariant 2 albo /wariant 0 2 dawa?o nam wariant o ID 2 , a nie losowy? W czym jest b??d?

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: wariant
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






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