Wysłany: 2016-03-25, 09:04
AteX
Wiek: 26 Na forum: 4015 dni Posty: 927
Nick w MP: #AteX
Piwa : 8360
Spr?buj w ten spos?b:
local marker = createMarker (- 2405.34912 , - 597.78485 , 132.648417 - 0.65 , 'cylinder' , 3 , 241 , 255 , 145 , 255 )
addEventHandler ( "onMarkerHit" , marker , function( el )
if getElementModel ( el ) == 71 then
outputChatBox ( "#FF0001✘#2cc631SPRAWDZAM CZY DZIA?A" , getRootElement (), 255 , 255 , 255 , true )
vehss = getPedOccupiedVehicle ( el )
setElementPosition ( vehss , - 2063.52515 , - 198.87341 , 35.3203 )
setElementInterior ( marker , 0 )
end
end )
Wysłany: 2016-03-25, 09:49
SWRS
Wiek: 30 Na forum: 3809 dni Posty: 39
Piwa : 1
Dzia?a elegancko, teraz mam pytanie, czy je?eli gracz jest na s?u?bie (frakcja) to ?eby go tylko w tedy z pojazdem TP, mo?na tak zrobi?? Element dat? tam wklei? w sumie trzeba, i czy to tak b?dzie wygl?da??:
local marker = createMarker (- 2405.34912 , - 597.78485 , 132.648417 - 0.65 , 'cylinder' , 3 , 241 , 255 , 145 , 255 )
addEventHandler ( "onMarkerHit" , marker , function( el )
if getElementModel ( el ) == 71 then
if isPlayerInPoliceFaction ( el ) then
if not getElementData ( el , 'player:duty' ) then
outputChatBox ( "#FF0001✘#2cc631SPRAWDZAM CZY DZIA?A" , getRootElement (), 255 , 255 , 255 , true )
vehss = getPedOccupiedVehicle ( el )
setElementPosition ( vehss , - 2063.52515 , - 198.87341 , 35.3203 )
setElementInterior ( marker , 0 )
end
end
end
end )
B?dzie dzia?a?o, czy po prostu lepiej ustawi?, ?e je?eli ma gracz takie skin to mo?e? (Skiny przypadkowo dobrane)
W sensie tak:
local marker = createMarker (- 2405.34912 , - 597.78485 , 132.648417 - 0.65 , 'cylinder' , 3 , 241 , 255 , 145 , 255 )
addEventHandler ( "onMarkerHit" , marker , function( el )
if getElementModel ( el ) == 71 or getElementModel ( el ) == 265 then
outputChatBox ( "#FF0001✘#2cc631SPRAWDZAM CZY DZIA?A" , getRootElement (), 255 , 255 , 255 , true )
vehss = getPedOccupiedVehicle ( el )
setElementPosition ( vehss , - 2063.52515 , - 198.87341 , 35.3203 )
setElementInterior ( marker , 0 )
end
end )
Moim zdaniem lepiej nie kombinowa?, wiem ?e to ode Mnie zale?y, ale czy ?atwiej b?dzie ?e po prostu skin taki czy te? gracz na s?u?bie, ?eby bug?w nie by?o?
Wysłany: 2016-03-25, 10:13
AteX
Wiek: 26 Na forum: 4015 dni Posty: 927
Nick w MP: #AteX
Piwa : 8360
Je?eli nikt inny nie b?dzie mia? dost?pu do tych skin?w to getElementModel wystarczy, ale elementData to te? dobry spos?b, bo nie musisz wszystkich modeli wypisywa?.
I jakby co nie ma takiej funkcji jak isPlayerInPoliceFaction. No chyba, ?e sobie tam gdzie? to stworzy?e?.
Wysłany: 2016-03-25, 10:15
SWRS
Wiek: 30 Na forum: 3809 dni Posty: 39
Piwa : 1
Ta funkcja jest w skrypcie na frakcj? policji (Bo akurat tak? wzi??em do test?w) dlatego tego u?y?em
W sumie lepiej zrobi? na skiny, dzi?ki, do zamkni?cia.
Tagi: czy :: będzie :: działało?
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: