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

Wysłany: 2014-06-15, 11:48


MeeShuffle

Programista/Grafik






Wiek: 33
Na forum: 4536 dni
Posty: 2758
Nick w MP: Shuffle

Piwa: 8578

Respekt: 535,3
Respekt: 535,3

Kod nie zna zmiennej danej funkcji bo ona jest osobn? funkcj?. Zr?b to tak :

objekt = {}

function niejadek () 
if isElementWithinMarker(getLocalPlayer(), praca3) then 
if getElementData (getLocalPlayer(), "praca3") == true then 
if isPedInVehicle (getLocalPlayer()) then 
local v=getPedOccupiedVehicle(getLocalPlayer()) 
local m=getElementModel(v) 
if (m==578) then 
outputChatBox ( "Zaladowales Towar", getLocalPlayer(), 0, 0, 205 ) 
setElementData(getLocalPlayer(), "dostawa", true ) 
local x, y, z = getElementPosition ( v ) 
local theObject = createObject ( 3374, x + 2, y + 2, z + 2.5, 0, 0, 0, true ) 
local theObject1 = createObject ( 3374, x + 2, y + 2, z + 2.5, 0, 0, 0, true ) 
attachElementToElement( theObject, v, 0, -3, 1.3 ) 
attachElementToElement( theObject1, v, 0, 0.2, 1.3 ) 
table.insert ( objekt, theObject )
table.insert ( objekt, theObject1 )
else 
outputChatBox ( " ", getLocalPlayer(), 0, 0, 205 ) 
end 
end 
end 
end 
end 
addCommandHandler("zaladuj", niejadek) 

addEventHandler("onClientMarkerHit", dostawa, 
function(player) 
if ( player == localPlayer ) then 
if getElementData (getLocalPlayer(), "dostawa") == true then 
if isPedInVehicle (getLocalPlayer()) then 
local v=getPedOccupiedVehicle(getLocalPlayer()) 
local m=getElementModel(v) 
if (m==578) then 
for k,v in ipairs ( objekt ) do
destroyElement ( v )
end
outputChatBox ( "Skonczyles prace", getLocalPlayer(), 0, 0, 205 ) 
end 
end 
end 
end 
end 
)


Podpis

https://shufflecode.pl
Static Codes and Graphics - Join our discord!
Postaw piwo autorowi tego posta
 

 
Tagi: attachelement
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






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