Tematy otagowane jako: getelementposition
1. getElementPosition
Witam, za pomoc? getElementPosition moge pobrac koordy np gracza, ale czy np cos takiego przejdzie?
if getElementPosition ( lolo , 2043.61121 , 1536.99963 , 10.67188 ) then
warpPedIntoVehicle ( lolo , auto )
2. Bindkey oraz getElementPosition
Witam, robi? sobie fajny skrypt na prywatne auta, tylko jeden problem. Nie wiem jak pobra? pozycje gracza po stronie serwera, pokazuje ?e brakuje elementu
local px, py , pz = getElementPosition ( playerSource )
car = createVehicle ( model , px , py , pz , 0 , 0 , 0 , plate )
Oraz mam problem z bindem, nie chce on dzia?a? oto kod:
Kod:
local enter = createPickup ( 2386.97144 , 1037.55396 , 10.82031 , 3 , 1239 , 0 )
inPickup = false
function enterPickup ( pickup , player )
outputChatBox ( "inPickup" )
inPickup = true
end
addEventHandler ( "onPickupHit" , enter , enterPickup )
function enterInterior ( player )
if inPickup == true then
outputChatBox ( "inPickup and pressed E" )
inPickup = false
end
end
function test ( player )
outputChatBox ( "Test" )
bindKey ( player , "E" , "down" , enterInterior )
end
addEventHandler ( "onResourceStart" , root , test )
Tutaj sam bind:
function test ( player )
outputChatBox ( "Test" )
bindKey ( player , "E" , "down" , enterInterior )
end
addEventHandler ( "onResourceStart" , root , test )
3. getElementPosition
Witam hejter?w i spo?eczno??.
Taki kod nie dzia?a. DB3: attemp to concatenate global 'accName'(a nil Value) - czy co? takiego.
function pos ()
x , y , z = getElementPosition ( source )
outputChatBox ( "" .. x .. "," .. y .. "," .. z .. "" , source )
end
addCommandHandler ( "posp" , pos )
Czekam na (hejtersk?) pomoc.