Wysłany: 2017-07-22, 20:55
Kalizman
Wiek: 23 Na forum: 3651 dni Posty: 1394
Piwa : 4619
Witam, w jaki spos?b dzia?a destroyElement, bardzo cz?sto mam z ni? problemy i chcia?bym si? dowiedzie?. Poprosz? r?wnie? jaki? przyk?ad
Wysłany: 2017-07-22, 21:04
amited
Wiek: 26 Na forum: 3714 dni Posty: 1233
Nick w MP: Amited
Piwa : 512
function destroyVehiclesOfModel ( plr , cmd , modelID )
-- get a table of all the vehicles that exist and loop through it
local vehicles = getElementsByType ( "vehicle" )
for i , v in ipairs ( vehicles ) do
-- if the vehicle 's ID is the one provided, destroy it
if (getElementModel(v) == modelID) then
destroyElement(v)
end
end
end
addCommandHandler("zniszcz",destroyVehiclesOfModel)
proste zastosowanie, wpisujesz /zniszcz 411 i niszczy wszystkie infki
Podpis
"amited" napisał/a :
Więcej szczegółów
Wystawiono 1 piw(a):Kalizman
Wysłany: 2017-07-22, 21:05
Artystek
Wiek: 23 Na forum: 3520 dni Posty: 143
Nick w MP: Artystek
Piwa : 74
function destroyVehiclesOfModel ( modelID )
-- get a table of all the vehicles that exist and loop through it
local vehicles = getElementsByType ( "vehicle" )
for i , v in ipairs ( vehicles ) do
-- if the vehicle 's ID is the one provided, destroy it
if (getElementModel(v) == modelID) then
destroyElement(v)
end
end
end
destroyVehiclesOfModel(445)
Wysłany: 2017-07-22, 21:33
Kalizman
Wiek: 23 Na forum: 3651 dni Posty: 1394
Piwa : 4619
Tagi: działanie :: quotdestroyelementquot
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: