Tematy otagowane jako: setelementposition
1. Nie działa setElementPosition
Witam mam problem z setElementPosition. Bardzo prosz? o pomoc oczywi?cie za pomoc stawie piwo.
addEvent ( "ev2" , true )
addEventHandler ( "ev2" , root , function()
destroyElement ( pojazdtaxi )
destroyElement ( ped )
destroyElement ( ped2 )
destroyElement ( ped3 )
local hajs = math . random ( 100 , 1000 )
givePlayerMoney ( client , hajs )
outputChatBox ( "Dowioz?e? klient?w do celu. Otrzymujesz wyp?at? w postaci " .. hajs .. "$" , source )
setElementPosition ( client , - 1971.85120 , 615.95062 , 35.17188 , true )
end )
Poprostu wszystko dzia?a dobrze nie ma ?adnego b??du w debugscript 3 ale nie teleportuje mnie na podane kordy.
2. Pom.ocy z SetElementPosition
Tak jak w tytule. Da si? stworzy? teleport, kt?ry b?dzie TELEPORTOWA? w (np. koordynaty [x = 3, y = 5, z = 6, Rx = 5, Ry = 56, Rz = 85]) ?
G??wnie chodzi mi o koordyta (Rx, Ry, Rz)
3. setElementPosition po triggerowaniu
problem polega na tym i? po zdaniu prawa jazdy gracz nie teleportuje si? w wskazane miejsce.
na konsoli b??d "z?y argument dla setElementPosition, wymagany element w miejscu pierwszego argumentu"
To trigger ze strony klient
triggerServerEvent ( "drivertest.passed" , localPlayer )
to miejsce trigerowania a zarazem ?r?d?o b??du
function passed ()
account = getPlayerAccount ( source )
setAccountData ( account , "drivinglicense" , true )
outputChatBox ( "Zaliczy?e? egzamin na prawo jazdy, gratulacje" , source , 255 , 255 , 255 , true )
local auto = getPedOccupiedVehicle ( source )
destroyElement ( auto )
toggleControl ( source , "enter_exit" , true )
setTimer (function( player )
setElementPosition ( player , 1480.8323974609 ,- 1749.3873291016 , 15.4453125 )
end , 5000 , 1 )
end
addEvent ( "drivertest.passed" , true )
addEventHandler ( "drivertest.passed" , root , passed )
[ Dodano : 2016-04-03, 10:13 ]
Zaznaczam ?e to player tam wrzuci?em przed chwil?, z source r?wnie? nie dzia?a?o, jednak poprawka na player by?a tylko testem.