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

Wysłany: 2015-12-06, 16:07


Strategy







Wiek: 27
Na forum: 3850 dni
Posty: 44
Nick w MP: karol

Piwa: 1051

Respekt: 120
Respekt: 120

Mam problem z freezowaniem. Chc? zrobi? tak, ?e jak wpisze /cwstop to zatrzymaj? si? wszystkie auta. Uda?o mi si? zrobi? to, ale zatrzymuje si? tylko moje auto. Wie kto? jak zrobi? freeze dla wszystkich aut?

function freeze (player)
if isPlayerInVehicle player then
        local playerVehicle getPlayerOccupiedVehicle player )
        local currentFreezeStatus isVehicleFrozen playerVehicle )
        local newFreezeStatus not currentFreezeStatus
        setVehicleFrozen playerVehiclenewFreezeStatus )
        outputChatBox "#ffa410[CW:STOP] #cc0000All player's Freeze!",  getRootElement(), 25500true )
    end
end


 addCommandHandler "cwstop"freeze )


Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-12-06, 16:12


#404







Wiek: 26
Na forum: 4771 dni
Posty: 1438

Piwa: 2512

Respekt: 833,5
Respekt: 833,5Respekt: 833,5

Ostrzeżeń: 60%
setVehicleFrozen, isVehicleFrozen -

This function is deprecated. This means that its use is discouraged and that it might not exist in future versions, but there should be a more generic way to perform what it does.


Więcej informacji znajdziesz w Wikipedii MTA:

isElementFrozen


Więcej informacji znajdziesz w Wikipedii MTA:

setElementFrozen


Druga sprawa, p?tla ( http://gtao.pl/wstep-do-lua-2-petle-vt89684.htm ) na wszystkie pojazdy.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-12-06, 17:32


_Haze

Peace Yo!






Wiek: 24
Na forum: 4184 dni
Posty: 1648
Nick w MP: Haze

Piwa: 2628

Respekt: 1020
Respekt: 1020

addCommandHandler "cwstop", function()
outputChatBox "#ff0000[CW STOP] ALL FROZEN"getRootElement(), 255255255true )
for k,v in ipairs (getElementsByType "player")) do
local veh getPlayerOccupiedVehicle(v)
setVehicleFrozen(vehtrue)
end
end)

addCommandHandler "cwstart", function()
outputChatBox "#ff0000[CW START] ALL UNFROZEN"getRootElement(), 255255255true )
for k,v in ipairs (getElementsByType "player")) do
local veh getPlayerOccupiedVehicle(v)
setVehicleFrozen(vehfalse)
end
end)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-12-06, 17:34


Strategy







Wiek: 27
Na forum: 3850 dni
Posty: 44
Nick w MP: karol

Piwa: 1051

Respekt: 120
Respekt: 120

Dzi?ki za pomoc. Temat do zamkni?cia.

Postaw piwo autorowi tego posta
 

 
Tagi: isvehiclefrozen
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






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